Permalink
Browse files

Fixed immutable list exception

  • Loading branch information...
mordechaim committed Feb 10, 2019
1 parent 7c8512c commit 21b6dbe6c3558845cefab9a828ca5697573c9f32
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/main/java/org/update4j/service/DefaultLauncher.java
@@ -64,8 +64,8 @@ public void run(LaunchContext context) {
"Main class at key '" + MAIN_CLASS_PROPERTY_KEY + "' is not a valid Java class name.");
}

if (args == null)
args = new ArrayList<>();
// If immutable avoid exception
args = new ArrayList<>(args);

String argument = context.getConfiguration().getResolvedProperty(ARGUMENT_PROPERTY_KEY);
if (argument != null)
@@ -114,14 +114,14 @@ public void run(LaunchContext context) {
// @formatter:off
private static void usage() {
System.err.println("Customize the setup of the default launcher by setting properties in the config\n"
+ "\taccording tothe following table:\n\n" + table()
+ "\taccording to the following table:\n\n" + table()

+ "\tWhile the default behavior works for a majority of cases, you may even\n"
+ "\tfurther customize the launch process by implementing your own Launcher\n"
+ "\tand either register it as a service provider, or pass an instance directly\n"
+ "\tto a call to Configuration.launch().\n\n"
+ "\tFor more details how to register service providers please refer to the Github wiki:\n"
+ "\thttps://github.com/update4j/update4j/wiki/Documentation#dealing-with-providers");
+ "\thttps://github.com/update4j/update4j/wiki/Documentation#dealing-with-providers\n");
}

private static String table() {
@@ -136,7 +136,7 @@ private static String table() {
+ "\t\t| | provided value using the <name> as |\n"
+ "\t\t| | the system property key. |\n"
+ "\t\t| | May be used for many properties. |\n"
+ "\t\t+--------------------------------+------------------------------------+\n\n\n";
+ "\t\t+--------------------------------+------------------------------------+\n\n";
}

}

0 comments on commit 21b6dbe

Please sign in to comment.