Fix various warnings
[netconf.git] / restconf / sal-rest-connector / src / main / java / org / opendaylight / netconf / sal / rest / impl / RestconfDocumentedExceptionMapper.java
index d2f5846764315bd474bf224aa43ff41c160805dc..f24650856c5cf46ce6f7e2895a4170ff878a1873 100644 (file)
@@ -234,7 +234,7 @@ public class RestconfDocumentedExceptionMapper implements ExceptionMapper<Restco
 
         final JsonWriter jsonWriter = JsonWriterFactory.createJsonWriter(outputWriter);
         final NormalizedNodeStreamWriter jsonStreamWriter = JSONNormalizedNodeStreamWriter.createExclusiveWriter(
-                JSONCodecFactory.create(context.getSchemaContext()), path, initialNs, jsonWriter);
+                JSONCodecFactory.getShared(context.getSchemaContext()), path, initialNs, jsonWriter);
 
         // We create a delegating writer to special-case error-info as error-info is defined as an empty
         // container in the restconf yang schema but we create a leaf node so we can output it. The delegate