From eda473a79655c732fa5326b761a5c6fd099c0703 Mon Sep 17 00:00:00 2001 From: Will Reichert Date: Mon, 30 Sep 2024 14:58:38 -0400 Subject: [PATCH] replace depricated api calls --- src/main/java/io/hyperfoil/tools/qdup/JsonServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/hyperfoil/tools/qdup/JsonServer.java b/src/main/java/io/hyperfoil/tools/qdup/JsonServer.java index ae1e63c7..9cf96b12 100644 --- a/src/main/java/io/hyperfoil/tools/qdup/JsonServer.java +++ b/src/main/java/io/hyperfoil/tools/qdup/JsonServer.java @@ -300,7 +300,7 @@ public void start(){ String cmdUid = rc.request().getParam("sessionId"); Context found = dispatcher.getContext(cmdUid); if(found != null) { - String body = rc.getBodyAsString(); + String body = rc.body().asString(); ParseCmd toRun = new ParseCmd(body); State state = new State(""); @@ -314,7 +314,7 @@ public void start(){ String currentOutput = found.getShell().peekOutput(); toRun.run(currentOutput,spyContext); - if(spyContext.getErrors().size()>0){ + if(!spyContext.getErrors().isEmpty()){ spyContext.getErrors().forEach(err->response.add("errors",err)); rc.response().end(response.toString()); } else if(spyContext.hasSkip()){