mneethiraj commented on code in PR #1123:
URL: https://github.com/apache/ranger/pull/1123#discussion_r3707434480
##########
security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java:
##########
Review Comment:
`if (grantRequest != null) {` can be removed since this condition will not
be true due to the `if` added above.
##########
security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java:
##########
@@ -1149,6 +1149,10 @@ public List<String>
lookupResource(@PathParam("serviceName") String serviceName,
public RESTResponse grantAccess(@PathParam("serviceName") String
serviceName, GrantRevokeRequest grantRequest, @Context HttpServletRequest
request) throws Exception {
LOG.debug("==> ServiceREST.grantAccess({}, {})", serviceName,
grantRequest);
+ if (grantRequest == null) {
+ throw
restErrorUtil.createRESTException(HttpServletResponse.SC_BAD_REQUEST, "Grant
request object is null or missing in grant access api", false);
Review Comment:
"null or missing body"
##########
security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java:
##########
Review Comment:
`if (grantRequest != null) {` can be removed since this condition will not
be true due to the `if` added above.
##########
security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java:
##########
@@ -1271,6 +1275,10 @@ public RESTResponse
grantAccess(@PathParam("serviceName") String serviceName, Gr
public RESTResponse secureGrantAccess(@PathParam("serviceName") String
serviceName, GrantRevokeRequest grantRequest, @Context HttpServletRequest
request) throws Exception {
LOG.debug("==> ServiceREST.secureGrantAccess({}, {})", serviceName,
grantRequest);
+ if (grantRequest == null) {
+ throw
restErrorUtil.createRESTException(HttpServletResponse.SC_BAD_REQUEST, "Grant
request object is null or missing in grant access api", false);
Review Comment:
"null or missing body"
--
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]