ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zsombor Gegesy <gzsom...@gmail.com>
Subject Review Request 65793: RANGER-1991 : fix errors detected by static code analysis
Date Sat, 24 Feb 2018 16:20:00 GMT

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

Review request for ranger.


Bugs: RANGER-1991
    https://issues.apache.org/jira/browse/RANGER-1991


Repository: ranger


Description
-------

FindBugs/SpotBug detects a couple of problems with the code base:
* Incorrect class casting - in XXServiceDef.equals
* Unnecessary NPE checks - for variables which is known to be non-null (for example, because
in other places a method is called on that object). In ServiceREST.java PublicAPIs.java, ServiceUtil.java
and independently in XUserMgr.java
* Collection.contains method call which is never true - in ServiceDBStore.validatePolicyItems
for policyItem.getAccesses().contains("") - because getAccesses doesn't store String objects
* Making public partially initialized objects in HadoopConfigHolder.initResourceMap()
* Calling toString on array, which is not too readable


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java fd925aa4

  hdfs-agent/src/test/java/org/apache/ranger/services/hdfs/RangerHdfsAuthorizerTest.java 46f92ecb

  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 7aee4336 
  security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java cecb3f8b 
  security-admin/src/main/java/org/apache/ranger/common/RangerSearchUtil.java 92b0e031 
  security-admin/src/main/java/org/apache/ranger/common/ServiceUtil.java e82d33d3 
  security-admin/src/main/java/org/apache/ranger/entity/XXServiceDef.java 3d496831 
  security-admin/src/main/java/org/apache/ranger/rest/PublicAPIs.java 7818eb59 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 9e4d799b 


Diff: https://reviews.apache.org/r/65793/diff/1/


Testing
-------

Tested locally


Thanks,

Zsombor Gegesy


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message