summaryrefslogtreecommitdiff
path: root/src/main/java/org/javacs/CompileFocus.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/javacs/CompileFocus.java')
-rw-r--r--src/main/java/org/javacs/CompileFocus.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/org/javacs/CompileFocus.java b/src/main/java/org/javacs/CompileFocus.java
index 8ee8273..035de09 100644
--- a/src/main/java/org/javacs/CompileFocus.java
+++ b/src/main/java/org/javacs/CompileFocus.java
@@ -43,8 +43,7 @@ public class CompileFocus {
var profiler = new Profiler();
task.addTaskListener(profiler);
try {
- var it = task.parse().iterator();
- this.root = it.hasNext() ? it.next() : null; // TODO something better than null when no class is present
+ this.root = task.parse().iterator().next();
// The results of task.analyze() are unreliable when errors are present
// You can get at `Element` values using `Trees`
task.analyze();