From 86ac271a45e1152272f44fcd81f0c90914853013 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Fri, 27 Nov 2009 02:38:55 +0100 Subject: We encountered a strange NPE here. Can't reproduce, nevertheless added null-checks --- src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/eclipseAgent/lombok/eclipse') diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java index 5d54692e..1430ca8c 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java @@ -26,6 +26,7 @@ public class PatchFixes { public static void setIsGeneratedFlag(org.eclipse.jdt.core.dom.ASTNode domNode, org.eclipse.jdt.internal.compiler.ast.ASTNode internalNode) throws Exception { + if (internalNode == null || domNode == null) return; boolean isGenerated = internalNode.getClass().getField("$generatedBy").get(internalNode) != null; if (isGenerated) { domNode.getClass().getField("$isGenerated").set(domNode, true); -- cgit