-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69618/#review211636
-----------------------------------------------------------


Ship it!




Ship It!

- Arjun Mishra


On Dec. 21, 2018, 10:16 a.m., hongtaq zhao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69618/
> -----------------------------------------------------------
> 
> (Updated Dec. 21, 2018, 10:16 a.m.)
> 
> 
> Review request for sentry, Arjun Mishra, Anthony Young-Garner, kalyan kumar 
> kalvagadda, Li Pi, Na Li, Steve Moist, and Sergio Pena.
> 
> 
> Bugs: SENTRY-2469
>     https://issues.apache.org/jira/browse/SENTRY-2469
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> I have fixed issues in RoleServlet.java. 
> 
> 
> RoleServlet at L62 needs to use either try resource or put it in the finally 
> block to avoid resource leak
> if (conf.getBoolean(ServerConfig.SENTRY_WEB_ENABLE, 
> ServerConfig.SENTRY_WEB_ENABLE_DEFAULT)) may return an NPE if conf.getBoolean 
> returns a nullBoolean (not the primitive type)
> RoleServlet at L45, use Preconditions.checkNotNull or Objects.requreNonNull 
> instead of assert
> RoleServlet at L55: String json = new Gson().toJson(roleMap);, it's better to 
> reuse the Gson instance.
> 
> 
> Diffs
> -----
> 
>   
> sentry-service/sentry-service-server/src/main/java/org/apache/sentry/api/service/thrift/RolesServlet.java
>  9ed2bf31 
> 
> 
> Diff: https://reviews.apache.org/r/69618/diff/2/
> 
> 
> Testing
> -------
> 
> builded and tested it.
> 
> 
> Thanks,
> 
> hongtaq zhao
> 
>

Reply via email to