You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/04/01 16:53:16 UTC

[GitHub] [geode] dschneider-pivotal commented on a change in pull request #7540: Add exports for acceptance tests

dschneider-pivotal commented on a change in pull request #7540:
URL: https://github.com/apache/geode/pull/7540#discussion_r840763138



##########
File path: geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/commands/StartMemberUtils.java
##########
@@ -122,11 +124,26 @@ static void addGemFireSystemProperties(final List<String> commandLine,
     }
   }
 
+  private static final String[] REQUIRED_OPENS = new String[]{};
+  private static final String[] REQUIRED_EXPORTS = new String[]{
+      "java.base/sun.nio.ch",
+      "java.management/com.sun.jmx.remote.security",
+  };
+  private static final List<String> OPENS = Stream.of(REQUIRED_OPENS)
+      .map(s -> "--add-opens=" + s + "=ALL-UNNAMED")
+      .collect(toList());
+
+  private static final List<String> EXPORTS = Stream.of(REQUIRED_EXPORTS)
+      .map(s -> "--add-exports=" + s + "=ALL-UNNAMED")
+      .collect(toList());
+
   static void addJvmArgumentsAndOptions(final List<String> commandLine,
       final String[] jvmArgsOpts) {
     if (jvmArgsOpts != null) {
       commandLine.addAll(Arrays.asList(jvmArgsOpts));
     }
+    commandLine.addAll(OPENS);

Review comment:
       I know this is a draft but remember that these options (opens and exports) should only be added on JVMs that support those options. JDK 8 does not so this will break any tests that use this class on jdk 8.
   Also consider putting these in a new method instead of overloading addJvmArgumentsAndOptions




-- 
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@geode.apache.org

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