aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers/HandleSynchronized.java
diff options
context:
space:
mode:
authorpeichhorn <peichhor@web.de>2011-08-06 23:36:16 +0200
committerpeichhorn <peichhor@web.de>2011-08-06 23:36:16 +0200
commit6e23117126fddfaa08a9d5b8e1bd482d453475f8 (patch)
tree92ed673742489c1ba80608edce9d32290f2a4734 /src/core/lombok/eclipse/handlers/HandleSynchronized.java
parent87fd16807317d7a3e0f9131a9342b620a9b1a5f0 (diff)
downloadlombok-6e23117126fddfaa08a9d5b8e1bd482d453475f8.tar.gz
lombok-6e23117126fddfaa08a9d5b8e1bd482d453475f8.tar.bz2
lombok-6e23117126fddfaa08a9d5b8e1bd482d453475f8.zip
fixed Issue 248:
To support the new numeric literal syntax of Java 7, the constructor of IntLiteral got replaced by a factory-method. So we updated the affected handlers to work in both worlds.
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleSynchronized.java')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSynchronized.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSynchronized.java b/src/core/lombok/eclipse/handlers/HandleSynchronized.java
index 620e7864..3f545966 100644
--- a/src/core/lombok/eclipse/handlers/HandleSynchronized.java
+++ b/src/core/lombok/eclipse/handlers/HandleSynchronized.java
@@ -39,7 +39,6 @@ import org.eclipse.jdt.internal.compiler.ast.Block;
import org.eclipse.jdt.internal.compiler.ast.Expression;
import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
import org.eclipse.jdt.internal.compiler.ast.FieldReference;
-import org.eclipse.jdt.internal.compiler.ast.IntLiteral;
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference;
@@ -93,8 +92,7 @@ public class HandleSynchronized extends EclipseAnnotationHandler<Synchronized> {
//We use 'new Object[0];' because unlike 'new Object();', empty arrays *ARE* serializable!
ArrayAllocationExpression arrayAlloc = new ArrayAllocationExpression();
Eclipse.setGeneratedBy(arrayAlloc, source);
- arrayAlloc.dimensions = new Expression[] { new IntLiteral(new char[] { '0' }, 0, 0) };
- Eclipse.setGeneratedBy(arrayAlloc.dimensions[0], source);
+ arrayAlloc.dimensions = new Expression[] { makeIntLiteral("0".toCharArray(), source) };
arrayAlloc.type = new QualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT, new long[] { 0, 0, 0 });
Eclipse.setGeneratedBy(arrayAlloc.type, source);
fieldDecl.type = new QualifiedTypeReference(TypeConstants.JAVA_LANG_OBJECT, new long[] { 0, 0, 0 });