From 01349d72befd410b50ac3ca512e1e86ad937d408 Mon Sep 17 00:00:00 2001 From: tamarleviCm <110327792+tamarleviCm@users.noreply.github.com> Date: Thu, 9 May 2024 15:18:33 +0300 Subject: [PATCH] AST-37667 send the agent to the results command (#323) --- src/main/java/com/checkmarx/ast/wrapper/CxWrapper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/checkmarx/ast/wrapper/CxWrapper.java b/src/main/java/com/checkmarx/ast/wrapper/CxWrapper.java index 587cff8..5822fa7 100644 --- a/src/main/java/com/checkmarx/ast/wrapper/CxWrapper.java +++ b/src/main/java/com/checkmarx/ast/wrapper/CxWrapper.java @@ -261,6 +261,12 @@ public Results results(@NonNull UUID scanId) throws IOException, InterruptedExce .readValue(results(scanId, ReportFormat.json)); } + public Results results(@NonNull UUID scanId, String agent) throws IOException, InterruptedException, CxException { + return new ObjectMapper() + .readerFor(Results.class) + .readValue(results(scanId, ReportFormat.json, agent)); + } + public String results(@NonNull UUID scanId, ReportFormat reportFormat) throws IOException, InterruptedException, CxException { return results(scanId, reportFormat, null);