Skip to content

Commit

Permalink
Array types are also a problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
daicoden committed Oct 6, 2017
1 parent a1fd025 commit 46e7335
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -12,6 +12,12 @@ public int getValue() {
return value;
}

public int[] getArrayValue() {
int[] x = {value};
return x;
}


public static Builder generateNewBuilder() {
return new Builder();
}
Expand Down
Expand Up @@ -424,7 +424,9 @@ protected static boolean isPossibleCopyMethod(ValueAttribute valueAttribute,
} else if (onValueType
&& candidateCopyMethod.getParameters().size() == 0
&& !candidateCopyMethod.getModifiers().contains(Modifier.STATIC)) {
return !candidateCopyMethod.getReturnType().getKind().isPrimitive();

TypeKind kind = candidateCopyMethod.getReturnType().getKind();
return !kind.isPrimitive() && kind != TypeKind.ARRAY;
}
} else if (!onValueType && possibleCopyMethod.getKind() == ElementKind.CONSTRUCTOR) {

Expand Down

0 comments on commit 46e7335

Please sign in to comment.