Skip to content

Commit

Permalink
Java 11 fix-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Dec 21, 2018
1 parent 820e892 commit c81cee4
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,11 @@

import org.codehaus.groovy.ast.ClassNode;
import org.codehaus.groovy.control.CompilationUnit;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

public final class TraitsTests extends GroovyCompilerTestSuite {

@Before
public void setUp() {
if (Float.parseFloat(System.getProperty("java.specification.version")) > 8) {
vmArguments = new String[] {"--add-modules=java.xml.bind"};
}
}

@Test
public void testTraits() {
String[] sources = {
Expand Down
8 changes: 4 additions & 4 deletions extras/groovy-eclipse-batch-builder/build.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# version numbers
version2.4=2.4.16-01
version2.5=2.5.4-01
version2.4=2.4.16-02
version2.5=2.5.4-02
version2.6=2.6.0-01

# uncomment to do a particular build -- only one should be uncommented at a time
Expand All @@ -9,10 +9,10 @@ do-25-build=true
#do-26-build=true

# location of the plugins directory for the eclipse install
eclipse.install.plugins=C:/Users/Public/Eclipse-4.9/plugins
eclipse.install.plugins=C:/Users/Public/Eclipse-4.10/plugins

# location of the cloned groovy-eclipse git repository
git.repo.loc=C:/Users/Name/workspace/groovy-eclipse

# which JDT Core patch is active in your workspace?
jdt.patch.target=e49
jdt.patch.target=e410
2 changes: 1 addition & 1 deletion extras/groovy-eclipse-compiler-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<!-- groovy version to use for tests: -->
<groovy.rt.version>2.5.4</groovy.rt.version>
<!-- groovy-batch version to use for tests: -->
<groovy.xx.version>2.5.4-01</groovy.xx.version>
<groovy.xx.version>2.5.4-02</groovy.xx.version>
<!-- maven-compiler version to use for tests: -->
<maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,30 +210,30 @@ final class TypeCompletionTests extends CompletionTestSuite {

@Test
void testCompleteClass2() {
String contents = 'class Foo { }\nFoo.can'
String contents = 'class Foo { }\nFoo.com'
ICompletionProposal[] proposals = createProposalsAtOffset(contents, contents.length())
proposalExists(proposals, 'canonicalName', 1, true)
proposalExists(proposals, 'componentType', 1, true)
}

@Test
void testCompleteClass3() {
String contents = 'class Foo { }\nFoo.getCan'
String contents = 'class Foo { }\nFoo.getCom'
ICompletionProposal[] proposals = createProposalsAtOffset(contents, contents.length())
proposalExists(proposals, 'getCanonicalName', 1, true)
proposalExists(proposals, 'getComponentType', 1, true)
}

@Test
void testCompleteClass4() {
String contents = 'class Foo { }\nFoo.class.can'
String contents = 'class Foo { }\nFoo.class.com'
ICompletionProposal[] proposals = createProposalsAtOffset(contents, contents.length())
proposalExists(proposals, 'canonicalName', 1)
proposalExists(proposals, 'componentType', 1)
}

@Test
void testCompleteClass5() {
String contents = 'class Foo { }\nFoo.class.getCan'
String contents = 'class Foo { }\nFoo.class.getCom'
ICompletionProposal[] proposals = createProposalsAtOffset(contents, contents.length())
proposalExists(proposals, 'getCanonicalName', 1)
proposalExists(proposals, 'getComponentType', 1)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ public IPath addPackage(IPath packageFragmentRootPath, String packageName) {
}

public IPath addPackageFragmentRoot(IPath projectPath, String sourceFolderName) throws JavaModelException {
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null); //$NON-NLS-1$
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null);
}

public IPath addTestPackageFragmentRoot(IPath projectPath, String sourceFolderName) throws JavaModelException {
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null, "bin-"+sourceFolderName, true);
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null, "bin-" + sourceFolderName, true); //$NON-NLS-1$
}

/** Adds a package fragment root to the workspace. If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public IPath addPackage(IPath packageFragmentRootPath, String packageName) {
}

public IPath addPackageFragmentRoot(IPath projectPath, String sourceFolderName) throws JavaModelException {
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null); //$NON-NLS-1$
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null);
}

/** Adds a package fragment root to the workspace. If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ public IPath addPackage(IPath packageFragmentRootPath, String packageName) {
}

public IPath addPackageFragmentRoot(IPath projectPath, String sourceFolderName) throws JavaModelException {
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null); //$NON-NLS-1$
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null);
}

public IPath addTestPackageFragmentRoot(IPath projectPath, String sourceFolderName) throws JavaModelException {
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null, "bin-"+sourceFolderName, true);
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null, "bin-" + sourceFolderName, true); //$NON-NLS-1$
}

/** Adds a package fragment root to the workspace. If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ public IPath addPackage(IPath packageFragmentRootPath, String packageName) {
}

public IPath addPackageFragmentRoot(IPath projectPath, String sourceFolderName) throws JavaModelException {
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null); //$NON-NLS-1$
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null);
}

public IPath addTestPackageFragmentRoot(IPath projectPath, String sourceFolderName) throws JavaModelException {
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null, "bin-"+sourceFolderName, true);
return addPackageFragmentRoot(projectPath, sourceFolderName, null, null, "bin-" + sourceFolderName, true); //$NON-NLS-1$
}

/** Adds a package fragment root to the workspace. If
Expand Down

0 comments on commit c81cee4

Please sign in to comment.