aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2009-11-27 02:38:55 +0100
committerReinier Zwitserloot <reinier@tipit.to>2009-11-27 02:43:37 +0100
commit6838c6be2f8bd8935fa6853067183cf11c013fcd (patch)
tree545ba4805a9e1634b831b47ff6c66fe98b67a9b3 /src/eclipseAgent
parent1a0e611a9c5e1ee518670647ce1a44beae559b44 (diff)
downloadlombok-6838c6be2f8bd8935fa6853067183cf11c013fcd.tar.gz
lombok-6838c6be2f8bd8935fa6853067183cf11c013fcd.tar.bz2
lombok-6838c6be2f8bd8935fa6853067183cf11c013fcd.zip
We encountered a strange NPE here. Can't reproduce, nevertheless added null-checks
Diffstat (limited to 'src/eclipseAgent')
-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);