diff options
author | Philipp Eichhorn <peichhor@web.de> | 2012-07-13 12:48:55 +0200 |
---|---|---|
committer | Philipp Eichhorn <peichhor@web.de> | 2012-07-13 12:48:55 +0200 |
commit | 02446794b09682fc5e07bbaa298c9908772cbf42 (patch) | |
tree | e2a858267976de3af72ba32682df277b07b9f01b /src/core | |
parent | 1865bd7309b9d1dc743f83ccdbd7204fb0939ecd (diff) | |
download | lombok-02446794b09682fc5e07bbaa298c9908772cbf42.tar.gz lombok-02446794b09682fc5e07bbaa298c9908772cbf42.tar.bz2 lombok-02446794b09682fc5e07bbaa298c9908772cbf42.zip |
Fixed issue 397: Rare java.lang.StackOverflowError in JavacResolution.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/lombok/javac/JavacResolution.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/lombok/javac/JavacResolution.java b/src/core/lombok/javac/JavacResolution.java index 6da60907..73bb38b0 100644 --- a/src/core/lombok/javac/JavacResolution.java +++ b/src/core/lombok/javac/JavacResolution.java @@ -456,12 +456,18 @@ public class JavacResolution { if (upper == null || upper.toString().equals("java.lang.Object")) { return maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null); } + if (upper.getTypeArguments().contains(type)) { + return maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null); + } return maker.Wildcard(maker.TypeBoundKind(BoundKind.EXTENDS), typeToJCTree(upper, ast, false, false)); } else { return maker.Wildcard(maker.TypeBoundKind(BoundKind.SUPER), typeToJCTree(lower, ast, false, false)); } } if (upper != null) { + if (upper.getTypeArguments().contains(type)) { + return maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null); + } return typeToJCTree(upper, ast, allowCompound, allowVoid); } |