joshuapsteele commented on code in PR #411:
URL: https://github.com/apache/directory-scimple/pull/411#discussion_r1394096752
##########
scim-server/src/main/java/org/apache/directory/scim/server/rest/BaseResourceTypeResourceImpl.java:
##########
@@ -382,35 +358,51 @@ private ScimException notFoundException(String id) {
return new ScimException(Status.NOT_FOUND, "Resource " + id + " not
found");
}
- private void validatePreconditions(String id, EntityTag etag) {
- ResponseBuilder response = request.evaluatePreconditions(etag);
- if (response != null) {
- throw new WebApplicationException(response
- .entity(new ErrorResponse(Status.PRECONDITION_FAILED, "Failed to
update record, backing record has changed - " + id))
- .build());
- }
- }
+// private void validatePreconditions(String id, EntityTag etag) {
+// ResponseBuilder response = request.evaluatePreconditions(etag);
+// if (response != null) {
+// throw new WebApplicationException(response
+// .entity(new ErrorResponse(Status.PRECONDITION_FAILED, "Failed to
update record, backing record has changed - " + id))
+// .build());
+// }
+// }
+//
+// private EntityTag requireEtag(ScimResource resource) throws ScimException {
+// try {
+// return etagGenerator.generateEtag(resource);
+// } catch (EtagGenerationException e) {
+// throw new ScimException(Status.INTERNAL_SERVER_ERROR, "Failed to
generate the etag", e);
+// }
+// }
+//
+// private EntityTag etag(ScimResource resource) {
+// try {
+// return etagGenerator.generateEtag(resource);
+// } catch (EtagGenerationException e) {
+// log.warn("Failed to generate etag for resource", e);
+// return null;
+// }
+// }
Review Comment:
Still getting my footing in reviewing this PR. What's the reason for having
these lines commented-out at the moment?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]