Skip to content

Commit f518c76

Browse files
committed
cleanups
1 parent bf57e51 commit f518c76

File tree

9 files changed

+7
-78
lines changed

9 files changed

+7
-78
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1313
### Removed
1414

1515
* `IOUtil#copy(Reader, Writer)` has been removed. Use `Reader#transferTo(Writer)` instead.
16+
* `JVMUtil` has been removed. Use `Runtime.version().feature()` for its previously (only) provided method.
1617

1718

1819
## [0.12.1] - 2025-03-11

commons/util/src/main/java/module-info.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,4 @@
5050
exports net.automatalib.common.util.ref;
5151
exports net.automatalib.common.util.setting;
5252
exports net.automatalib.common.util.string;
53-
exports net.automatalib.common.util.system;
5453
}

commons/util/src/main/java/net/automatalib/common/util/system/JVMUtil.java

Lines changed: 0 additions & 53 deletions
This file was deleted.

examples/pom.xml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,6 @@ limitations under the License.
137137
</systemPropertyVariables>
138138
</configuration>
139139
</plugin>
140-
<plugin>
141-
<groupId>org.apache.maven.plugins</groupId>
142-
<artifactId>maven-enforcer-plugin</artifactId>
143-
<configuration>
144-
<rules>
145-
<enforceBytecodeVersion>
146-
<excludes>
147-
<exclude>ch.qos.logback:*</exclude>
148-
</excludes>
149-
</enforceBytecodeVersion>
150-
</rules>
151-
</configuration>
152-
</plugin>
153140
</plugins>
154141
</pluginManagement>
155142
</build>

examples/src/test/java/net/automatalib/example/ExamplesTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import javax.swing.SwingUtilities;
2626

27-
import net.automatalib.common.util.system.JVMUtil;
2827
import net.automatalib.example.ads.ADSExample;
2928
import net.automatalib.example.brics.SimpleBricsExample;
3029
import net.automatalib.example.dot.DOTExample;
@@ -152,7 +151,7 @@ public void testOneSEVPAExample() throws InvocationTargetException, InterruptedE
152151
}
153152

154153
private static boolean isJVMCompatible() {
155-
return JVMUtil.getCanonicalSpecVersion() == 11;
154+
return Runtime.version().feature() == 11;
156155
}
157156

158157
private static void requireJVMCompatibility() {

visualization/dot-visualizer/src/test/java/net/automatalib/visualization/dot/DOTDialogListener.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
package net.automatalib.visualization.dot;
1717

18-
import net.automatalib.common.util.system.JVMUtil;
1918
import org.assertj.swing.testng.testcase.AssertJSwingTestngTestCase;
2019
import org.testng.IInvokedMethod;
2120
import org.testng.IInvokedMethodListener;
@@ -30,7 +29,7 @@ public class DOTDialogListener implements IInvokedMethodListener {
3029

3130
@Override
3231
public void beforeInvocation(IInvokedMethod method, ITestResult testResult) {
33-
if (!(DOT.checkUsable() && JVMUtil.getCanonicalSpecVersion() == 11)) {
32+
if (!(DOT.checkUsable() && Runtime.version().feature() == 11)) {
3433
testResult.setThrowable(new SkipException(
3534
"Either DOT is not available or the headless AWT environment is not supported"));
3635
testResult.setStatus(ITestResult.SKIP);

visualization/dot-visualizer/src/test/java/net/automatalib/visualization/dot/DOTMultiDialogTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import javax.swing.SwingUtilities;
2626

2727
import net.automatalib.common.util.Pair;
28-
import net.automatalib.common.util.system.JVMUtil;
2928
import org.testng.SkipException;
3029
import org.testng.annotations.BeforeClass;
3130
import org.testng.annotations.Test;
@@ -44,7 +43,7 @@ public void checkDOT() {
4443
@Test(timeOut = 30000)
4544
public void testFrame() throws InvocationTargetException, InterruptedException {
4645

47-
if (!(JVMUtil.getCanonicalSpecVersion() == 11)) {
46+
if (!(Runtime.version().feature() == 11)) {
4847
throw new SkipException("The headless AWT environment currently only works with Java 11 or <=8");
4948
}
5049

@@ -68,7 +67,7 @@ public void testFrame() throws InvocationTargetException, InterruptedException {
6867
@Test(timeOut = 30000)
6968
public void testEmptyFrame() throws InvocationTargetException, InterruptedException {
7069

71-
if (!(JVMUtil.getCanonicalSpecVersion() == 11)) {
70+
if (!(Runtime.version().feature() == 11)) {
7271
throw new SkipException("The headless AWT environment currently only works with Java 11 or <=8");
7372
}
7473

visualization/dot-visualizer/src/test/java/net/automatalib/visualization/dot/ProviderTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import javax.swing.SwingUtilities;
2222

2323
import net.automatalib.automaton.fsa.impl.CompactDFA;
24-
import net.automatalib.common.util.system.JVMUtil;
2524
import net.automatalib.visualization.VPManager;
2625
import net.automatalib.visualization.Visualization;
2726
import net.automatalib.visualization.VisualizationProvider;
@@ -58,7 +57,7 @@ public void testProviderConfiguration() {
5857
@Test(dependsOnMethods = "testProviderConfiguration", timeOut = 10000)
5958
public void testDisplay() throws InterruptedException, InvocationTargetException {
6059

61-
if (!(JVMUtil.getCanonicalSpecVersion() == 11)) {
60+
if (!(Runtime.version().feature() == 11)) {
6261
throw new SkipException("The headless AWT environment currently only works with Java 11 or <=8");
6362
}
6463

visualization/jung-visualizer/src/test/java/net/automatalib/visualization/jung/ProviderTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
import net.automatalib.alphabet.impl.Alphabets;
2525
import net.automatalib.automaton.fsa.impl.CompactDFA;
26-
import net.automatalib.common.util.system.JVMUtil;
2726
import net.automatalib.util.automaton.random.RandomAutomata;
2827
import net.automatalib.visualization.VPManager;
2928
import net.automatalib.visualization.Visualization;
@@ -50,7 +49,7 @@ public void testProviderConfiguration() {
5049
@Test(dependsOnMethods = "testProviderConfiguration", timeOut = 30000)
5150
public void testDisplay() throws InterruptedException, InvocationTargetException {
5251

53-
if (!(JVMUtil.getCanonicalSpecVersion() == 11)) {
52+
if (!(Runtime.version().feature() == 11)) {
5453
throw new SkipException("The headless AWT environment currently only works with Java 11 or <=8");
5554
}
5655

0 commit comments

Comments
 (0)