X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=portal-BE%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportal%2Futils%2FEcompPortalUtils.java;h=ed03f4a248230bc1460fe3c7991a847e58fd5052;hb=refs%2Fchanges%2F37%2F95337%2F1;hp=9e3a5d4b0adf8c1fccf6a06436e94c1b236b7e4e;hpb=54f658724d2f47ed46ad4e179d030e331991a0fe;p=portal.git diff --git a/portal-BE/src/main/java/org/onap/portal/utils/EcompPortalUtils.java b/portal-BE/src/main/java/org/onap/portal/utils/EcompPortalUtils.java index 9e3a5d4b..ed03f4a2 100644 --- a/portal-BE/src/main/java/org/onap/portal/utils/EcompPortalUtils.java +++ b/portal-BE/src/main/java/org/onap/portal/utils/EcompPortalUtils.java @@ -103,7 +103,7 @@ public class EcompPortalUtils { * @return List of tokens split from the source */ public static List parsingByRegularExpression(String source, String regex) { - List tokens = new ArrayList(); + List tokens = new ArrayList<>(); if (source != null && source.length() > 0) { String[] parsed = source.split(regex); for (String token : parsed) { @@ -225,7 +225,7 @@ public class EcompPortalUtils { String responseCode = MDC.get(EPCommonSystemProperties.EXTERNAL_API_RESPONSE_CODE); int responseCodeInt = 0; try { - if (responseCode != null && responseCode != "") { + if (responseCode != null && !responseCode.isEmpty()) { responseCodeInt = Integer.valueOf(responseCode); } } catch (Exception e) { @@ -530,7 +530,7 @@ public class EcompPortalUtils { logger.error(EELFLoggerDelegate.errorLogger, "Please check in system.properties whether the property exists or not!"); return false; - } else if (new Boolean(rmtCentralAccess)) { + } else if (Boolean.valueOf(rmtCentralAccess)) { logger.debug(EELFLoggerDelegate.debugLogger, "checkIfRemoteCentralAccessAllowed: {}", rmtCentralAccess); result = true; }