aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-08-06 21:26:55 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-08-06 21:26:55 +0200
commit8ca3ddaa530ca287caff32c2b0dbcff8c17e74c2 (patch)
treecf0f8d893ea563b1109762c7220ecf18f588a705 /src/core
parent87f763a94c87b03da269d110c44e7e750ddf5211 (diff)
downloadlombok-8ca3ddaa530ca287caff32c2b0dbcff8c17e74c2.tar.gz
lombok-8ca3ddaa530ca287caff32c2b0dbcff8c17e74c2.tar.bz2
lombok-8ca3ddaa530ca287caff32c2b0dbcff8c17e74c2.zip
fully tested the HandleWither impl for eclipse.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleWither.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleWither.java b/src/core/lombok/eclipse/handlers/HandleWither.java
index 90253ade..7dd93d84 100644
--- a/src/core/lombok/eclipse/handlers/HandleWither.java
+++ b/src/core/lombok/eclipse/handlers/HandleWither.java
@@ -225,7 +225,7 @@ public class HandleWither extends EclipseAnnotationHandler<Wither> {
if (child.getKind() != Kind.FIELD) continue;
FieldDeclaration childDecl = (FieldDeclaration) child.get();
// Skip fields that start with $
- if (childDecl.name.toString().startsWith("$")) continue;
+ if (childDecl.name != null && childDecl.name.length > 0 && childDecl.name[0] == '$') continue;
long fieldFlags = childDecl.modifiers;
// Skip static fields.
if ((fieldFlags & ClassFileConstants.AccStatic) != 0) continue;
@@ -243,8 +243,8 @@ public class HandleWither extends EclipseAnnotationHandler<Wither> {
constructorCall.type = cloneSelfType(fieldNode, source);
Expression identityCheck = new EqualExpression(
- new SingleNameReference(field.name, p),
createFieldAccessor(fieldNode, FieldAccess.ALWAYS_FIELD, source),
+ new SingleNameReference(field.name, p),
OperatorIds.EQUAL_EQUAL);
ThisReference thisRef = new ThisReference(pS, pE);
Expression conditional = new ConditionalExpression(identityCheck, thisRef, constructorCall);