Quickfix: converting set of vuln call chains to json
@@ -59,12 +59,9 @@ public class VulnerabilityCallChainApiServiceImpl implements VulnerabilityCallCh
* @return {@link String} formatted as JSON response.
*/
private String vulnerabilityCallChainsToJSON(Set<VulnerableCallChain> chains) {
- var jsonArray = new JSONArray();
GsonBuilder builder = new GsonBuilder();
Gson gson = builder.create();
- chains.stream().map(gson::toJson).forEach(jsonArray::put);
- var result = jsonArray.toString();
- return result.replace("\\/", "/");
+ return gson.toJson(chains);
}
@Override
