aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2009-11-27 02:38:55 +0100
committerRoel Spilker <r.spilker@gmail.com>2009-11-27 02:38:55 +0100
commit86ac271a45e1152272f44fcd81f0c90914853013 (patch)
tree2eb6fb930c7740729874006b200f18ba56a93770 /src
parente5d248c3ccf64211fd8a301f584bde82dd426601 (diff)
downloadlombok-86ac271a45e1152272f44fcd81f0c90914853013.tar.gz
lombok-86ac271a45e1152272f44fcd81f0c90914853013.tar.bz2
lombok-86ac271a45e1152272f44fcd81f0c90914853013.zip
We encountered a strange NPE here. Can't reproduce, nevertheless added null-checks
Diffstat (limited to 'src')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java1
1 files changed, 1 insertions, 0 deletions
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);