Skip to content

Commit

Permalink
Issue #5681 - Changes requested from review
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <[email protected]>
  • Loading branch information
joakime committed Mar 25, 2022
1 parent e9f32b3 commit 550b10a
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,14 @@ public void dumpJvmArgs(PrintStream out)
out.println("---------------------");

jvmArgSources.forEach((key, sourceRef) ->
{
String value = System.getProperty(key);
String source = StartLog.isDebugEnabled() ? '(' + sourceRef + ')' : "";
if (value != null)
out.printf(" %s = %s %s%n", key, value, source);
else
out.printf(" %s %s%n", key, source);
}
);
{
String value = System.getProperty(key);
String source = StartLog.isDebugEnabled() ? '(' + sourceRef + ')' : "";
if (value != null)
out.printf(" %s = %s %s%n", key, value, source);
else
out.printf(" %s %s%n", key, source);
});
}

public void dumpProperties(PrintStream out)
Expand Down Expand Up @@ -1358,12 +1357,8 @@ public void parse(final String rawarg, String source)
if (arg.startsWith("-"))
{
StartLog.debug("Unrecognized Arg: %s (from %s)", arg, source);

// Only add non-duplicates
if (!jvmArgSources.containsKey(arg))
{
jvmArgSources.put(arg, source);
}
// always use the latest source (overriding any past tracked source)
jvmArgSources.put(arg, source);
return;
}

Expand Down

0 comments on commit 550b10a

Please sign in to comment.