Code Review
/
portal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Domain model change
[portal.git]
/
portal-BE
/
src
/
main
/
java
/
org
/
onap
/
portal
/
utils
/
EcompPortalUtils.java
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
9e3a5d4
..
caff67e
100644
(file)
--- a/
portal-BE/src/main/java/org/onap/portal/utils/EcompPortalUtils.java
+++ b/
portal-BE/src/main/java/org/onap/portal/utils/EcompPortalUtils.java
@@
-71,7
+71,7
@@
import org.springframework.http.MediaType;
public class EcompPortalUtils {
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 = "|";
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) {
* @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) {
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 {
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) {
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;
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;
}
logger.debug(EELFLoggerDelegate.debugLogger, "checkIfRemoteCentralAccessAllowed: {}", rmtCentralAccess);
result = true;
}