rameeshm commented on code in PR #984:
URL: https://github.com/apache/ranger/pull/984#discussion_r3325265429


##########
security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java:
##########
@@ -734,6 +734,26 @@ public RangerService createService(RangerService service) {
     @PreAuthorize("@rangerPreAuthSecurityHandler.isAPIAccessible(\"" + 
RangerAPIList.UPDATE_SERVICE + "\")")
     public RangerService updateService(RangerService service, @Context 
HttpServletRequest request) {
         LOG.debug("==> ServiceREST.updateService(): {}", service);
+        // if service.id and param 'id' are specified, service.id should be 
same as the param 'id'
+        // if service.id is null, then set param 'id' into service Object
+        if (request != null) {
+            String requestURI = request.getRequestURI();
+            if (requestURI != null) {
+                String[] parts = requestURI.split("/");

Review Comment:
   Can this result in parts being null? Please check



-- 
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]

Reply via email to