From b5625e5698ae8c584032730aaa332f5198d80245 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 23 Apr 2012 23:28:05 +0200 Subject: Fix for bug introduced in 48e73a7180ac459d2949e66f2cacc46e08466fce (2 commits ago). isGenerated was being transplanted twice, resulting in a ClassFormatError. NB: This is my fault - transplanting was the only fix I introduced on top of Philipp's work. --- src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 2 +- src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index f532c308..c14710c8 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -331,7 +331,7 @@ public class EclipsePatcher extends Agent { .target(new MethodTarget("org.eclipse.jdt.internal.corext.refactoring.rename.TempOccurrenceAnalyzer", "visit", "boolean", "org.eclipse.jdt.core.dom.SimpleName")) .target(new MethodTarget("org.eclipse.jdt.internal.corext.refactoring.rename.RenameAnalyzeUtil$ProblemNodeFinder$NameNodeVisitor", "visit", "boolean", "org.eclipse.jdt.core.dom.SimpleName")) .decisionMethod(new Hook("lombok.eclipse.agent.PatchFixes", "isGenerated", "boolean", "org.eclipse.jdt.core.dom.ASTNode")) - .valueMethod(new Hook("lombok.eclipse.agent.PatchFixes", "isGenerated", "boolean", "org.eclipse.jdt.core.dom.ASTNode")) + .valueMethod(new Hook("lombok.eclipse.agent.PatchFixes", "returnTrue", "boolean", "java.lang.Object")) .request(StackRequest.PARAM1) .transplant().build()); } diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java index 1da96256..cb91fd25 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java @@ -76,6 +76,10 @@ public class PatchFixes { return false; } + public static boolean returnTrue(java.lang.Object object) { + return true; + } + @java.lang.SuppressWarnings({"unchecked", "rawtypes"}) public static java.util.List removeGeneratedNodes(java.util.List list) { try { java.util.List realNodes = new java.util.ArrayList(list.size()); -- cgit