Skip to content

Commit 6e80e3d

Browse files
authored
Merge pull request mybatis#3370 from hazendaz/next
Raise to 3.6.0 snapshot and require java 11
2 parents d70d2c2 + 0947d13 commit 6e80e3d

File tree

7 files changed

+12
-18
lines changed

7 files changed

+12
-18
lines changed

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<groupId>org.mybatis</groupId>
3131
<artifactId>mybatis</artifactId>
32-
<version>3.5.19-SNAPSHOT</version>
32+
<version>3.6.0-SNAPSHOT</version>
3333

3434
<name>mybatis</name>
3535
<description>The MyBatis SQL mapper framework makes it easier to use a relational database with object-oriented
@@ -64,8 +64,8 @@
6464

6565
<properties>
6666
<!-- Java Usage -->
67-
<java.version>8</java.version>
68-
<java.release.version>8</java.release.version>
67+
<java.version>11</java.version>
68+
<java.release.version>11</java.release.version>
6969

7070
<!-- Override impsort comliance to 17 (remove after parent 49 release) -->
7171
<impsort.compliance>17</impsort.compliance>
@@ -99,7 +99,7 @@
9999
<argLine>-Xmx2048m -javaagent:${settings.localRepository}/net/bytebuddy/byte-buddy-agent/${byte-buddy.version}/byte-buddy-agent-${byte-buddy.version}.jar</argLine>
100100

101101
<!-- Reproducible Builds -->
102-
<project.build.outputTimestamp>1735702000</project.build.outputTimestamp>
102+
<project.build.outputTimestamp>1735704225</project.build.outputTimestamp>
103103
</properties>
104104

105105
<dependencies>

src/main/java/org/apache/ibatis/io/DefaultVFS.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.io.IOException;
2222
import java.io.InputStream;
2323
import java.io.InputStreamReader;
24-
import java.io.UnsupportedEncodingException;
2524
import java.net.MalformedURLException;
2625
import java.net.URL;
2726
import java.net.URLEncoder;
@@ -278,11 +277,7 @@ protected URL findJarForResource(URL url) throws MalformedURLException {
278277

279278
// File name might be URL-encoded
280279
if (!file.exists()) {
281-
try {
282-
file = new File(URLEncoder.encode(jarUrl.toString(), StandardCharsets.UTF_8.name()));
283-
} catch (UnsupportedEncodingException e) {
284-
throw new RuntimeException("Unsupported encoding? UTF-8? That's impossible.");
285-
}
280+
file = new File(URLEncoder.encode(jarUrl.toString(), StandardCharsets.UTF_8));
286281
}
287282

288283
if (file.exists()) {

src/main/java/org/apache/ibatis/scripting/xmltags/ForEachSqlNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/org/apache/ibatis/scripting/xmltags/IfSqlNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2022 the original author or authors.
2+
* Copyright 2009-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/org/apache/ibatis/scripting/xmltags/XMLScriptBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/test/java/org/apache/ibatis/scripting/xmltags/XMLScriptBuilderTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2024 the original author or authors.
2+
* Copyright 2009-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,10 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
1716
package org.apache.ibatis.scripting.xmltags;
1817

19-
import static org.assertj.core.api.Assertions.*;
18+
import static org.assertj.core.api.Assertions.assertThat;
2019
import static org.junit.Assert.assertEquals;
2120

2221
import java.lang.reflect.Field;

src/test/java/org/apache/ibatis/submitted/optional_on_mapper_method/OptionalOnMapperMethodTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void returnNotNullOnAnnotation() {
6464
Mapper mapper = sqlSession.getMapper(Mapper.class);
6565
Optional<User> user = mapper.getUserUsingAnnotation(1);
6666
assertTrue(user.isPresent());
67-
assertEquals("User1", user.get().getName());
67+
assertEquals("User1", user.orElseThrow().getName());
6868
}
6969
}
7070

@@ -83,7 +83,7 @@ void returnNotNullOnXml() {
8383
Mapper mapper = sqlSession.getMapper(Mapper.class);
8484
Optional<User> user = mapper.getUserUsingXml(2);
8585
assertTrue(user.isPresent());
86-
assertEquals("User2", user.get().getName());
86+
assertEquals("User2", user.orElseThrow().getName());
8787
}
8888
}
8989

0 commit comments

Comments
 (0)