-
Notifications
You must be signed in to change notification settings - Fork 172
Add Java 21 Compilation Support #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,7 @@ | ||||||||||||||||||||||||
| # This workflow will build the project on pull requests with tests | ||||||||||||||||||||||||
| # Uses: | ||||||||||||||||||||||||
| # OS: ubuntu-latest | ||||||||||||||||||||||||
| # JDK: Adopt JDK 8 | ||||||||||||||||||||||||
| # JDK: Adopt JDK 21 | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| name: PR Builder | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
@@ -18,11 +18,11 @@ jobs: | |||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||
| - uses: actions/checkout@v3 | ||||||||||||||||||||||||
| - name: Set up Adopt JDK 8 | ||||||||||||||||||||||||
| uses: actions/setup-java@v3 | ||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||
| - name: Set up Adopt JDK 21 | ||||||||||||||||||||||||
| uses: actions/setup-java@v4 | ||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||
| java-version: "8" | ||||||||||||||||||||||||
| java-version: 21 | ||||||||||||||||||||||||
| distribution: "adopt" | ||||||||||||||||||||||||
|
Comment on lines
+22
to
26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same Same as in 🐛 Proposed fix- - name: Set up Adopt JDK 21
- uses: actions/setup-java@v4
+ - name: Set up Temurin JDK 21
+ uses: actions/setup-java@v4
with:
java-version: 21
- distribution: "adopt"
+ distribution: "temurin"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||
| - name: Cache local Maven repository | ||||||||||||||||||||||||
| id: cache-maven-m2 | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,6 @@ | |
| import java.lang.reflect.Constructor; | ||
| import java.lang.reflect.Field; | ||
| import java.lang.reflect.InvocationTargetException; | ||
| import java.util.HashMap; | ||
| import java.util.Map; | ||
|
|
||
| import static org.testng.Assert.assertEquals; | ||
|
|
@@ -163,26 +162,32 @@ void setUp() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodEx | |
| constructor.setAccessible(true); | ||
| SCIMSystemSchemaExtensionBuilder newBuilderInstance = constructor.newInstance(); | ||
|
|
||
| resetSingletonField("EXTENSION_ROOT_ATTRIBUTE_URI", SYSTEM_USER_SCHEMA_URI); | ||
| resetSingletonField("instance", newBuilderInstance); | ||
| resetSingletonField("extensionConfig", new HashMap<>()); | ||
| resetSingletonField("attributeSchemas", new HashMap<>()); | ||
| setStaticField("instance", newBuilderInstance); | ||
| clearStaticMapField("extensionConfig"); | ||
| clearStaticMapField("attributeSchemas"); | ||
|
|
||
| setInstanceField("extensionSchema", null); | ||
| setInstanceField("extensionRootAttributeName", null); | ||
| } | ||
|
|
||
| private void resetSingletonField(String fieldName, Object newValue) throws NoSuchFieldException, | ||
| IllegalAccessException { | ||
| @SuppressWarnings("unchecked") | ||
| private void clearStaticMapField(String fieldName) throws NoSuchFieldException, IllegalAccessException { | ||
|
|
||
| Field field = SCIMSystemSchemaExtensionBuilder.class.getDeclaredField(fieldName); | ||
| field.setAccessible(true); | ||
| ((Map<?, ?>) field.get(null)).clear(); | ||
| } | ||
|
Comment on lines
+173
to
+179
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential
🛡️ Proposed fix private void clearStaticMapField(String fieldName) throws NoSuchFieldException, IllegalAccessException {
Field field = SCIMSystemSchemaExtensionBuilder.class.getDeclaredField(fieldName);
field.setAccessible(true);
- ((Map<?, ?>) field.get(null)).clear();
+ Map<?, ?> map = (Map<?, ?>) field.get(null);
+ if (map != null) {
+ map.clear();
+ }
}🤖 Prompt for AI Agents |
||
|
|
||
| Field modifiersField = Field.class.getDeclaredField("modifiers"); | ||
| modifiersField.setAccessible(true); | ||
| modifiersField.setInt(field, field.getModifiers() & ~java.lang.reflect.Modifier.FINAL); | ||
| private void setStaticField(String fieldName, Object newValue) throws NoSuchFieldException, | ||
| IllegalAccessException { | ||
|
|
||
| field.set(null, newValue); | ||
| Field unsafeField = sun.misc.Unsafe.class.getDeclaredField("theUnsafe"); | ||
| unsafeField.setAccessible(true); | ||
| sun.misc.Unsafe unsafe = (sun.misc.Unsafe) unsafeField.get(null); | ||
|
|
||
| Field field = SCIMSystemSchemaExtensionBuilder.class.getDeclaredField(fieldName); | ||
| long offset = unsafe.staticFieldOffset(field); | ||
| unsafe.putObject(SCIMSystemSchemaExtensionBuilder.class, offset, newValue); | ||
| } | ||
|
Comment on lines
+181
to
191
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's look at the full test file to understand the context and check line 113
cd modules/charon-core && find . -name "SCIMSystemSchemaExtensionBuilderTest.java" -type fRepository: wso2/charon Length of output: 141 🌐 Web query:
💡 Result: In Java 21 (JDK 21), JEP 471 is not present—so there is no new “deprecated for removal” change in What JEP 471 actually does (and when):
Related follow-up:
Sources: 🌐 Web query:
💡 Result: To test that a import static org.junit.jupiter.api.Assertions.*;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import org.junit.jupiter.api.Test;
class VarHandleStaticFinalTest {
static class C {
static final int X = 1;
}
`@Test`
void cannotSetStaticFinalViaVarHandle() throws Throwable {
VarHandle vh = MethodHandles.lookup()
.findStaticVarHandle(C.class, "X", int.class); // ok to obtain [2]
assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.SET)); // final => no write modes [1][2]
assertThrows(UnsupportedOperationException.class, () -> vh.set(2)); // write throws UOE [1]
assertEquals(1, (int) vh.get()); // reads still work [1]
}
}Notes
Sources: VarHandle spec (final fields are read-only for VarHandle write/update modes) [1]; 🏁 Script executed: # Read the test file to check line 113 and the full context of the methods
cat -n modules/charon-core/src/test/java/org/wso2/charon3/core/config/SCIMSystemSchemaExtensionBuilderTest.java | sed -n '100,200p'Repository: wso2/charon Length of output: 5543 Fix assertion message on line 113 — expected size is 3, not 2. Line 113 states Regarding 🤖 Prompt for AI Agents |
||
|
|
||
| private void setInstanceField(String fieldName, Object value) throws NoSuchFieldException, | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -128,8 +128,8 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </dependency> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <dependency> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <groupId>org.mockito</groupId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <artifactId>mockito-inline</artifactId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <version>${mockito.version}</version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <artifactId>mockito-core</artifactId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <version>${mockito-core.version}</version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <scope>test</scope> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </dependency> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <dependency> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -239,6 +239,27 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <SCM-Revision>${buildNumber}</SCM-Revision> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </instructions> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </configuration> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </plugin> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <plugin> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <groupId>com.github.spotbugs</groupId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <artifactId>spotbugs-maven-plugin</artifactId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <version>${spotbugs-maven-plugin.version}</version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <configuration> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <effort>Max</effort> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <threshold>Low</threshold> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <failOnError>true</failOnError> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <maxHeap>1024</maxHeap> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </configuration> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <executions> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <execution> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <id>analyze-compile</id> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <phase>compile</phase> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <goals> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <goal>check</goal> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </goals> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </execution> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </executions> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </plugin> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <plugin> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <groupId>org.codehaus.mojo</groupId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -328,6 +349,24 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <plugin> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <groupId>org.codehaus.mojo</groupId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <artifactId>buildnumber-maven-plugin</artifactId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </plugin> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <plugin> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <groupId>org.codehaus.mojo</groupId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <artifactId>findbugs-maven-plugin</artifactId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <executions> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <execution> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <id>analyze-compile</id> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <phase>none</phase> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </execution> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <execution> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <id>findbugs</id> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <phase>none</phase> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </execution> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </executions> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+353
to
+365
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FindBugs disabled correctly, but SpotBugs is not activated in The ♻️ Proposed fix — activate SpotBugs in build/plugins <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<executions>
<execution>
<id>analyze-compile</id>
<phase>none</phase>
</execution>
<execution>
<id>findbugs</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>com.github.spotbugs</groupId>
+ <artifactId>spotbugs-maven-plugin</artifactId>
+ </plugin>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </plugin> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <plugin> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <groupId>com.github.spotbugs</groupId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <artifactId>spotbugs-maven-plugin</artifactId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </plugin> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <plugin> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <groupId>org.jacoco</groupId> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -410,29 +449,29 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <compiler.plugin.version>3.8.1</compiler.plugin.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <war.plugin.version>3.2.3</war.plugin.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <bundle.plugin.version>4.2.0</bundle.plugin.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <bundle.plugin.version>5.1.9</bundle.plugin.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <maven.buildnumber.plugin.version>1.4</maven.buildnumber.plugin.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <src.java.version>1.8</src.java.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <target.java.version>1.8</target.java.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <src.java.version>21</src.java.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <target.java.version>21</target.java.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <msf4j.version>2.7.3</msf4j.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <fasterxml.jackson.core.version>2.12.6.1</fasterxml.jackson.core.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <commons.lang.version>2.6</commons.lang.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <commons-lang.wso2.osgi.version.range>[2.6.0, 3.0.0)</commons-lang.wso2.osgi.version.range> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <slf4j.version>1.7.26</slf4j.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <maven.findbugsplugin.version>3.0.4</maven.findbugsplugin.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <spotbugs-maven-plugin.version>4.9.8.2</spotbugs-maven-plugin.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <maven.surefire.plugin.version>2.22.0</maven.surefire.plugin.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <!-- Pax Logging Version --> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <pax.logging.api.version>1.10.1</pax.logging.api.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <log4j.api.version>2.12.0</log4j.api.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <testng.version>6.9.10</testng.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <jacoco.version>0.8.6</jacoco.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <mockito.version>3.10.0</mockito.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <jacoco.version>0.8.12</jacoco.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <mockito-core.version>5.3.1</mockito-core.version> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+473
to
+474
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate The ♻️ Proposed fix — remove the duplicate <jacoco.version>0.8.12</jacoco.version>
<mockito-core.version>5.3.1</mockito-core.version>
<sonar.projectKey>wso2_charon</sonar.projectKey>
<sonar.moduleKey>${artifactId}</sonar.moduleKey>
<sonar.organization>wso2</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
-
- <jacoco.version>0.8.12</jacoco.version>
</properties>Also applies to: 477-477 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <sonar.projectKey>wso2_charon</sonar.projectKey> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <sonar.moduleKey>${artifactId}</sonar.moduleKey> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <!-- | ||
| ~ Copyright (c) 2026, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | ||
| ~ | ||
| ~ WSO2 Inc. licenses this file to you under the Apache License, | ||
| ~ Version 2.0 (the "License"); you may not use this file except | ||
| ~ in compliance with the License. | ||
| ~ You may obtain a copy of the License at | ||
| ~ | ||
| ~ http://www.apache.org/licenses/LICENSE-2.0 | ||
| ~ | ||
| ~ Unless required by applicable law or agreed to in writing, | ||
| ~ software distributed under the License is distributed on an | ||
| ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| ~ KIND, either express or implied. See the License for the | ||
| ~ specific language governing permissions and limitations | ||
| ~ under the License. | ||
| --> | ||
|
|
||
| <FindBugsFilter> | ||
| <!-- Exclude generated parser code --> | ||
| <Match> | ||
| <Package name="org.wso2.charon3.core.aParser" /> | ||
| </Match> | ||
|
|
||
| <Match> | ||
| <Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2" /> | ||
| </Match> | ||
|
|
||
| <Match> | ||
| <Bug pattern="MS_EXPOSE_REP" /> | ||
| </Match> | ||
|
|
||
| <Match> | ||
| <Bug pattern="CT_CONSTRUCTOR_THROW" /> | ||
| </Match> | ||
|
|
||
| <Match> | ||
| <Bug pattern="REFLC_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_CLASS" /> | ||
| </Match> | ||
|
|
||
| <Match> | ||
| <Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" /> | ||
| </Match> | ||
| </FindBugsFilter> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
actions/setup-java adopt distribution JDK 21 support💡 Result:
actions/setup-javastill acceptsdistribution: adopt/adopt-hotspot(andadopt-openj9), but AdoptOpenJDK is no longer updated (it moved to Eclipse Adoptium), so you should not rely on it for JDK 21—usetemurinfor HotSpot JDK 21 (orsemerufor OpenJ9) instead. [1], [2]Example:
Optional (dependency caching + always fetch latest matching JDK build): (github.com)
Citations:
Change
adoptdistribution totemurin—JDK 21 is not available from AdoptOpenJDK.AdoptOpenJDK is no longer maintained and has not released builds since JDK 16. JDK 21 is only available from Eclipse Temurin (the Adoptium successor). The workflow will fail trying to locate JDK 21 with the
adoptdistribution.🐛 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents