Skip to content

Commit 33e37ae

Browse files
authored
Merge pull request #449 from harawata/java-24-compat
Compatibility with Java 24
2 parents 91bd882 + fb31889 commit 33e37ae

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2010-2024 the original author or authors.
4+
Copyright 2010-2025 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -206,7 +206,7 @@
206206
<profile>
207207
<id>security-manager</id>
208208
<activation>
209-
<jdk>[18,)</jdk>
209+
<jdk>[18,24)</jdk>
210210
</activation>
211211
<properties>
212212
<argLine>-Djava.security.manager=allow</argLine>

src/test/java/org/apache/ibatis/migration/MigratorTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import org.junit.jupiter.api.Order;
4646
import org.junit.jupiter.api.Test;
4747
import org.junit.jupiter.api.TestMethodOrder;
48+
import org.junit.jupiter.api.condition.EnabledForJreRange;
4849

4950
import uk.org.webcompere.systemstubs.SystemStubs;
5051

@@ -307,6 +308,7 @@ void testUndoScriptCommand() throws Exception {
307308
assertTrue(output.contains("-- @UNDO"));
308309
}
309310

311+
@EnabledForJreRange(maxVersion = 23)
310312
@Test
311313
void shouldScriptCommandFailIfSameVersion() throws Exception {
312314
String output = SystemStubs.tapSystemOut(() -> {
@@ -435,6 +437,7 @@ void shouldColorizeSuccessOutputIfColorOptionEnabled() throws Throwable {
435437
assertTrue(TestUtil.deleteDirectory(basePath), "delete temp dir");
436438
}
437439

440+
@EnabledForJreRange(maxVersion = 23)
438441
@Test
439442
void shouldColorizeFailureOutputIfColorOptionEnabled() throws Throwable {
440443
System.setProperty("migrationsHome", TestUtil.getTempDir().getAbsolutePath());
@@ -449,6 +452,7 @@ void shouldColorizeFailureOutputIfColorOptionEnabled() throws Throwable {
449452
assertTrue(TestUtil.deleteDirectory(basePath), "delete temp dir");
450453
}
451454

455+
@EnabledForJreRange(maxVersion = 23)
452456
@Test
453457
void shouldShowErrorOnMissingChangelog() throws Throwable {
454458
// gh-220

src/test/java/org/apache/ibatis/migration/hook/NewHookTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.apache.ibatis.migration.utils.TestUtil;
3434
import org.apache.ibatis.migration.utils.Util;
3535
import org.junit.jupiter.api.Test;
36+
import org.junit.jupiter.api.condition.EnabledForJreRange;
3637

3738
import uk.org.webcompere.systemstubs.SystemStubs;
3839

@@ -55,6 +56,7 @@ void shouldRunNewHooks() throws Throwable {
5556
assertTrue(TestUtil.deleteDirectory(basePath), "delete test dir");
5657
}
5758

59+
@EnabledForJreRange(maxVersion = 23)
5860
@Test
5961
void shouldNotCreateFileWhenBeforeHookThrowsException() throws Throwable {
6062
File basePath = initBaseDir();

0 commit comments

Comments
 (0)