diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-09-19 11:47:46 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-19 11:47:46 +0000 |
commit | 7562a302a4856f733fc5a12fddf57a7e9f06ee37 (patch) | |
tree | 0b9a8d82e4c182473fee2bf2070c11e64022a222 /mso-api-handlers/mso-api-handler-infra/src/main/java/org | |
parent | e493976735b14cb5e946c3ae058bbe26871b944c (diff) | |
parent | ade8894d2ae995205c98ef9a750fcccd8abd3875 (diff) |
Merge "Fix Blocker/Critical sonar issues"
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java/org')
-rw-r--r-- | mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java | 61 |
1 files changed, 28 insertions, 33 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java index 5328780b21..8ee106efc1 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java @@ -21,39 +21,12 @@ package org.openecomp.mso.apihandlerinfra; -import java.io.StringReader; -import java.io.StringWriter; -import java.io.IOException; -import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.StringTokenizer; - -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.core.Response; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - import org.codehaus.jackson.JsonGenerationException; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.annotate.JsonSerialize; import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; import org.hibernate.Session; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - import org.openecomp.mso.apihandler.common.ValidationException; import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.CloudConfiguration; import org.openecomp.mso.apihandlerinfra.serviceinstancebeans.ModelInfo; @@ -72,10 +45,34 @@ import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfRequest; import org.openecomp.mso.db.AbstractSessionFactoryManager; import org.openecomp.mso.logger.MessageEnum; import org.openecomp.mso.logger.MsoLogger; -import org.openecomp.mso.requestsdb.RequestsDbSessionFactoryManager; import org.openecomp.mso.requestsdb.InfraActiveRequests; import org.openecomp.mso.requestsdb.RequestsDatabase; +import org.openecomp.mso.requestsdb.RequestsDbSessionFactoryManager; import org.openecomp.mso.utils.UUIDChecker; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.core.Response; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import java.io.IOException; +import java.io.StringWriter; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.StringTokenizer; public class MsoRequest { @@ -167,11 +164,9 @@ public class MsoRequest { se.setMessageId(messageId); se.setText(text); if(variables != null){ - if(variables != null){ - for(String variable: variables){ - se.getVariables().add(variable); - } - } + for(String variable: variables){ + se.getVariables().add(variable); + } } re.setServiceException(se); } |