diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b3f1c83e..97a1caaa 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -16,13 +16,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- - name: Set up JDK 11
- uses: actions/setup-java@v1
+ - name: Set up JDKs
+ uses: actions/setup-java@v4
with:
- java-version: 11
- - name: Set up JDK 8
- uses: actions/setup-java@v1
- with:
- java-version: 8
+ distribution: temurin
+ java-version: |
+ 11
+ 17
+ 21
- name: Build with Maven
- run: JAVA_HOME=$JAVA_HOME_11_X64 mvn verify -Djava8.home=$JAVA_HOME_8_X64
+ run: mvn verify -ntp -B -Djava11.home=$JAVA_HOME_11_X64 -Djava17.home=$JAVA_HOME_17_X64
diff --git a/build-include-jdk-misc b/build-release-11
similarity index 100%
rename from build-include-jdk-misc
rename to build-release-11
diff --git a/build-test-java8 b/build-test-java17
similarity index 100%
rename from build-test-java8
rename to build-test-java17
diff --git a/build-test-java21 b/build-test-java21
new file mode 100644
index 00000000..e69de29b
diff --git a/pom.xml b/pom.xml
index eb7dc8e8..d3bb563f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
org.jboss
jboss-parent
- 39
+ 43
@@ -63,8 +63,7 @@
false
false
- 9
- --release=8
+ 11
diff --git a/src/main/java/org/jboss/threads/JDKSpecific.java b/src/main/java/org/jboss/threads/JDKSpecific.java
index 9af664bd..fc15ae22 100644
--- a/src/main/java/org/jboss/threads/JDKSpecific.java
+++ b/src/main/java/org/jboss/threads/JDKSpecific.java
@@ -1,29 +1,17 @@
package org.jboss.threads;
-import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalUnit;
import java.util.concurrent.TimeUnit;
-import org.wildfly.common.Assert;
-
/**
*/
final class JDKSpecific {
static TemporalUnit timeToTemporal(final TimeUnit timeUnit) {
- switch (timeUnit) {
- case NANOSECONDS: return ChronoUnit.NANOS;
- case MICROSECONDS: return ChronoUnit.MICROS;
- case MILLISECONDS: return ChronoUnit.MILLIS;
- case SECONDS: return ChronoUnit.SECONDS;
- case MINUTES: return ChronoUnit.MINUTES;
- case HOURS: return ChronoUnit.HOURS;
- case DAYS: return ChronoUnit.DAYS;
- default: throw Assert.impossibleSwitchCase(timeUnit);
- }
+ return timeUnit.toChronoUnit();
}
static void onSpinWait() {
- // no operation
+ Thread.onSpinWait();
}
}
diff --git a/src/main/java9/org/jboss/threads/JDKSpecific.java b/src/main/java9/org/jboss/threads/JDKSpecific.java
deleted file mode 100644
index fc15ae22..00000000
--- a/src/main/java9/org/jboss/threads/JDKSpecific.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.jboss.threads;
-
-import java.time.temporal.TemporalUnit;
-import java.util.concurrent.TimeUnit;
-
-/**
- */
-final class JDKSpecific {
-
- static TemporalUnit timeToTemporal(final TimeUnit timeUnit) {
- return timeUnit.toChronoUnit();
- }
-
- static void onSpinWait() {
- Thread.onSpinWait();
- }
-}