----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34924/#review86373 -----------------------------------------------------------
server/src/main/java/org/apache/sqoop/handler/AuthorizationRequestHandler.java <https://reviews.apache.org/r/34924/#comment138352> The logic should be in parsing since a new resource is created using `MResource(string, string)` which will call `MResource.Type.valueOf(..)`. server/src/main/java/org/apache/sqoop/handler/AuthorizationRequestHandler.java <https://reviews.apache.org/r/34924/#comment138351> `MResource.Type.valueOf` should throw an exception if the type doesn't exist accoring to http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html#valueOf(java.lang.Class,%20java.lang.String). There's no need for the switch statement i believe. - Abraham Elmahrek On June 2, 2015, 5:01 a.m., Dian Fu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/34924/ > ----------------------------------------------------------- > > (Updated June 2, 2015, 5:01 a.m.) > > > Review request for Sqoop. > > > Repository: sqoop-sqoop2 > > > Description > ------- > > Check whether resource exists before run privilege check, including > grant/check_privilege. If resource does not exists, throw "none resource > exception" > > > Diffs > ----- > > common/src/main/java/org/apache/sqoop/error/code/CommonRepositoryError.java > e5fbe2d > > server/src/main/java/org/apache/sqoop/handler/AuthorizationRequestHandler.java > 00f4b52 > > Diff: https://reviews.apache.org/r/34924/diff/ > > > Testing > ------- > > > Thanks, > > Dian Fu > >
