diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-06-17 20:05:19 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-06-17 20:05:19 +0200 |
commit | af27ad5395b006a174ad86ed40074279b57d9411 (patch) | |
tree | c7d7d1ef67402096ffbd7ef139d91aae21f38a94 /src/lombok/javac/JavacAST.java | |
parent | 0c9897303f97fba2d2f626ebfd4ef4a1fbc78699 (diff) | |
download | lombok-af27ad5395b006a174ad86ed40074279b57d9411.tar.gz lombok-af27ad5395b006a174ad86ed40074279b57d9411.tar.bz2 lombok-af27ad5395b006a174ad86ed40074279b57d9411.zip |
Error reporting now works 99% properly - the right position is being marked off. The only issue is that the count by javac is being misreported (it doesn't count lombok errors).
Diffstat (limited to 'src/lombok/javac/JavacAST.java')
-rw-r--r-- | src/lombok/javac/JavacAST.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lombok/javac/JavacAST.java b/src/lombok/javac/JavacAST.java index 872da3d9..37673ab5 100644 --- a/src/lombok/javac/JavacAST.java +++ b/src/lombok/javac/JavacAST.java @@ -338,12 +338,10 @@ public class JavacAST extends AST<JCTree> { JavaFileObject newSource = null; JCTree astObject = node == null ? null : node.get(); JCCompilationUnit top = (JCCompilationUnit) top().get(); - if (node != null) { - newSource = top.sourcefile; - if (newSource != null) { - oldSource = log.useSource(newSource); - pos = astObject.pos(); - } + newSource = top.sourcefile; + if (newSource != null) { + oldSource = log.useSource(newSource); + if ( pos == null ) pos = astObject.pos(); } try { switch (kind) { |