From 9a6e713ab356fd6d3f73441d02cb25df9609c864 Mon Sep 17 00:00:00 2001 From: Ruud Senden <8635138+rsenden@users.noreply.github.com> Date: Thu, 23 May 2024 12:53:33 +0200 Subject: [PATCH] chore: `fcli fod issue ls --include`: Fixes & improvements --- .../issue/cli/mixin/FoDIssueIncludeMixin.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/issue/cli/mixin/FoDIssueIncludeMixin.java b/fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/issue/cli/mixin/FoDIssueIncludeMixin.java index 33c84b49a2..171f2b0a33 100644 --- a/fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/issue/cli/mixin/FoDIssueIncludeMixin.java +++ b/fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/issue/cli/mixin/FoDIssueIncludeMixin.java @@ -1,19 +1,26 @@ package com.fortify.cli.fod.issue.cli.mixin; +import java.util.List; + import com.fortify.cli.common.rest.unirest.IHttpRequestUpdater; +import com.fortify.cli.common.util.DisableTest; +import com.fortify.cli.common.util.DisableTest.TestType; + import kong.unirest.HttpRequest; import lombok.Getter; import lombok.RequiredArgsConstructor; -import picocli.CommandLine; -import java.util.List; +import picocli.CommandLine.Option; public class FoDIssueIncludeMixin implements IHttpRequestUpdater { - @CommandLine.Option(names = {"--include", "-i"}, split = ",", descriptionKey = "fcli.fod.issue.list.includeIssue") + @DisableTest(TestType.MULTI_OPT_PLURAL_NAME) + @Option(names = {"--include", "-i"}, split = ",", descriptionKey = "fcli.fod.issue.list.includeIssue", paramLabel="") private List includes; public HttpRequest updateRequest(HttpRequest request) { - for ( var include : includes) { - request = request.queryString(include.getRequestParameterName(), "true"); + if ( includes!=null ) { + for ( var include : includes) { + request = request.queryString(include.getRequestParameterName(), "true"); + } } return request; }