aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/EclipseNode.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2019-01-22 04:28:18 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2019-01-22 04:30:02 +0100
commitccd802503d8aa578be3f1f956d97b06a803de0aa (patch)
tree53bee7018a6dd79664ee9b711b7ca36146acb8c1 /src/core/lombok/eclipse/EclipseNode.java
parentba4e69bf30bf1c761b84e78dbec1fa1e285b02b6 (diff)
downloadlombok-ccd802503d8aa578be3f1f956d97b06a803de0aa.tar.gz
lombok-ccd802503d8aa578be3f1f956d97b06a803de0aa.tar.bz2
lombok-ccd802503d8aa578be3f1f956d97b06a803de0aa.zip
[fixes #2019] Lombok now properly deals with `@NonNull` specifically on the ‘type use’ of a parameter (and, in case of arrays, on the outermost dimension which is actually the first one listed. Weird corner case of the JLS).
Diffstat (limited to 'src/core/lombok/eclipse/EclipseNode.java')
-rw-r--r--src/core/lombok/eclipse/EclipseNode.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/EclipseNode.java b/src/core/lombok/eclipse/EclipseNode.java
index a0580c51..4c7f4eac 100644
--- a/src/core/lombok/eclipse/EclipseNode.java
+++ b/src/core/lombok/eclipse/EclipseNode.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2018 The Project Lombok Authors.
+ * Copyright (C) 2009-2019 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -38,6 +38,7 @@ import org.eclipse.jdt.internal.compiler.ast.Initializer;
import org.eclipse.jdt.internal.compiler.ast.LocalDeclaration;
import org.eclipse.jdt.internal.compiler.ast.Statement;
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
/**
@@ -119,10 +120,18 @@ public class EclipseNode extends lombok.core.LombokNode<EclipseAST, EclipseNode,
case LOCAL:
visitor.visitAnnotationOnLocal((LocalDeclaration) parent.get(), this, (Annotation) get());
break;
+ case TYPE_USE:
+ visitor.visitAnnotationOnTypeUse((TypeReference) parent.get(), this, (Annotation) get());
+ break;
default:
throw new AssertionError("Annotation not expected as child of a " + up().getKind());
}
break;
+ case TYPE_USE:
+ visitor.visitTypeUse(this, (TypeReference) get());
+ ast.traverseChildren(visitor, this);
+ visitor.endVisitTypeUse(this, (TypeReference) get());
+ break;
case STATEMENT:
visitor.visitStatement(this, (Statement) get());
ast.traverseChildren(visitor, this);