aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl/aai/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-impl/aai/src/main')
-rw-r--r--models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java9
-rw-r--r--models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java1
2 files changed, 5 insertions, 5 deletions
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
index 1e14e0704..1b18e439c 100644
--- a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiCqResponse.java
@@ -30,7 +30,6 @@ import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
import javax.xml.transform.stream.StreamSource;
import org.eclipse.persistence.jaxb.JAXBContextFactory;
import org.eclipse.persistence.jaxb.JAXBContextProperties;
@@ -56,7 +55,6 @@ public class AaiCqResponse implements Serializable {
private static final String VF_MODULE = "vf-module";
private static final Logger LOGGER = LoggerFactory.getLogger(AaiCqResponse.class);
private static JAXBContext jaxbContext;
- private static Unmarshaller unmarshaller;
// JABX initial stuff
static {
@@ -76,7 +74,10 @@ public class AaiCqResponse implements Serializable {
ModelVer.class
}, properties);
// @formatter:on
- unmarshaller = jaxbContext.createUnmarshaller();
+
+ // verify that we can create an unmarshaller
+ jaxbContext.createUnmarshaller();
+
} catch (JAXBException e) {
LOGGER.error("Could not initialize JAXBContext", e);
LOGGER.info("Problem initiatlizing JAXBContext", e);
@@ -213,7 +214,7 @@ public class AaiCqResponse implements Serializable {
private <T> T getAaiObject(StreamSource json, final Class<T> classOfResponse) {
try {
- return unmarshaller.unmarshal(json, classOfResponse).getValue();
+ return jaxbContext.createUnmarshaller().unmarshal(json, classOfResponse).getValue();
} catch (JAXBException e) {
LOGGER.error("JAXBCOntext error", e);
return null;
diff --git a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java
index 24dcd8bbd..81aea9f98 100644
--- a/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java
+++ b/models-interactions/model-impl/aai/src/main/java/org/onap/policy/aai/AaiManager.java
@@ -29,7 +29,6 @@ import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.stream.Collectors;
-
import org.json.JSONArray;
import org.json.JSONObject;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;