From 25d5efd613640e7e789192c955f96af7bf532ab3 Mon Sep 17 00:00:00 2001 From: Ruud Senden <8635138+rsenden@users.noreply.github.com> Date: Tue, 13 Dec 2022 12:18:57 +0100 Subject: [PATCH] fix: `fcli ssc appversion update`: Fix exception if no --userdel option is specified (fixes #175) --- .../helper/SSCAppVersionAuthEntitiesUpdateBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fcli-ssc/src/main/java/com/fortify/cli/ssc/appversion_user/helper/SSCAppVersionAuthEntitiesUpdateBuilder.java b/fcli-ssc/src/main/java/com/fortify/cli/ssc/appversion_user/helper/SSCAppVersionAuthEntitiesUpdateBuilder.java index 59cbdf44fe..5c53acd98c 100644 --- a/fcli-ssc/src/main/java/com/fortify/cli/ssc/appversion_user/helper/SSCAppVersionAuthEntitiesUpdateBuilder.java +++ b/fcli-ssc/src/main/java/com/fortify/cli/ssc/appversion_user/helper/SSCAppVersionAuthEntitiesUpdateBuilder.java @@ -105,7 +105,9 @@ public final SSCAppVersionAuthEntitiesUpdateBuilder add(boolean allowMultipleMat public final SSCAppVersionAuthEntitiesUpdateBuilder remove(boolean allowMultipleMatches, String... authEntitySpecs) { this.allowMultipleMatchesForRemove |= allowMultipleMatches; - authEntitySpecsToRemove.addAll(Arrays.asList(authEntitySpecs)); + if ( authEntitySpecs!=null && authEntitySpecs.length>0 ) { + authEntitySpecsToRemove.addAll(Arrays.asList(authEntitySpecs)); + } return this; } }