Enhancements for the aai-common library
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / util / PojoUtils.java
index 218f0dd..05cbf97 100644 (file)
@@ -129,11 +129,7 @@ public class PojoUtils {
 
         mapper.registerModule(new JaxbAnnotationModule());
 
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
-        mapper.writeValue(baos, clazz);
-
-        return baos.toString();
+        return mapper.writeValueAsString(clazz);
     }
 
     /**