Domain model change
[portal.git] / portal-BE / src / main / java / org / onap / portal / utils / EcompPortalUtils.java
index 9e3a5d4..caff67e 100644 (file)
@@ -71,7 +71,7 @@ import org.springframework.http.MediaType;
 
 public class EcompPortalUtils {
 
-       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EcompPortalUtils.class);
+       private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EcompPortalUtils.class);
 
        private static final String FUNCTION_PIPE = "|";
 
@@ -103,7 +103,7 @@ public class EcompPortalUtils {
         * @return List of tokens split from the source
         */
        public static List<String> parsingByRegularExpression(String source, String regex) {
-               List<String> tokens = new ArrayList<String>();
+               List<String> 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;
                }