aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/eclipse
diff options
context:
space:
mode:
Diffstat (limited to 'src/lombok/eclipse')
-rw-r--r--src/lombok/eclipse/EclipseASTVisitor.java2
-rw-r--r--src/lombok/eclipse/handlers/PKG.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/lombok/eclipse/EclipseASTVisitor.java b/src/lombok/eclipse/EclipseASTVisitor.java
index 3397e1cc..793166d7 100644
--- a/src/lombok/eclipse/EclipseASTVisitor.java
+++ b/src/lombok/eclipse/EclipseASTVisitor.java
@@ -144,7 +144,7 @@ public interface EclipseASTVisitor {
private String str(char[] c) {
if (c == null) return "(NULL)";
- else return new String(c);
+ return new String(c);
}
private String str(TypeReference type) {
diff --git a/src/lombok/eclipse/handlers/PKG.java b/src/lombok/eclipse/handlers/PKG.java
index 65145262..1d5c6ae1 100644
--- a/src/lombok/eclipse/handlers/PKG.java
+++ b/src/lombok/eclipse/handlers/PKG.java
@@ -162,6 +162,8 @@ class PKG {
node = node.up();
}
+ if (node == null) return null;
+
if (node.get() instanceof TypeDeclaration) {
for (AbstractMethodDeclaration def : ((TypeDeclaration)node.get()).methods) {
if (def instanceof ConstructorDeclaration) {
@@ -180,6 +182,8 @@ class PKG {
node = node.up();
}
+ if (node == null) return null;
+
if (node.get() instanceof TypeDeclaration) {
for (AbstractMethodDeclaration def : ((TypeDeclaration)node.get()).methods) {
char[] mName = def.selector;