Fix 500 server error in PUT request
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / server / api / ChildBody.java
index ed853d559d8539c0e10d2f780454aeadcbcd3c47..2db7bf6182724a00a3aec67b6b95e564bf55a078 100644 (file)
@@ -34,7 +34,7 @@ public abstract sealed class ChildBody extends RequestBody permits JsonChildBody
      * @return A {@link PrefixAndBody}
      */
     public final @NonNull PrefixAndBody toPayload(final DatabindPath.@NonNull Data path) {
-        return toPayload(path, acquireStream());
+        return toPayload(path, consume());
     }
 
     abstract @NonNull PrefixAndBody toPayload(DatabindPath.@NonNull Data path, @NonNull InputStream inputStream);