Skip to content

Commit c51ad25

Browse files
authored
[26] Create Java 26 test framework changes (eclipse-jdt#4488)
1 parent 20bd343 commit c51ad25

File tree

38 files changed

+398
-613
lines changed

38 files changed

+398
-613
lines changed

.classpath

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
4+
<attributes>
5+
<attribute name="module" value="true"/>
6+
</attributes>
7+
</classpathentry>
8+
<classpathentry kind="output" path="JCL/converterJclMin24/bin"/>
9+
</classpath>

Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pipeline {
1010
}
1111
tools {
1212
maven 'apache-maven-latest'
13-
jdk 'openjdk-jdk25-latest'
13+
jdk 'openjdk-jdk26-latest'
1414
}
1515
stages {
1616
stage('Build') {
@@ -31,11 +31,11 @@ pipeline {
3131
mvn clean install -f org.eclipse.jdt.core.compiler.batch -DlocalEcjVersion=99.99 -Dmaven.repo.local=$WORKSPACE/.m2/repository -DcompilerBaselineMode=disable -DcompilerBaselineReplace=none
3232
3333
mvn -U clean verify --batch-mode --fail-at-end -Dmaven.repo.local=$WORKSPACE/.m2/repository \
34-
-Ptest-on-javase-25 -Pbree-libs -Papi-check -Pjavadoc -Pp2-repo \
34+
-Ptest-on-javase-26 -Pbree-libs -Papi-check -Pjavadoc -Pp2-repo \
3535
-Dmaven.test.failure.ignore=true \
3636
-Dcompare-version-with-baselines.skip=false \
3737
-Djava.io.tmpdir=$WORKSPACE/tmp -Dproject.build.sourceEncoding=UTF-8 \
38-
-Dtycho.surefire.argLine="--add-modules ALL-SYSTEM -Dcompliance=1.8,11,17,21,24,25 -Djdt.performance.asserts=disabled" \
38+
-Dtycho.surefire.argLine="--add-modules ALL-SYSTEM -Dcompliance=1.8,11,17,21,25,26 -Djdt.performance.asserts=disabled" \
3939
-DDetectVMInstallationsJob.disabled=true \
4040
-Dtycho.apitools.debug \
4141
-Dtycho.debug.artifactcomparator \
55 Bytes
Binary file not shown.

org.eclipse.jdt.compiler.apt.tests/processors8/org/eclipse/jdt/compiler/apt/tests/processors/elements/Java9ElementProcessor.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
*
99
* SPDX-License-Identifier: EPL-2.0
1010
*
11+
* This is an implementation of an early-draft specification developed under the Java
12+
* Community Process (JCP) and is made available for testing and evaluation purposes
13+
* only. The code is not compatible with any specification of the JCP.
14+
*
1115
* Contributors:
1216
* IBM Corporation - initial API and implementation
1317
*******************************************************************************/
@@ -61,6 +65,7 @@ public class Java9ElementProcessor extends BaseProcessor {
6165
boolean reportSuccessAlready = true;
6266
RoundEnvironment roundEnv = null;
6367
Messager _messager = null;
68+
boolean isJre26;
6469
boolean isJre23;
6570
boolean isJre20;
6671
boolean isJre19;
@@ -99,8 +104,11 @@ public synchronized void init(ProcessingEnvironment processingEnv) {
99104
if (current >= ClassFileConstants.MAJOR_VERSION_20) {
100105
this.isJre20 = true;
101106
if (current >= ClassFileConstants.MAJOR_VERSION_23) {
102-
this.isJre23 = true;
103-
}
107+
this.isJre23 = true;
108+
if (current >= ClassFileConstants.MAJOR_VERSION_26) {
109+
this.isJre26 = true;
110+
}
111+
}
104112
}
105113
}
106114
}
@@ -507,7 +515,8 @@ public void testModuleJavaBase4() {
507515
assertNotNull("java.base module null", base);
508516
List<? extends Directive> directives = base.getDirectives();
509517
List<Directive> filterDirective = filterDirective(directives, DirectiveKind.USES);
510-
int modCount = (this.isJre11 || this.isJre12) ? 33 : (this.isJre18 ? (this.isJre20 ? (this.isJre23 ? 35 : 36) : 35) : 34);
518+
int modCount = (this.isJre26 ? 34 :
519+
(this.isJre11 || this.isJre12) ? 33 : (this.isJre18 ? (this.isJre20 ? (this.isJre23 ? 35 : 36) : 35) : 34));
511520
assertEquals("incorrect no of uses", modCount, filterDirective.size());
512521
}
513522
/*

org.eclipse.jdt.core.compiler.batch/.settings/.api_filters

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<component id="org.eclipse.jdt.core.compiler.batch" version="2">
3+
<resource path="META-INF/MANIFEST.MF">
4+
<filter id="931135546">
5+
<message_arguments>
6+
<message_argument value="3.44.100"/>
7+
<message_argument value="3.43.0"/>
8+
</message_arguments>
9+
</filter>
10+
</resource>
311
<resource path="src/org/eclipse/jdt/core/compiler/CategorizedProblem.java" type="org.eclipse.jdt.core.compiler.CategorizedProblem">
412
<filter comment="BETA_JAVA22 temporary issue" id="576725006">
513
<message_arguments>

org.eclipse.jdt.core.compiler.batch/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
33
Bundle-ManifestVersion: 2
44
Bundle-Name: Eclipse Compiler for Java(TM)
55
Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch
6-
Bundle-Version: 3.44.0.qualifier
6+
Bundle-Version: 3.44.100.qualifier
77
Bundle-ClassPath: .
88
Bundle-Vendor: Eclipse.org
99
Automatic-Module-Name: org.eclipse.jdt.core.compiler.batch

org.eclipse.jdt.core.compiler.batch/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<version>4.38.0-SNAPSHOT</version>
1818
</parent>
1919
<artifactId>org.eclipse.jdt.core.compiler.batch</artifactId>
20-
<version>3.44.0-SNAPSHOT</version>
20+
<version>3.44.100-SNAPSHOT</version>
2121
<packaging>eclipse-plugin</packaging>
2222

2323
<properties>

org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/batch/Main.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
*
99
* SPDX-License-Identifier: EPL-2.0
1010
*
11+
* This is an implementation of an early-draft specification developed under the Java
12+
* Community Process (JCP) and is made available for testing and evaluation purposes
13+
* only. The code is not compatible with any specification of the JCP.
14+
*
1115
* Contributors:
1216
* IBM Corporation - initial API and implementation
1317
* Tom Tromey - Contribution for bug 125961
@@ -3069,6 +3073,9 @@ private String optionStringToVersion(String currentArg) {
30693073
case "25": //$NON-NLS-1$
30703074
case "25.0": //$NON-NLS-1$
30713075
return CompilerOptions.VERSION_25;
3076+
case "26": //$NON-NLS-1$
3077+
case "26.0": //$NON-NLS-1$
3078+
return CompilerOptions.VERSION_26;
30723079
default:
30733080
return null;
30743081
}

org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/batch/messages.properties

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
#
99
# SPDX-License-Identifier: EPL-2.0
1010
#
11+
# This is an implementation of an early-draft specification developed under the Java
12+
# Community Process (JCP) and is made available for testing and evaluation purposes
13+
# only. The code is not compatible with any specification of the JCP.
14+
#
1115
# Contributors:
1216
# IBM Corporation - initial API and implementation
1317
# Benjamin Muskalla - Contribution for bug 239066
@@ -69,7 +73,7 @@ configure.unsupportedReleaseVersion = release version {0} is not supported
6973
configure.unsupportedComplianceVersion = compliance option {0} is no longer supported. Use {1} or later.
7074
configure.unsupportedSourceVersion = source option {0} is no longer supported. Use {1} or later.
7175
configure.unsupportedTargetVersion = target option {0} is no longer supported. Use {1} or later.
72-
configure.source = source level should be in ''1.8'',''9''...''25'' (or ''8.0''..''25.0''): {0}
76+
configure.source = source level should be in ''1.8'',''9''...''26'' (or ''8.0''..''26.0''): {0}
7377
configure.invalidSystem = invalid location for system libraries: {0}
7478
configure.unsupportedOption = option {0} not supported at compliance level 9 and above
7579
configure.duplicateOutputPath = duplicate output path specification: {0}
@@ -90,7 +94,7 @@ configure.invalidDebugOption = invalid debug option: {0}
9094
configure.invalidWarningConfiguration = invalid warning configuration: ''{0}''
9195
configure.invalidWarning = invalid warning token: ''{0}''. Ignoring warning and compiling
9296
configure.invalidWarningOption = invalid warning option: ''{0}''. Must specify a warning token
93-
configure.targetJDK = target level should be in ''1.8'',''9''...''25'' (or ''8.0''..''25.0''): {0}
97+
configure.targetJDK = target level should be in ''1.8'',''9''...''26'' (or ''8.0''..''26.0''): {0}
9498
configure.incompatibleTargetForSource = Target level ''{0}'' is incompatible with source level ''{1}''. A target level ''{1}'' or better is required
9599
configure.incompatibleComplianceForSource = Compliance level ''{0}'' is incompatible with source level ''{1}''. A compliance level ''{1}'' or better is required
96100
configure.incompatibleComplianceForTarget = Compliance level ''{0}'' is incompatible with target level ''{1}''. A compliance level ''{1}'' or better is required
@@ -261,9 +265,10 @@ misc.usage = {1} {2}\n\
261265
\ -23 -23.0 use 23 compliance (-source 23 -target 23)\n\
262266
\ -24 -24.0 use 24 compliance (-source 24 -target 24)\n\
263267
\ -25 -25.0 use 25 compliance (-source 25 -target 25)\n\
264-
\ -source <version> set source level: 1.8, 1.9, 10 to 25\n\
268+
\ -26 -26.0 use 26 compliance (-source 26 -target 26)\n\
269+
\ -source <version> set source level: 1.8, 1.9, 10 to 26\n\
265270
\ (or 8, 8.0, etc)\n\
266-
\ -target <version> set classfile target: 1.8, 1.9, 10 to 25\n\
271+
\ -target <version> set classfile target: 1.8, 1.9, 10 to 26\n\
267272
\ (or 8, 8.0, etc)\n\
268273
\ --enable-preview enable support for preview features of the\n\
269274
\ latest Java release\n\

org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
*
99
* SPDX-License-Identifier: EPL-2.0
1010
*
11+
* This is an implementation of an early-draft specification developed under the Java
12+
* Community Process (JCP) and is made available for testing and evaluation purposes
13+
* only. The code is not compatible with any specification of the JCP.
14+
*
1115
* Contributors:
1216
* IBM Corporation - initial API and implementation
1317
* Jesper S Moller - Contributions for
@@ -145,7 +149,7 @@ public interface ClassFileConstants {
145149
int MAJOR_VERSION_26 = 70;
146150

147151
int MAJOR_VERSION_0 = 44;
148-
int MAJOR_LATEST_VERSION = MAJOR_VERSION_25;
152+
int MAJOR_LATEST_VERSION = MAJOR_VERSION_26;
149153

150154
int MINOR_VERSION_0 = 0;
151155
int MINOR_VERSION_1 = 1;

0 commit comments

Comments
 (0)