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 15
15
16
16
import java .io .Serial ;
17
17
import java .io .Serializable ;
18
- import java .io .UnsupportedEncodingException ;
19
18
import java .net .URLDecoder ;
20
19
import java .net .URLEncoder ;
21
20
import java .nio .charset .StandardCharsets ;
@@ -51,12 +50,7 @@ private static String quote(char c) {
51
50
}
52
51
53
52
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 );
60
54
}
61
55
62
56
private final char openSegment ;
@@ -152,12 +146,7 @@ private String encode(String s) {
152
146
}
153
147
154
148
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 );
161
150
}
162
151
163
152
}
You can’t perform that action at this time.
0 commit comments