aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2011-06-20 22:02:07 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2011-06-20 22:02:07 +0200
commit620125c266f3cbc173d0170594242387e176cd2a (patch)
tree2298335a608616d13b43b8ffae603dc422faa642 /src/core
parent3798d9426365826598b42e00969314a3ae1f8c78 (diff)
downloadlombok-620125c266f3cbc173d0170594242387e176cd2a.tar.gz
lombok-620125c266f3cbc173d0170594242387e176cd2a.tar.bz2
lombok-620125c266f3cbc173d0170594242387e176cd2a.zip
whoops, a very minor nit in synchronized which also caused a test to fail fixed.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSynchronized.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSynchronized.java b/src/core/lombok/eclipse/handlers/HandleSynchronized.java
index b4c87b1e..46234515 100644
--- a/src/core/lombok/eclipse/handlers/HandleSynchronized.java
+++ b/src/core/lombok/eclipse/handlers/HandleSynchronized.java
@@ -82,7 +82,7 @@ public class HandleSynchronized extends EclipseAnnotationHandler<Synchronized> {
if (fieldExists(new String(lockName), annotationNode) == MemberExistsResult.NOT_EXISTS) {
if (!autoMake) {
if (reportErrors) annotationNode.addError(String.format("The field %s does not exist.", new String(lockName)));
- return lockName;
+ return null;
}
FieldDeclaration fieldDecl = new FieldDeclaration(lockName, 0, -1);
Eclipse.setGeneratedBy(fieldDecl, source);
@@ -123,6 +123,7 @@ public class HandleSynchronized extends EclipseAnnotationHandler<Synchronized> {
}
char[] lockName = createLockField(annotation, annotationNode, method.isStatic(), true);
+ if (lockName == null) return;
if (method.statements == null) return;
Block block = new Block(0);