diff --git a/pass-data-client/src/main/java/org/eclipse/pass/support/client/JsonApiPassClient.java b/pass-data-client/src/main/java/org/eclipse/pass/support/client/JsonApiPassClient.java index 2d55d54d..d3573576 100644 --- a/pass-data-client/src/main/java/org/eclipse/pass/support/client/JsonApiPassClient.java +++ b/pass-data-client/src/main/java/org/eclipse/pass/support/client/JsonApiPassClient.java @@ -211,10 +211,9 @@ public void updateObject(T obj) throws IOException { throw new IOException( "Update failed: " + url + " returned " + response.code() + " " + response.body().string()); } + Document result_doc = adapter.fromJson(response.body().string()); + setVersionIfNeeded(result_doc, obj); } - - Document result_doc = adapter.fromJson(response.body().string()); - setVersionIfNeeded(result_doc, obj); } private void setVersionIfNeeded(Document resultDoc, T obj) {