diff options
Diffstat (limited to 'src/lombok/javac/handlers/HandleSynchronized.java')
-rw-r--r-- | src/lombok/javac/handlers/HandleSynchronized.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lombok/javac/handlers/HandleSynchronized.java b/src/lombok/javac/handlers/HandleSynchronized.java index 4acb6e27..84508171 100644 --- a/src/lombok/javac/handlers/HandleSynchronized.java +++ b/src/lombok/javac/handlers/HandleSynchronized.java @@ -41,7 +41,8 @@ public class HandleSynchronized implements JavacAnnotationHandler<Synchronized> return true; } boolean isStatic = (method.mods.flags & Flags.STATIC) != 0; - String lockName = isStatic ? STATIC_LOCK_NAME : INSTANCE_LOCK_NAME; + String lockName = annotation.getInstance().value(); + if ( lockName.length() == 0 ) lockName = isStatic ? STATIC_LOCK_NAME : INSTANCE_LOCK_NAME; TreeMaker maker = methodNode.getTreeMaker(); |