----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/74976/#review226422 -----------------------------------------------------------
security-admin/src/main/java/org/apache/ranger/biz/ServiceMgr.java Lines 195 (patched) <https://reviews.apache.org/r/74976/#comment314627> service.getConfigs() can throw NPE security-admin/src/main/java/org/apache/ranger/biz/ServiceMgr.java Lines 198 (patched) <https://reviews.apache.org/r/74976/#comment314629> if condition can be improved: if ((url != null) && (url.getHost().equalsIgnoreCase("localhost") || url.getHost().equals("127.0.0.1"))) security-admin/src/main/java/org/apache/ranger/biz/ServiceMgr.java Lines 237 (patched) <https://reviews.apache.org/r/74976/#comment314628> getValidURL can be private since it is not getting called outside the class. - Subhrat Chaudhary On May 8, 2024, 11:15 a.m., Rakesh Gupta wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/74976/ > ----------------------------------------------------------- > > (Updated May 8, 2024, 11:15 a.m.) > > > Review request for ranger, Dineshkumar Yadav, Kishor Gollapalliwar, Mehul > Parikh, Pradeep Agrawal, and sanket shelar. > > > Bugs: RANGER-4782 > https://issues.apache.org/jira/browse/RANGER-4782 > > > Repository: ranger > > > Description > ------- > > Implement best coding practices for validating service configs > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/biz/ServiceMgr.java > b9d51602e > > security-admin/src/main/webapp/react-webapp/src/views/ServiceManager/TestConnection.jsx > 668de52e7 > > > Diff: https://reviews.apache.org/r/74976/diff/1/ > > > Testing > ------- > > Validated Service Connection failed, when using 'localhost' or '127.0.0.1' as > the hostname in the service configuration. > > Tested If a service configuration contains a null value, it won't be added to > the service. > > > Thanks, > > Rakesh Gupta > >
