[jira] [Commented] (RANGER-1991) Fix problems detected by static code analysis
[ https://issues.apache.org/jira/browse/RANGER-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16399395#comment-16399395 ] Velmurugan Periasamy commented on RANGER-1991: -- I have committed this into master also - [https://git-wip-us.apache.org/repos/asf?p=ranger.git;a=commit;h=ad426c24c04e36ff6b7fc286501b4b737b317ad3] so that it is in sync. CC [~pradeep.agrawal]/[~coheig] [~zsombor] - you can revise this when you commit RANGER-2016 fix. Thanks. > 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-fix.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)
[jira] [Commented] (RANGER-1991) Fix problems detected by static code analysis
[ https://issues.apache.org/jira/browse/RANGER-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16396385#comment-16396385 ] Velmurugan Periasamy commented on RANGER-1991: -- Resolving this now. Filed https://issues.apache.org/jira/browse/RANGER-2016 to get the other fix into master. > 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-fix.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)
[jira] [Commented] (RANGER-1991) Fix problems detected by static code analysis
[ https://issues.apache.org/jira/browse/RANGER-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16395264#comment-16395264 ] Pradeep Agrawal commented on RANGER-1991: - I have committed the patch in ranger-1.0 branch: https://github.com/apache/ranger/commit/3d341a4c2429cae259b831b112c6d65eaa12a2e1 > 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-fix.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)
[jira] [Commented] (RANGER-1991) Fix problems detected by static code analysis
[ https://issues.apache.org/jira/browse/RANGER-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16395251#comment-16395251 ] Velmurugan Periasamy commented on RANGER-1991: -- [~pradeep.agrawal] +1 for this suggestion. > 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-fix.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)
[jira] [Commented] (RANGER-1991) Fix problems detected by static code analysis
[ https://issues.apache.org/jira/browse/RANGER-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16395240#comment-16395240 ] Pradeep Agrawal commented on RANGER-1991: - [~zsombor] : I think I should commit my proposed patch in Ranger-1.0 branch and later you can commit your patch in the master branch? 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-fix.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)
[jira] [Commented] (RANGER-1991) Fix problems detected by static code analysis
[ https://issues.apache.org/jira/browse/RANGER-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16383681#comment-16383681 ] Zsombor Gegesy commented on RANGER-1991: Commited to 1.0 branch: https://github.com/apache/ranger/commit/fdce224fa1aa63eba2fec2dce52f3d5ac3532df6 > 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: Minor > Labels: code-cleanup, findbugs > Fix For: 1.0.0 > > Attachments: 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)
[jira] [Commented] (RANGER-1991) Fix problems detected by static code analysis
[ https://issues.apache.org/jira/browse/RANGER-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16380083#comment-16380083 ] Zsombor Gegesy commented on RANGER-1991: Change commited to the master branch: https://github.com/apache/ranger/commit/49b8a7a26653b028b7adaff3809a88f59fee3bf7 > 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: Minor > Labels: code-cleanup, findbugs > Fix For: master > > Attachments: 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)
[jira] [Commented] (RANGER-1991) Fix problems detected by static code analysis
[ https://issues.apache.org/jira/browse/RANGER-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16379083#comment-16379083 ] Ramesh Mani commented on RANGER-1991: - [~zsombor] Never mind I see that RR there in email thread. Thanks. > 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: Minor > Labels: code-cleanup, findbugs > Attachments: 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)
[jira] [Commented] (RANGER-1991) Fix problems detected by static code analysis
[ https://issues.apache.org/jira/browse/RANGER-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16379080#comment-16379080 ] Ramesh Mani commented on RANGER-1991: - [~zsombor] Please create an RR for this patch. Thanks. > 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: Minor > Labels: code-cleanup, findbugs > Attachments: 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)