Code Review
/
policy
/
engine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Unit/SONAR/Checkstyle in ONAP-REST
[policy/engine.git]
/
ONAP-REST
/
src
/
main
/
java
/
org
/
onap
/
policy
/
rest
/
util
/
PolicyValidation.java
diff --git
a/ONAP-REST/src/main/java/org/onap/policy/rest/util/PolicyValidation.java
b/ONAP-REST/src/main/java/org/onap/policy/rest/util/PolicyValidation.java
index
adb8995
..
70be832
100644
(file)
--- a/
ONAP-REST/src/main/java/org/onap/policy/rest/util/PolicyValidation.java
+++ b/
ONAP-REST/src/main/java/org/onap/policy/rest/util/PolicyValidation.java
@@
-378,15
+378,11
@@
public class PolicyValidation {
valid = false;
}
} else if ("PROPERTIES".equals(configType)) {
valid = false;
}
} else if ("PROPERTIES".equals(configType)) {
- if (!PolicyUtils.isPropValid(configBodyData)
|| "".equals(configBodyData)
) {
+ if (!PolicyUtils.isPropValid(configBodyData)) {
responseString.append(
"Config Body: Property data is not valid" + HTML_ITALICS_LNBREAK);
valid = false;
}
responseString.append(
"Config Body: Property data is not valid" + HTML_ITALICS_LNBREAK);
valid = false;
}
- } else if ("OTHER".equals(configType) && ("".equals(configBodyData))) {
- responseString.append(
- "Config Body: Config Body Should not be Empty" + HTML_ITALICS_LNBREAK);
- valid = false;
}
}
} else {
}
}
} else {
@@
-490,7
+486,7
@@
public class PolicyValidation {
}
} else {
responseString.append(
}
} else {
responseString.append(
- "<b>D2/Virtualized Services</b>:<i>Select atleast one D2/Virtualized Services"
+ "<b>D2/Virtualized Services</b>:<i>Select at
least one D2/Virtualized Services"
+ HTML_ITALICS_LNBREAK);
valid = false;
}
+ HTML_ITALICS_LNBREAK);
valid = false;
}
@@
-606,7
+602,7
@@
public class PolicyValidation {
}
} else {
responseString.append(
}
} else {
responseString.append(
- "<b>D2/Virtualized Services</b>: <i>Select atleast one D2/Virtualized Services"
+ "<b>D2/Virtualized Services</b>: <i>Select at
least one D2/Virtualized Services"
+ HTML_ITALICS_LNBREAK);
responseString.append(
"<b>vPRO Actions</b>: <i>vPRO Actions is required" + HTML_ITALICS_LNBREAK);
+ HTML_ITALICS_LNBREAK);
responseString.append(
"<b>vPRO Actions</b>: <i>vPRO Actions is required" + HTML_ITALICS_LNBREAK);
@@
-884,7
+880,7
@@
public class PolicyValidation {
}
}
}
}
- pr
otected
String emailValidation(String email, String response) {
+ pr
ivate
String emailValidation(String email, String response) {
String res = response;
if (email != null) {
String validateEmail = PolicyUtils.validateEmailAddress(email.replace("\"", ""));
String res = response;
if (email != null) {
String validateEmail = PolicyUtils.validateEmailAddress(email.replace("\"", ""));