Skip to content

Commit

Permalink
Require JDK 11 or later
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlloyd committed Feb 13, 2024
1 parent 56ebd23 commit 4f56a68
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 42 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -Djava11.home=$JAVA_HOME_11_X64 -Djava17.home=$JAVA_HOME_17_X64
File renamed without changes.
File renamed without changes.
Empty file added build-test-java21
Empty file.
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
<version>39</version>
<version>43</version>
</parent>

<issueManagement>
Expand Down Expand Up @@ -63,8 +63,7 @@
<jboss.threads.eqe.unlimited-queue>false</jboss.threads.eqe.unlimited-queue>
<jboss.threads.eqe.register-mbean>false</jboss.threads.eqe.register-mbean>

<jdk.min.version>9</jdk.min.version>
<javadoc.additional.params>--release=8</javadoc.additional.params>
<jdk.min.version>11</jdk.min.version>
</properties>

<dependencies>
Expand Down
16 changes: 2 additions & 14 deletions src/main/java/org/jboss/threads/JDKSpecific.java
Original file line number Diff line number Diff line change
@@ -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();
}
}
17 changes: 0 additions & 17 deletions src/main/java9/org/jboss/threads/JDKSpecific.java

This file was deleted.

0 comments on commit 4f56a68

Please sign in to comment.