aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse/agent
diff options
context:
space:
mode:
authorJappe van der Hel <jappe.vanderhel@gmail.com>2012-01-10 13:22:38 +0100
committerJappe van der Hel <jappe.vanderhel@gmail.com>2012-01-10 13:22:38 +0100
commit1a08aa5cbca685ffd8b056f4a4fc64ce9912027c (patch)
treecb5ecdac8d1453ccb00d66d7221ebaa4a6fb50c1 /src/eclipseAgent/lombok/eclipse/agent
parent3adf835e48f064a4b8ef1d24d3d32d1827c03f28 (diff)
downloadlombok-1a08aa5cbca685ffd8b056f4a4fc64ce9912027c.tar.gz
lombok-1a08aa5cbca685ffd8b056f4a4fc64ce9912027c.tar.bz2
lombok-1a08aa5cbca685ffd8b056f4a4fc64ce9912027c.zip
removeGeneratedMethods was broken, causing the rename to fail
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
index 9f7abbe3..c2ab45e0 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
@@ -258,9 +258,9 @@ public class PatchFixes {
public static IMethod[] removeGeneratedMethods(IMethod[] methods) throws Exception {
List<IMethod> result = new ArrayList<IMethod>();
for (IMethod m : methods) {
- if (m.getNameRange().getLength() > 0) result.add(m);
+ if (m.getNameRange().getLength() > 0 && !m.getNameRange().equals(m.getSourceRange())) result.add(m);
}
- return result.size() == methods.length ? methods : result.toArray(new IMethod[0]);
+ return result.size() == methods.length ? methods : result.toArray(new IMethod[result.size()]);
}
public static SimpleName[] removeGeneratedSimpleNames(SimpleName[] in) throws Exception {