matthiasblaesing commented on a change in pull request #3056:
URL: https://github.com/apache/netbeans/pull/3056#discussion_r680392405
##########
File path:
enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/StartTask.java
##########
@@ -757,6 +761,20 @@ private void appendStartupExtenderParams(List<String>
optList) {
}
}
+ /**
+ * Appends options in order to open modules for java 9.0+
+ * @param optList
+ */
+ private void appendModuleOpensParams(List<String> optList) {
+ SpecificationVersion currentInstanceJavaVersion =
JavaUtils.serverInstancePlatform(instance).getSpecification().getVersion();
+ SpecificationVersion firstJavaVersionWithModules = new
SpecificationVersion("9");
+
+
if(currentInstanceJavaVersion.compareTo(firstJavaVersionWithModules)>=0){
+ optList.add("--add-opens java.base/java.lang=ALL-UNNAMED");
+ optList.add("--add-opens
java.naming/javax.naming.spi=ALL-UNNAMED");
Review comment:
The issue is here:
https://github.com/apache/netbeans/blob/19be548f0bc53ecac53122e478a37e27ce344118/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/ServerTasks.java#L304-L368
This takes all parameters, splits them into key-value parts, stuffs them
into a map, modifies them and serializes them into the command line. The
problem is, that putting the options into a map breaks all options, that can be
set multiple times., as "add-opens" can. Only one value survives this
procedure. It is just luck, that that trick works at all. To me that function
needs to be fixed (a multimap?).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists