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 2022/12/29 14:45:36 UTC

[GitHub] [netbeans] matthiasblaesing opened a new pull request, #5160: tomcat5: Enable usage of javac release and remove internal class use (fix JDK8 and JDK17+)

matthiasblaesing opened a new pull request, #5160:
URL: https://github.com/apache/netbeans/pull/5160

   The tomcat5 module used the internal classes:
   
   com.sun.org.apache.xml.internal.serialize.OutputFormat
   com.sun.org.apache.xml.internal.serialize.XMLSerializer
   
   to modify the tomcat configuration. For this to work the usage of the
   javac release option had to be disabled as only exported classes are
   then accessible. This is done by specifying bootclasspath.prepend.
   
   Having this masked a different issue which rendered the tomcat module
   JDK 9+. The method:
   
   URLEncoder#encode(String s, Charset enc)
   
   was used, which was introduced with JDK9. The alternative
   
   URLEncoder#encode(String s, String enc)
   
   can be used as a drop-in replacement.
   
   Closes: https://github.com/apache/netbeans/issues/5134
   Closes: https://github.com/apache/netbeans/issues/5154


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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


[GitHub] [netbeans] matthiasblaesing commented on a diff in pull request #5160: tomcat5: Enable usage of javac release and remove internal class use (fix JDK8 and JDK17+)

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on code in PR #5160:
URL: https://github.com/apache/netbeans/pull/5160#discussion_r1059172564


##########
enterprise/tomcat5/src/org/netbeans/modules/tomcat5/deploy/TomcatManagerImpl.java:
##########
@@ -333,7 +333,7 @@ private static String encodePath(String str) {
             }
             StringBuilder result = new StringBuilder();
             while (st.hasMoreTokens()) {
-                result.append("/").append(URLEncoder.encode(st.nextToken(), StandardCharsets.UTF_8)); // NOI18N
+                result.append("/").append(URLEncoder.encode(st.nextToken(), "UTF-8")); // NOI18N

Review Comment:
   Valid points - pushed an update. Will merge, once green.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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


[GitHub] [netbeans] matthiasblaesing commented on pull request #5160: tomcat5: Enable usage of javac release and remove internal class use (fix JDK8 and JDK17+)

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on PR #5160:
URL: https://github.com/apache/netbeans/pull/5160#issuecomment-1367435695

   Test build is available here: https://github.com/apache/netbeans/suites/10100859651/artifacts/492515866


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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


[GitHub] [netbeans] matthiasblaesing merged pull request #5160: tomcat5: Enable usage of javac release and remove internal class use (fix JDK8 and JDK17+)

Posted by GitBox <gi...@apache.org>.
matthiasblaesing merged PR #5160:
URL: https://github.com/apache/netbeans/pull/5160


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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


[GitHub] [netbeans] mbien commented on a diff in pull request #5160: tomcat5: Enable usage of javac release and remove internal class use (fix JDK8 and JDK17+)

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #5160:
URL: https://github.com/apache/netbeans/pull/5160#discussion_r1059139606


##########
enterprise/tomcat5/src/org/netbeans/modules/tomcat5/deploy/TomcatManagerImpl.java:
##########
@@ -333,7 +333,7 @@ private static String encodePath(String str) {
             }
             StringBuilder result = new StringBuilder();
             while (st.hasMoreTokens()) {
-                result.append("/").append(URLEncoder.encode(st.nextToken(), StandardCharsets.UTF_8)); // NOI18N
+                result.append("/").append(URLEncoder.encode(st.nextToken(), "UTF-8")); // NOI18N

Review Comment:
   I am sometimes using `StandardCharsets.UTF_8.name()` to make it explicit that the exception can't occur. But this is ok too of course since everyone knows that UTF is standard.
   
   Maybe instead of catching `Exception` and rethrowing it as RT ex, it would be better to catch `UnsupportedEncodingException` a few lines down?



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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