diff options
Diffstat (limited to 'adapters/mso-adapters-rest-interface/src/main/java/org/openecomp')
3 files changed, 21 insertions, 7 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponse.java index da35b0e78f..f3f252d96e 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponse.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVfModuleResponse.java @@ -3,6 +3,7 @@ * ONAP - SO * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +21,8 @@ package org.openecomp.mso.adapters.vnfrest; +import org.openecomp.mso.logger.MsoLogger; + import java.util.Map; @@ -27,12 +30,13 @@ import javax.xml.bind.annotation.XmlRootElement; import org.codehaus.jackson.map.ObjectMapper; import org.jboss.resteasy.annotations.providers.NoJackson; - +import org.openecomp.mso.logger.MsoLogger; import org.openecomp.mso.openstack.beans.VnfStatus; @XmlRootElement(name = "queryVfModuleResponse") @NoJackson public class QueryVfModuleResponse { + private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA); private String vnfId; private String vfModuleId; private String vfModuleStackId; @@ -100,7 +104,9 @@ public class QueryVfModuleResponse { ObjectMapper mapper = new ObjectMapper(); jsonString = mapper.writeValueAsString(this); } - catch (Exception e) {} + catch (Exception e) { + LOGGER.debug("Exception :",e); + } return jsonString; } } diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVolumeGroupResponse.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVolumeGroupResponse.java index 776bdf3111..e70b9ddc71 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVolumeGroupResponse.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/QueryVolumeGroupResponse.java @@ -3,6 +3,7 @@ * ONAP - SO * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,11 +30,14 @@ import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.SerializationConfig; import org.jboss.resteasy.annotations.providers.NoJackson; +import org.openecomp.mso.logger.MsoLogger; + import org.openecomp.mso.openstack.beans.VnfStatus; @XmlRootElement(name = "queryVolumeGroupResponse") @NoJackson public class QueryVolumeGroupResponse { + private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA); private String volumeGroupId; private String volumeGroupStackId; private VnfStatus volumeGroupStatus; @@ -94,7 +98,9 @@ public class QueryVolumeGroupResponse { mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE); jsonString = mapper.writeValueAsString(this); } - catch (Exception e) {} + catch (Exception e) { + LOGGER.debug("Exception :",e); + } return jsonString; } } diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java index 39201d550c..4a902bdd83 100644 --- a/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java +++ b/adapters/mso-adapters-rest-interface/src/main/java/org/openecomp/mso/adapters/vnfrest/VfResponseCommon.java @@ -3,6 +3,7 @@ * ONAP - SO * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +27,8 @@ import java.io.ByteArrayOutputStream; import javax.xml.bind.JAXBContext; import javax.xml.bind.Marshaller; +import org.openecomp.mso.logger.MsoLogger; + import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.SerializationConfig; @@ -34,6 +37,7 @@ import org.codehaus.jackson.map.SerializationConfig; * except for QueryVfModuleResponse and QueryVolumeGroupResponse. */ public abstract class VfResponseCommon { + private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA); private String messageId; public VfResponseCommon() { @@ -60,8 +64,7 @@ public abstract class VfResponseCommon { jsonString = mapper.writeValueAsString(this); return jsonString; } catch (Exception e) { - // Shouldn't happen... - e.printStackTrace(); + LOGGER.debug("Exception :",e); return ""; } } @@ -75,8 +78,7 @@ public abstract class VfResponseCommon { marshaller.marshal(this, bs); return bs.toString(); } catch (Exception e) { - // Shouldn't happen... - e.printStackTrace(); + LOGGER.debug("Exception :",e); return ""; } } |