File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
junit-platform-engine/src/main/java/org/junit/platform/engine Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 1515
1616import java .io .Serial ;
1717import java .io .Serializable ;
18- import java .io .UnsupportedEncodingException ;
1918import java .net .URLDecoder ;
2019import java .net .URLEncoder ;
2120import java .nio .charset .StandardCharsets ;
@@ -51,12 +50,7 @@ private static String quote(char c) {
5150 }
5251
5352 private static String encode (char c ) {
54- try {
55- return URLEncoder .encode (String .valueOf (c ), StandardCharsets .UTF_8 .name ());
56- }
57- catch (UnsupportedEncodingException e ) {
58- throw new AssertionError ("UTF-8 should be supported" , e );
59- }
53+ return URLEncoder .encode (String .valueOf (c ), StandardCharsets .UTF_8 );
6054 }
6155
6256 private final char openSegment ;
@@ -152,12 +146,7 @@ private String encode(String s) {
152146 }
153147
154148 private static String decode (String s ) {
155- try {
156- return URLDecoder .decode (s , StandardCharsets .UTF_8 .name ());
157- }
158- catch (UnsupportedEncodingException e ) {
159- throw new JUnitException ("UTF-8 should be supported" , e );
160- }
149+ return URLDecoder .decode (s , StandardCharsets .UTF_8 );
161150 }
162151
163152}
You can’t perform that action at this time.
0 commit comments