From d473a21a7a9ac1db17b30201e91a631a8d970c62 Mon Sep 17 00:00:00 2001 From: Rudy De Busscher Date: Mon, 6 Jan 2020 13:42:10 +0100 Subject: [PATCH] Delete JVM options with min max versions. CUSTOM-142. --- .../com/sun/enterprise/v3/admin/commands/DeleteJvmOptions.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/commands/DeleteJvmOptions.java b/nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/commands/DeleteJvmOptions.java index c6cfe8d188b..7314d8e0cef 100644 --- a/nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/commands/DeleteJvmOptions.java +++ b/nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/commands/DeleteJvmOptions.java @@ -162,7 +162,8 @@ private void deleteX(final JvmOptionBag bag, final List toRemove, final SingleConfigCode scc = (JvmOptionBag bag1) -> { List jvmopts = new ArrayList<>(bag1.getJvmRawOptions()); int orig = jvmopts.size(); - boolean removed = jvmopts.removeIf(option -> toRemove.contains(new JvmOption(option).option)); + // using new JvmOption(option).toString() (instead op option directly) to make sure the correct formatting is applied. + boolean removed = jvmopts.removeIf(option -> toRemove.contains(new JvmOption(option).toString())); bag1.setJvmOptions(jvmopts); int now = jvmopts.size(); if (removed) {