Skip to content

Commit

Permalink
Merge pull request #3370 from hazendaz/next
Browse files Browse the repository at this point in the history
Raise to 3.6.0 snapshot and require java 11
  • Loading branch information
hazendaz authored Jan 1, 2025
2 parents d70d2c2 + 0947d13 commit 6e80e3d
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 18 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.5.19-SNAPSHOT</version>
<version>3.6.0-SNAPSHOT</version>

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

<properties>
<!-- Java Usage -->
<java.version>8</java.version>
<java.release.version>8</java.release.version>
<java.version>11</java.version>
<java.release.version>11</java.release.version>

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

<!-- Reproducible Builds -->
<project.build.outputTimestamp>1735702000</project.build.outputTimestamp>
<project.build.outputTimestamp>1735704225</project.build.outputTimestamp>
</properties>

<dependencies>
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/org/apache/ibatis/io/DefaultVFS.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
Expand Down Expand Up @@ -278,11 +277,7 @@ protected URL findJarForResource(URL url) throws MalformedURLException {

// File name might be URL-encoded
if (!file.exists()) {
try {
file = new File(URLEncoder.encode(jarUrl.toString(), StandardCharsets.UTF_8.name()));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("Unsupported encoding? UTF-8? That's impossible.");
}
file = new File(URLEncoder.encode(jarUrl.toString(), StandardCharsets.UTF_8));
}

if (file.exists()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2023 the original author or authors.
* Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2022 the original author or authors.
* Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2024 the original author or authors.
* Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2024 the original author or authors.
* Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.ibatis.scripting.xmltags;

import static org.assertj.core.api.Assertions.*;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;

import java.lang.reflect.Field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void returnNotNullOnAnnotation() {
Mapper mapper = sqlSession.getMapper(Mapper.class);
Optional<User> user = mapper.getUserUsingAnnotation(1);
assertTrue(user.isPresent());
assertEquals("User1", user.get().getName());
assertEquals("User1", user.orElseThrow().getName());
}
}

Expand All @@ -83,7 +83,7 @@ void returnNotNullOnXml() {
Mapper mapper = sqlSession.getMapper(Mapper.class);
Optional<User> user = mapper.getUserUsingXml(2);
assertTrue(user.isPresent());
assertEquals("User2", user.get().getName());
assertEquals("User2", user.orElseThrow().getName());
}
}

Expand Down

0 comments on commit 6e80e3d

Please sign in to comment.