diff options
author | peichhorn <peichhor@web.de> | 2012-04-19 02:41:31 +0200 |
---|---|---|
committer | peichhorn <peichhor@web.de> | 2012-04-19 02:41:31 +0200 |
commit | 3f408782de736a676ee19757894eb89c1f4ebf3b (patch) | |
tree | d7d64f1e91a9c7e624edae880c7a841be5b91ce2 /src | |
parent | 48e73a7180ac459d2949e66f2cacc46e08466fce (diff) | |
download | lombok-3f408782de736a676ee19757894eb89c1f4ebf3b.tar.gz lombok-3f408782de736a676ee19757894eb89c1f4ebf3b.tar.bz2 lombok-3f408782de736a676ee19757894eb89c1f4ebf3b.zip |
fixed: @val didn't work with rawtypes in enhanced for loops
Diffstat (limited to 'src')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchVal.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java index 6563c20a..16f11769 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java @@ -189,7 +189,8 @@ public class PatchVal { private static TypeBinding getForEachComponentType(Expression collection, BlockScope scope) { if (collection != null) { - TypeBinding resolved = collection.resolveType(scope); + TypeBinding resolved = collection.resolvedType; + if (resolved == null) resolved = collection.resolveType(scope); if (resolved == null) return null; if (resolved.isArrayType()) { resolved = ((ArrayBinding) resolved).elementsType(); @@ -205,6 +206,8 @@ public class PatchVal { case Binding.PARAMETERIZED_TYPE : // for(E e : Iterable<E>) arguments = ((ParameterizedTypeBinding)iterableType).arguments; break; + case Binding.RAW_TYPE : // for(Object e : Iterable) + return null; } if (arguments != null && arguments.length == 1) { |