aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse/agent
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2014-06-05 23:51:52 +0200
committerRoel Spilker <r.spilker@gmail.com>2014-06-05 23:51:52 +0200
commitae57c4b3202458101f961185ef274b00dda58058 (patch)
tree3a054faa99787edd5c06409739cce1fa3070c3c5 /src/eclipseAgent/lombok/eclipse/agent
parent1ce747178b8f24f29f94dd795f09f872aad9272f (diff)
downloadlombok-ae57c4b3202458101f961185ef274b00dda58058.tar.gz
lombok-ae57c4b3202458101f961185ef274b00dda58058.tar.bz2
lombok-ae57c4b3202458101f961185ef274b00dda58058.zip
addendum to previous commit; found hardcoded reference to an added field and it is safer to now use the augment class to access that field.
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
index 2370d3ff..d1c668a0 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
@@ -32,6 +32,7 @@ import java.util.Stack;
import lombok.core.DiagnosticsReceiver;
import lombok.core.PostCompiler;
import lombok.core.Version;
+import lombok.eclipse.EclipseAugments;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IAnnotatable;
@@ -255,13 +256,13 @@ 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;
+ boolean isGenerated = EclipseAugments.ASTNode_generatedBy.get(internalNode) != null;
if (isGenerated) domNode.getClass().getField("$isGenerated").set(domNode, true);
}
public static void setIsGeneratedFlagForName(org.eclipse.jdt.core.dom.Name name, Object internalNode) throws Exception {
if (internalNode instanceof org.eclipse.jdt.internal.compiler.ast.ASTNode) {
- if (internalNode.getClass().getField("$generatedBy").get(internalNode) != null) {
+ if (EclipseAugments.ASTNode_generatedBy.get((org.eclipse.jdt.internal.compiler.ast.ASTNode) internalNode) != null) {
name.getClass().getField("$isGenerated").set(name, true);
}
}