aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-02-15 04:36:15 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-02-15 04:36:15 +0100
commitdf5324e2d7f2ce12b691954dd79714ad7496b406 (patch)
tree9188bd163d99fbb8eeaf1301755ce50514e97438 /src/eclipseAgent/lombok/eclipse
parent9a50da2d092f86eef6e00e0f518039ad3ef53ec8 (diff)
downloadlombok-df5324e2d7f2ce12b691954dd79714ad7496b406.tar.gz
lombok-df5324e2d7f2ce12b691954dd79714ad7496b406.tar.bz2
lombok-df5324e2d7f2ce12b691954dd79714ad7496b406.zip
'val' is no longer legal in basic for loops now. Fixes issue #346
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/PatchVal.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java
index d59ff735..6563c20a 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java
@@ -120,6 +120,8 @@ public class PatchVal {
if (!isVal(local.type, scope)) return false;
+ if (new Throwable().getStackTrace()[2].getClassName().contains("ForStatement")) return false;
+
Expression init = local.initialization;
if (init == null && Reflection.initCopyField != null) {
try {