Use Charset variants of URLEncoder and URLDecoder methods
This commit is contained in:
committed by
Juergen Hoeller
parent
2fba0bc272
commit
5c972fcc54
@@ -18,7 +18,6 @@ package org.springframework.test.web.servlet.htmlunit;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.Charset;
|
||||
@@ -396,12 +395,7 @@ final class HtmlUnitRequestBuilder implements RequestBuilder, Mergeable {
|
||||
}
|
||||
|
||||
private String urlDecode(String value) {
|
||||
try {
|
||||
return URLDecoder.decode(value, "UTF-8");
|
||||
}
|
||||
catch (UnsupportedEncodingException ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
return URLDecoder.decode(value, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
private byte[] readAllBytes(File file) {
|
||||
|
||||
Reference in New Issue
Block a user