Skip to content

Commit e0a5437

Browse files
committed
[ci] Use jdk 11 style charset
1 parent 236c860 commit e0a5437

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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()) {

0 commit comments

Comments
 (0)