summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2019-01-07 00:53:30 -0800
committerGeorge Fraser <george@fivetran.com>2019-01-07 00:53:30 -0800
commita72728087513660d17cdf9919b0c5fd50a084b2a (patch)
treeece51511d03c383a70eb4ed4119a44c692577756
parentba156f46e00f2075f2f11fb18e72bcd09deb1192 (diff)
downloadjava-language-server-a72728087513660d17cdf9919b0c5fd50a084b2a.zip
Unused
-rw-r--r--src/main/java/org/javacs/WarnUnused.java1
-rw-r--r--src/test/java/org/javacs/JavaCompilerServiceTest.java4
2 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/org/javacs/WarnUnused.java b/src/main/java/org/javacs/WarnUnused.java
index 614c887..b3a2237 100644
--- a/src/main/java/org/javacs/WarnUnused.java
+++ b/src/main/java/org/javacs/WarnUnused.java
@@ -7,6 +7,7 @@ import javax.lang.model.element.*;
class WarnUnused extends TreePathScanner<Void, Void> {
private final Trees trees;
+ // TODO ignore writes when calculating used
private final Set<Element> declared = new HashSet<>(), used = new HashSet<>();
WarnUnused(JavacTask task) {
diff --git a/src/test/java/org/javacs/JavaCompilerServiceTest.java b/src/test/java/org/javacs/JavaCompilerServiceTest.java
index c947bde..b9419ad 100644
--- a/src/test/java/org/javacs/JavaCompilerServiceTest.java
+++ b/src/test/java/org/javacs/JavaCompilerServiceTest.java
@@ -13,7 +13,6 @@ import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.StringJoiner;
-import java.util.logging.Logger;
import java.util.stream.Collectors;
import javax.lang.model.element.Element;
import javax.tools.Diagnostic;
@@ -22,8 +21,6 @@ import org.junit.Ignore;
import org.junit.Test;
public class JavaCompilerServiceTest {
- private static final Logger LOG = Logger.getLogger("main");
-
static {
Main.setRootFormat();
}
@@ -250,7 +247,6 @@ public class JavaCompilerServiceTest {
for (var d : diags) {
var file = Parser.fileName(d.getSource().toUri());
var line = d.getLineNumber();
- var kind = d.getKind();
var msg = d.getMessage(null);
var string = String.format("%s(%d): %s", file, line, msg);
strings.add(string);