File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
main/java/org/apache/ibatis/io
test/java/org/apache/ibatis/io Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 22
22
import java .io .InputStream ;
23
23
import java .io .InputStreamReader ;
24
24
import java .io .UnsupportedEncodingException ;
25
+ import java .nio .charset .StandardCharsets ;
25
26
import java .net .MalformedURLException ;
26
27
import java .net .URL ;
27
28
import java .net .URLEncoder ;
@@ -269,7 +270,7 @@ protected URL findJarForResource(URL url) throws MalformedURLException {
269
270
// File name might be URL-encoded
270
271
if (!file .exists ()) {
271
272
try {
272
- file = new File (URLEncoder .encode (jarUrl .toString (), "UTF-8" ));
273
+ file = new File (URLEncoder .encode (jarUrl .toString (), StandardCharsets . UTF_8 . name () ));
273
274
} catch (UnsupportedEncodingException e ) {
274
275
throw new RuntimeException ("Unsupported encoding? UTF-8? That's impossible." );
275
276
}
Original file line number Diff line number Diff line change 21
21
import java .io .FileNotFoundException ;
22
22
import java .io .FileWriter ;
23
23
import java .io .IOException ;
24
+ import java .nio .charset .StandardCharsets ;
24
25
25
26
import org .junit .jupiter .api .AfterEach ;
26
27
import org .junit .jupiter .api .BeforeEach ;
You can’t perform that action at this time.
0 commit comments