diff options
author | 2020-06-18 19:46:13 +0000 | |
---|---|---|
committer | 2020-06-18 19:46:13 +0000 | |
commit | d17d2bf666685ec41e37467d32bb046724f72d1b (patch) | |
tree | 8bb8b3bc3bb74265036dabc114ef6944d2abbdcf /ecomp-portal-BE-common/src/main/java/org | |
parent | ed8f6ef8cc3e329243311c5bc13dc302ade44d60 (diff) | |
parent | cfc431ee10a83ccc0a170ec4f8e674f6ccb63a8d (diff) |
Merge "Fixed few security issues from the dependencies"
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java/org')
-rw-r--r-- | ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java index dc652d59..8bf93549 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java @@ -103,9 +103,16 @@ public class MicroserviceProxyController extends EPUnRestrictedBaseController { */ private boolean isValidJSON(String response) { try { + if(response != null && !response.isEmpty()) + { final ObjectMapper mapper = new ObjectMapper(); mapper.readTree(response); return true; + } + else + { + return false; + } } catch (IOException e) { logger.debug(EELFLoggerDelegate.debugLogger, "isValidJSON failed", e); return false; |