Make getArguments return an immutable list
Some checks failed
build-and-test / test (push) Failing after 58s
build-and-test / generate-javadoc (push) Failing after 1m0s
build-and-test / build (push) Failing after 1m3s

This commit is contained in:
JeremyStar™ 2024-11-05 02:55:28 +01:00
parent 7c0b7e1e90
commit edd28bef2f
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -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());
}
/**