Skip to content

Commit

Permalink
Fix groovy#188: Rename chars() to toArray() to fix collision with Java 8
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdo committed Jul 24, 2016
1 parent 31fe9f3 commit 6a918d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public CharArraySequence(String contents) {
this.chars = contents.toCharArray();
}

public char[] chars() {
public char[] toArray() {
return chars;
}

Expand Down Expand Up @@ -60,4 +60,4 @@ public String toString() {
}
return sb.toString();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public ImportRewrite getImportRewrite(IProgressMonitor monitor) {

ASTParser parser = ASTParser.newParser(getAstLevel());
parser.setSource(unit.cloneCachingContents(CharOperation.concat(
imports.chars(), "\nclass X { }".toCharArray())));
imports.toArray(), "\nclass X { }".toCharArray())));
parser.setKind(ASTParser.K_COMPILATION_UNIT);
ASTNode result = null;
try {
Expand Down

0 comments on commit 6a918d8

Please sign in to comment.