Skip to content

Commit

Permalink
ORCH-505 Remove redundant java.net.preferIPv4Stack flag to allow IPv6…
Browse files Browse the repository at this point in the history
… support
  • Loading branch information
alain-kermis-sonarsource committed Feb 14, 2025
1 parent 0a37a7f commit 6a1e4a5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public CommandLine create(Server server) {
command.addArgument("-server");
command.addArgument("-Djava.awt.headless=true");
command.addArgument("-Dsonar.enableStopCommand=true");
command.addArgument("-Djava.net.preferIPv4Stack=true");
IOFileFilter appJarFilter = FileFilterUtils.and(FileFilterUtils.prefixFileFilter("sonar-application-"), FileFilterUtils.suffixFileFilter("jar"));
File libDir = new File(server.getHome(), "lib");
Collection<File> files = FileUtils.listFiles(libDir, appJarFilter, FileFilterUtils.trueFileFilter());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,6 @@ private static boolean isSearchNode(Properties properties) {

private static void completeJavaOptions(Properties properties, String propertyKey) {
String javaOpts = OrchestratorUtils.defaultIfEmpty(properties.getProperty(propertyKey), "");
if (!javaOpts.contains("-Djava.net.preferIPv4Stack")) {
javaOpts += " -Djava.net.preferIPv4Stack=true";
}
if (!javaOpts.contains("-Djava.security.egd") && SystemUtils.IS_OS_LINUX) {
javaOpts += " -Djava.security.egd=file:/dev/./urandom";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public void create_command_line() throws Exception {
assertThat(commandLine.getExecutable()).isEqualTo("java");
assertThat(commandLine.getArguments())
.contains("-Xmx32m")
.contains("-Djava.net.preferIPv4Stack=true")
.contains("lib/sonar-application-5.6.jar");
}

Expand Down

0 comments on commit 6a1e4a5

Please sign in to comment.