diff options
author | Roel Spilker <r.spilker@gmail.com> | 2012-01-02 11:05:45 -0800 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2012-01-02 11:05:45 -0800 |
commit | 6c9b3d54de988665b64a0114cac5c20059e4af2a (patch) | |
tree | 47f8e85e5bcf4910593b001f7a266cdf610078bf /src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | |
parent | 6f4f053cc5127f4f6ec6f4d6c4cfdc40b063ca3c (diff) | |
parent | 02d7e29dd9e821ae1ff51762bb02f002d93bbd4e (diff) | |
download | lombok-6c9b3d54de988665b64a0114cac5c20059e4af2a.tar.gz lombok-6c9b3d54de988665b64a0114cac5c20059e4af2a.tar.bz2 lombok-6c9b3d54de988665b64a0114cac5c20059e4af2a.zip |
Merge pull request #23 from jvanderhel/Fix_Issue265
Fix for issue 265, @Data and @Log together
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java index e76073bf..a63de8f1 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java @@ -58,6 +58,20 @@ public class PatchFixes { public static boolean returnFalse(java.lang.Object object) { return false; } + + @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()); + for (java.lang.Object node : list) { + if(!isGenerated(((org.eclipse.jdt.core.dom.ASTNode)node))) { + realNodes.add(node); + } + } + return realNodes; + } catch (Exception e) { + } + return list; + } /* Very practical implementation, but works for getter and setter even with type parameters */ public static java.lang.String getRealMethodDeclarationSource(java.lang.String original, org.eclipse.jdt.core.dom.MethodDeclaration declaration) { |