From bcee5a50db361abe7468de74c79194d394c8229e Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 24 Jun 2009 07:01:52 +0200 Subject: javac's HandleData now generates the constructor only if it doesn't already exist, and the staticConstructor is now also completed. Left: toString, hashCode, equals. --- src/lombok/eclipse/handlers/PKG.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lombok/eclipse') diff --git a/src/lombok/eclipse/handlers/PKG.java b/src/lombok/eclipse/handlers/PKG.java index 3cfbf9c6..e9d12b62 100644 --- a/src/lombok/eclipse/handlers/PKG.java +++ b/src/lombok/eclipse/handlers/PKG.java @@ -50,7 +50,7 @@ class PKG { node = node.up(); } - if ( node.get() instanceof TypeDeclaration ) { + if ( node != null && node.get() instanceof TypeDeclaration ) { TypeDeclaration typeDecl = (TypeDeclaration)node.get(); if ( typeDecl.methods != null ) for ( AbstractMethodDeclaration def : typeDecl.methods ) { char[] mName = ((AbstractMethodDeclaration)def).selector; @@ -71,7 +71,7 @@ class PKG { node = node.up(); } - if ( node.get() instanceof TypeDeclaration ) { + if ( node != null && node.get() instanceof TypeDeclaration ) { TypeDeclaration typeDecl = (TypeDeclaration)node.get(); if ( typeDecl.methods != null ) for ( AbstractMethodDeclaration def : typeDecl.methods ) { if ( def instanceof ConstructorDeclaration ) { -- cgit