From 6a918d8bdb0f750acbffa4bffa182dc754457aa2 Mon Sep 17 00:00:00 2001 From: Felix Dorner Date: Sun, 24 Jul 2016 15:43:52 +0200 Subject: [PATCH] Fix #188: Rename chars() to toArray() to fix collision with Java 8 --- .../eclipse/codeassist/processors/CharArraySequence.java | 4 ++-- .../codeassist/processors/GroovyImportRewriteFactory.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/processors/CharArraySequence.java b/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/processors/CharArraySequence.java index e8ab2a10bc..1619f3a108 100644 --- a/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/processors/CharArraySequence.java +++ b/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/processors/CharArraySequence.java @@ -32,7 +32,7 @@ public CharArraySequence(String contents) { this.chars = contents.toCharArray(); } - public char[] chars() { + public char[] toArray() { return chars; } @@ -60,4 +60,4 @@ public String toString() { } return sb.toString(); } -} \ No newline at end of file +} diff --git a/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/processors/GroovyImportRewriteFactory.java b/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/processors/GroovyImportRewriteFactory.java index b6c5885c0e..74b61c86b8 100644 --- a/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/processors/GroovyImportRewriteFactory.java +++ b/ide/org.codehaus.groovy.eclipse.codeassist.completion/src/org/codehaus/groovy/eclipse/codeassist/processors/GroovyImportRewriteFactory.java @@ -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 {