Skip to content

Commit

Permalink
Eclipse 4.26 (RC1) JDT Patch for Groovy-Eclipse
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Nov 19, 2022
1 parent 200038a commit b170a90
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion groovy-eclipse.setup
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
<repository
url="https://download.eclipse.org/technology/m2e/releases/1.20.1"/>
<repository
url="https://download.eclipse.org/eclipse/updates/4.26-I-builds/I20221109-1850"/>
url="https://download.eclipse.org/eclipse/updates/4.26-I-builds/I20221117-1330"/>
</repositoryList>
<repositoryList
name="2022-09">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,14 +445,8 @@ protected void printProblems() {
printProblemsFor(env.getWorkspaceRootPath());
}

protected void printProblemsFor(IPath root) {
printProblemsFor(new IPath[] { root });
}

protected void printProblemsFor(IPath[] roots) {
for (int i = 0; i < roots.length; i++) {
IPath path = roots[i];

protected void printProblemsFor(IPath... roots) {
for (IPath path : roots) {
/* get the leaf problems for this type */
Problem[] problems = env.getProblemsFor(path);
System.out.println(arrayToString(problems));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void testGetNewJrtFileSystem() {
Object jrtSystem2 = JRTUtil.getJrtSystem(this.image, String.valueOf(majorVersionSegment));
assertSame(jrtSystem, jrtSystem2);

jrtSystem2 = JRTUtil.getJrtSystem(this.image, String.valueOf(--majorVersionSegment));
jrtSystem2 = JRTUtil.getJrtSystem(this.image, String.valueOf(majorVersionSegment-2));
assertNotSame(jrtSystem, jrtSystem2);

Object jrtSystem3 = JRTUtil.getJrtSystem(this.image);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,15 @@ static void initReflectionVersion() {
public static int getPossibleComplianceLevels() {
if (possibleComplianceLevels == UNINITIALIZED) {
String specVersion = System.getProperty("java.specification.version");
// During the EA phase of development, the above property is set to the
// latest version, for e.g. "20", but the java.version that will be tested
// inside initReflectionVersion() later on will be of the format "20-ea" thus
// causing an exception. The following code will ensure that we ignore such cases
// until the latest version has been properly added in CompilerOptions.
int spec = Integer.parseInt(specVersion);
if (spec > Integer.parseInt(CompilerOptions.getLatestVersion())) {
specVersion = CompilerOptions.getLatestVersion();
}
isJRE19Plus = CompilerOptions.VERSION_19.equals(specVersion);
isJRE18Plus = isJRE19Plus || CompilerOptions.VERSION_18.equals(specVersion);
isJRE17Plus = isJRE18Plus || CompilerOptions.VERSION_17.equals(specVersion);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<repository>
<id>milestone</id>
<layout>p2</layout>
<url>https://download.eclipse.org/eclipse/updates/4.26-I-builds/I20221109-1850</url>
<url>https://download.eclipse.org/eclipse/updates/4.26-I-builds/I20221117-1330</url>
</repository>
</repositories>
<modules>
Expand Down

0 comments on commit b170a90

Please sign in to comment.