jmuehlner commented on code in PR #840:
URL: https://github.com/apache/guacamole-client/pull/840#discussion_r1172955340
##########
guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryResource.java:
##########
@@ -590,7 +591,56 @@ public void executeOperation(boolean atomic,
Directory<InternalType> directory)
}
- // Append each identifier to the list, to be removed
atomically
+ else if (op == APIPatch.Operation.replace) {
+
+ // The identifier of the object to be replaced
+ String identifier = path.substring(1);
+
+ InternalType original = null;
+
+ try {
+
+ // Fetch the object to be updated
+ original = directory.get(identifier);
Review Comment:
Ok, I've updated it. I think this is the right logic now - if an attempt is
made to replace a non-existant object, it will now log both a GET and UPDATE
failure event.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]