* 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.
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import java.io.ByteArrayOutputStream;
+import org.openecomp.mso.logger.MsoLogger;
public abstract class CatalogQueryExceptionCommon {
private String messageId;
+ protected static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
public CatalogQueryExceptionCommon() { messageId = null; }
public CatalogQueryExceptionCommon(String messageId) { this.messageId = messageId; }
public String toJsonString() {
try {
- String jsonString = null;
+ String jsonString;
ObjectMapper mapper = new ObjectMapper();
mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE);
jsonString = mapper.writeValueAsString(this);
return jsonString;
} catch (Exception e) {
- e.printStackTrace();
+ LOGGER.debug ("Exception:", e);
return "";
}
}
marshaller.marshal(this, bs);
return bs.toString();
} catch (Exception e) {
- e.printStackTrace();
+ LOGGER.debug ("Exception:", e);
return "";
}
}