aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-04-23 22:36:07 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-04-23 22:36:07 +0200
commita27826b268c28a7aa1596bb07461ab1cfb113d82 (patch)
treeed589f67954005c4169855e75ac8fcbde9decd6c /src/core/lombok
parent472d602693bdccde135ff084c44bfebd285a2101 (diff)
downloadlombok-a27826b268c28a7aa1596bb07461ab1cfb113d82.tar.gz
lombok-a27826b268c28a7aa1596bb07461ab1cfb113d82.tar.bz2
lombok-a27826b268c28a7aa1596bb07461ab1cfb113d82.zip
[bugfix] generics on inner classes whose outer type has generics, when the outer type is an interface, caused bugs in ecj.
Diffstat (limited to 'src/core/lombok')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java
index 75339f7c..3e226269 100644
--- a/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java
+++ b/src/core/lombok/eclipse/handlers/HandleEqualsAndHashCode.java
@@ -479,14 +479,16 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
list.add(type.getName());
if (addWildcards) genericsCount.add(arraySizeOf(((TypeDeclaration) type.get()).typeParameters));
- boolean staticContext = (((TypeDeclaration) type.get()).modifiers & Modifier.STATIC) != 0;
+ boolean staticContext = (((TypeDeclaration) type.get()).modifiers & ClassFileConstants.AccStatic) != 0;
EclipseNode tNode = type.up();
+ if (!staticContext && tNode.getKind() == Kind.TYPE && (((TypeDeclaration) tNode.get()).modifiers & ClassFileConstants.AccInterface) != 0) staticContext = true;
while (tNode != null && tNode.getKind() == Kind.TYPE) {
list.add(tNode.getName());
if (addWildcards) genericsCount.add(staticContext ? 0 : arraySizeOf(((TypeDeclaration) tNode.get()).typeParameters));
if (!staticContext) staticContext = (((TypeDeclaration) tNode.get()).modifiers & Modifier.STATIC) != 0;
tNode = tNode.up();
+ if (!staticContext && tNode.getKind() == Kind.TYPE && (((TypeDeclaration) tNode.get()).modifiers & ClassFileConstants.AccInterface) != 0) staticContext = true;
}
Collections.reverse(list);
if (addWildcards) Collections.reverse(genericsCount);