Make getArguments return an immutable list
This commit is contained in:
parent
7c0b7e1e90
commit
edd28bef2f
1 changed files with 3 additions and 2 deletions
|
@ -20,6 +20,7 @@
|
|||
package de.staropensource.engine.base.utility.information;
|
||||
|
||||
import de.staropensource.engine.base.logging.Logger;
|
||||
import de.staropensource.engine.base.type.immutable.ImmutableArrayList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.lang.management.ManagementFactory;
|
||||
|
@ -109,11 +110,11 @@ public final class JvmInformation {
|
|||
* Returns all arguments passed to the JVM.
|
||||
* This excludes all arguments passed to the application.
|
||||
*
|
||||
* @return JVM arguments
|
||||
* @return immutable list with all JVM arguments
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
public static @NotNull List<@NotNull String> getArguments() {
|
||||
return ManagementFactory.getRuntimeMXBean().getInputArguments();
|
||||
return new ImmutableArrayList<>(ManagementFactory.getRuntimeMXBean().getInputArguments());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue