aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok')
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
index c245d506..65997f9a 100644
--- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java
+++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
@@ -97,6 +97,7 @@ public class JavacHandlerUtil {
}
@Override public void scan(JCTree tree) {
+ if (tree == null) return;
setGeneratedBy(tree, source);
super.scan(tree);
}
@@ -134,10 +135,12 @@ public class JavacHandlerUtil {
}
public static <T extends JCTree> T setGeneratedBy(T node, JCTree source) {
+ if (node == null) return null;
synchronized (generatedNodes) {
if (source == null) generatedNodes.remove(node);
else generatedNodes.put(node, new WeakReference<JCTree>(source));
}
+ if (source != null) node.pos = source.pos;
return node;
}