From 02446794b09682fc5e07bbaa298c9908772cbf42 Mon Sep 17 00:00:00 2001 From: Philipp Eichhorn Date: Fri, 13 Jul 2012 12:48:55 +0200 Subject: Fixed issue 397: Rare java.lang.StackOverflowError in JavacResolution. --- src/core/lombok/javac/JavacResolution.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core') 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); } -- cgit