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
Sonar fix forONAP-PAP-REST critical sonar issues
[policy/engine.git]
/
ONAP-PAP-REST
/
src
/
main
/
java
/
org
/
onap
/
policy
/
pap
/
xacml
/
rest
/
controller
/
DictionaryController.java
diff --git
a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java
b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java
index
d16de1f
..
db6acc8
100644
(file)
--- a/
ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java
+++ b/
ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java
@@
-20,7
+20,9
@@
package org.onap.policy.pap.xacml.rest.controller;
package org.onap.policy.pap.xacml.rest.controller;
+import java.io.IOException;
import java.io.PrintWriter;
import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
@@
-122,7
+124,7
@@
public class DictionaryController {
}
@RequestMapping(value={"/attribute_dictionary/save_attribute"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
}
@RequestMapping(value={"/attribute_dictionary/save_attribute"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView saveAttributeDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
+ public ModelAndView saveAttributeDictionary(HttpServletRequest request, HttpServletResponse response) throws
UnsupportedEncodingException, IO
Exception{
try {
boolean duplicateflag = false;
boolean isFakeUpdate = false;
try {
boolean duplicateflag = false;
boolean isFakeUpdate = false;
@@
-248,7
+250,7
@@
public class DictionaryController {
}
@RequestMapping(value={"/attribute_dictionary/remove_attribute"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
}
@RequestMapping(value={"/attribute_dictionary/remove_attribute"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView removeAttributeDictionary(HttpServletRequest request, HttpServletResponse response)
throws
Exception {
+ public ModelAndView removeAttributeDictionary(HttpServletRequest request, HttpServletResponse response)
throws UnsupportedEncodingException, IO
Exception {
try{
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
try{
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
@@
-312,7
+314,7
@@
public class DictionaryController {
}
@RequestMapping(value={"/onap_dictionary/save_onapName"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
}
@RequestMapping(value={"/onap_dictionary/save_onapName"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView saveOnapDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{
+ public ModelAndView saveOnapDictionary(HttpServletRequest request, HttpServletResponse response) throws
UnsupportedEncodingException, IO
Exception{
try {
boolean duplicateflag = false;
boolean isFakeUpdate = false;
try {
boolean duplicateflag = false;
boolean isFakeUpdate = false;
@@
-402,7
+404,7
@@
public class DictionaryController {
}
@RequestMapping(value={"/onap_dictionary/remove_onap"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
}
@RequestMapping(value={"/onap_dictionary/remove_onap"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
- public ModelAndView removeOnapDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ public ModelAndView removeOnapDictionary(HttpServletRequest request, HttpServletResponse response) throws
UnsupportedEncodingException, IO
Exception {
try{
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
try{
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);