[
https://issues.apache.org/jira/browse/RANGER-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16394090#comment-16394090
]
Pradeep Agrawal edited comment on RANGER-1991 at 3/10/18 10:29 AM:
-------------------------------------------------------------------
[~zsombor] : Reopening this issue as its failing policy import feature due to
[line|https://github.com/apache/ranger/blob/ranger-1.0/security-admin/src/main/java/org/apache/ranger/common/RangerSearchUtil.java#L45].
Please refer attached
[^0001-RANGER-1991-Import-policy-failure-fix-caused-by-stat.patch] for the
possible fix. Alternatively, You can revert the commit if you want to fix in
another way.
CC: [~coheig] / [~vperiasamy]
was (Author: pradeep.agrawal):
[~zsombor] : Reopening this issue as its failing policy import feature due to
[line|https://github.com/apache/ranger/blob/ranger-1.0/security-admin/src/main/java/org/apache/ranger/common/RangerSearchUtil.java#L45].
Please refer attached patch for the possible fix. Alternatively, You can
revert the commit if you want to fix in another way.
CC: [~coheig] / [~vperiasamy]
> Fix problems detected by static code analysis
> ---------------------------------------------
>
> Key: RANGER-1991
> URL: https://issues.apache.org/jira/browse/RANGER-1991
> Project: Ranger
> Issue Type: Bug
> Components: admin
> Affects Versions: 0.7.1
> Reporter: Zsombor Gegesy
> Assignee: Zsombor Gegesy
> Priority: Blocker
> Labels: code-cleanup, findbugs
> Fix For: 1.0.0
>
> Attachments:
> 0001-RANGER-1991-Import-policy-failure-fix-caused-by-stat.patch,
> RANGER-1991.patch
>
>
> 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
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)