You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/02/17 06:52:48 UTC

[GitHub] [netbeans] jlahoda commented on a change in pull request #2761: Towards building just on JDK11.

jlahoda commented on a change in pull request #2761:
URL: https://github.com/apache/netbeans/pull/2761#discussion_r577364472



##########
File path: platform/o.n.bootstrap/src/org/netbeans/StandardModuleData.java
##########
@@ -78,7 +80,12 @@ public StandardModuleData(Manifest mf, StandardModule forModule) throws InvalidE
         if (classPath != null) {
             StringTokenizer tok = new StringTokenizer(classPath);
             while (tok.hasMoreTokens()) {
-                String ext = tok.nextToken().replace("%20", " "); // NOI18N
+                String ext;
+                try {
+                    ext = URLDecoder.decode(tok.nextToken(), "UTF-8");
+                } catch (UnsupportedEncodingException ex) {
+                    throw new IllegalStateException(ex);
+                }
                 File extfile;
                 if (ext.equals("${java.home}/lib/ext/jfxrt.jar")) { // NOI18N

Review comment:
       FWIW, you can probably use `java.nio.charset.StandardCharsets.UTF_8` instead of `"UTF-8"`, and avoid the need to handle the `UnsupportedEncodingException`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists