diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-08-06 21:22:48 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-08-06 21:22:48 +0200 |
commit | df69425550d55da3de07f922fced3872432cd9d3 (patch) | |
tree | b95e5fa73afd4d7d96873f1d03ea97aae515de31 /src/core | |
parent | 9ed14b8cbf8beb209f0d63e69e472bf81efe1d35 (diff) | |
download | lombok-df69425550d55da3de07f922fced3872432cd9d3.tar.gz lombok-df69425550d55da3de07f922fced3872432cd9d3.tar.bz2 lombok-df69425550d55da3de07f922fced3872432cd9d3.zip |
position now set for all code generated by javac handlers;
this also solves the AssertionError in the Bits class on javac8-ea.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/lombok/javac/handlers/JavacHandlerUtil.java | 3 |
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; } |