Skip to content

Commit 37f9ad7

Browse files
committed
minor items
1 parent e9bc646 commit 37f9ad7

File tree

6 files changed

+36
-11
lines changed

6 files changed

+36
-11
lines changed

Diff for: Site-org.codehaus.groovy.eclipse/pom.xml

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
<version>${tycho-version}</version>
6767
<configuration>
6868
<filterProvided>true</filterProvided>
69-
<keepNonXzIndexFiles>false</keepNonXzIndexFiles>
7069
</configuration>
7170
</plugin>
7271
</plugins>

Diff for: base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/basic/ErrorRecoveryTests.java

+21-3
Original file line numberDiff line numberDiff line change
@@ -2669,10 +2669,15 @@ public void testUnrecoverableErrors_GRE755_1() {
26692669
runNegativeTest(sources,
26702670
"----------\n" +
26712671
"1. ERROR in X.groovy (at line 2)\n" +
2672-
"\tdef x=\"\n" +
2672+
"\tdef x=\"\n" + (isParrotParser()
2673+
?
2674+
"\t ^\n" +
2675+
"Groovy:Unexpected character: '\"'\n"
2676+
:
26732677
"}\n" +
26742678
"\t ^\n" +
2675-
"Groovy:expecting anything but \'\'\\n\'\'; got it anyway\n" +
2679+
"Groovy:expecting anything but \'\'\\n\'\'; got it anyway\n"
2680+
) +
26762681
"----------\n");
26772682

26782683
ModuleNode moduleNode = getModuleNode("X.groovy");
@@ -2691,11 +2696,24 @@ public void testUnrecoverableErrors_GRE755_2() {
26912696
//@formatter:on
26922697

26932698
runNegativeTest(sources,
2699+
"----------\n" + (isParrotParser()
2700+
?
2701+
"1. ERROR in X.groovy (at line 0)\n" +
2702+
"\tpackage a\n" +
2703+
"\t^\n" +
2704+
"Groovy:General error during conversion: groovyjarjarantlr4.v4.runtime.InputMismatchException\n" +
26942705
"----------\n" +
2706+
"2. ERROR in X.groovy (at line 4)\n" +
2707+
"\tdef foo(Nuthin\n" +
2708+
"\n" +
2709+
"\t ^\n" +
2710+
"Groovy:Unexpected input: '<EOF>'\n"
2711+
:
26952712
"1. ERROR in X.groovy (at line 3)\n" +
26962713
"\tdef foo(Nuthin\n" +
26972714
"\t ^\n" +
2698-
"Groovy:unexpected token: Nuthin\n" +
2715+
"Groovy:unexpected token: Nuthin\n"
2716+
) +
26992717
"----------\n");
27002718

27012719
ModuleNode moduleNode = getModuleNode("X.groovy");

Diff for: base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/basic/TraitsTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,7 @@ public void testTraits55() {
14321432
runNegativeTest(sources,
14331433
"----------\n" +
14341434
"1. ERROR in Script.groovy (at line 7)\n" +
1435-
"\tdef m() {'D'}\n" +
1435+
"\tdef m() { 'D' }\n" +
14361436
"\t ^^^\n" +
14371437
"Groovy:You are not allowed to override the final method m() from class 'C'.\n" +
14381438
"----------\n");

Diff for: base-test/org.eclipse.jdt.groovy.core.tests.compiler/src/org/eclipse/jdt/groovy/core/tests/xform/TypeCheckedTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,7 @@ public void testTypeChecked8034() {
19841984
String[] sources = {
19851985
"Test.groovy",
19861986
"class A<I, O> {\n" +
1987-
" def <IO extends A<? super O, ?>> IO andThen(IO next) {\n" +
1987+
" def <T extends A<? super O, ?>> T andThen(T next) {\n" +
19881988
" next\n" +
19891989
" }\n" +
19901990
"}\n" +

Diff for: ide-test/org.codehaus.groovy.eclipse.codeassist.test/src/org/codehaus/groovy/eclipse/codeassist/tests/FieldCompletionTests.groovy

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -1093,8 +1093,14 @@ final class FieldCompletionTests extends CompletionTestSuite {
10931093
|}
10941094
|'''.stripMargin()
10951095
ICompletionProposal[] proposals = createProposalsAtOffset(contents, getLastIndexOf(contents, '.'))
1096-
float javaVersion = Float.parseFloat(System.getProperty('java.specification.version'))
1097-
proposalExists(proposals, 'forName', javaVersion < 9 ? 2 : (javaVersion < 21 ? 3 : 6))
1096+
int forNameCount
1097+
switch (Integer.parseInt(System.getProperty('java.specification.version'))) {
1098+
case 0..< 9: forNameCount = 2; break
1099+
case 9..<21: forNameCount = 3; break
1100+
case 21..<24: forNameCount = 6; break
1101+
case 24..<99: forNameCount = 4; break
1102+
}
1103+
proposalExists(proposals, 'forName', forNameCount)
10981104
}
10991105

11001106
@Test

Diff for: jdt-patch/e435/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/TestVerifier.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,11 @@ private String[] getVMArguments(String[] vmArguments) {
449449
if (vmArguments != null) {
450450
Collections.addAll(completeVmArguments, vmArguments);
451451
}
452-
completeVmArguments.add("-verify");
452+
if (Integer.parseInt(System.getProperty("java.specification.version")) < 24) {
453+
completeVmArguments.add("-verify");
454+
}
453455

454-
return completeVmArguments.toArray(new String[0]);
456+
return completeVmArguments.toArray(String[]::new);
455457
}
456458

457459
private void launchAndRun(String className, String[] classpaths, String[] programArguments, String[] vmArguments) {

0 commit comments

Comments
 (0)