eclipse usually just wants 'null' instead of a zero-len array.

In this particular case, ecj8 (but not ecj7) would start printing extra
spaces, causing tests to fail. Other things tend to break too, so,
we're sticking to the 'null for empty arrays' model.
This commit is contained in:
Reinier Zwitserloot committed 2014-05-01 00:08:52 +02:00
1 parent fd1a9d7c09
commit 934e41d821
1 file changed
+2 -2
@@ -484,7 +484,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
setGeneratedBy(objectRef, source);
method.arguments = new Argument[] {new Argument(new char[] { 'o' }, 0, objectRef, Modifier.FINAL)};
method.arguments[0].sourceStart = pS; method.arguments[0].sourceEnd = pE;
method.arguments[0].annotations = onParam.toArray(new Annotation[0]);
if (!onParam.isEmpty()) method.arguments[0].annotations = onParam.toArray(new Annotation[0]);
setGeneratedBy(method.arguments[0], source);
List<Statement> statements = new ArrayList<Statement>();
@@ -749,7 +749,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
setGeneratedBy(objectRef, source);
method.arguments = new Argument[] {new Argument(otherName, 0, objectRef, Modifier.FINAL)};
method.arguments[0].sourceStart = pS; method.arguments[0].sourceEnd = pE;
method.arguments[0].annotations = onParam.toArray(new Annotation[0]);
if (!onParam.isEmpty()) method.arguments[0].annotations = onParam.toArray(new Annotation[0]);
setGeneratedBy(method.arguments[0], source);
SingleNameReference otherRef = new SingleNameReference(otherName, p);