From df69425550d55da3de07f922fced3872432cd9d3 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 6 Aug 2013 21:22:48 +0200 Subject: position now set for all code generated by javac handlers; this also solves the AssertionError in the Bits class on javac8-ea. --- src/core/lombok/javac/handlers/JavacHandlerUtil.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/lombok') 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 setGeneratedBy(T node, JCTree source) { + if (node == null) return null; synchronized (generatedNodes) { if (source == null) generatedNodes.remove(node); else generatedNodes.put(node, new WeakReference(source)); } + if (source != null) node.pos = source.pos; return node; } -- cgit