Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1991

Fix problems detected by static code analysis

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.7.1
    • Fix Version/s: 1.0.0
    • Component/s: admin
    • Flags:
      Patch

      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

       

        Attachments

        1. RANGER-1991-fix.patch
          4 kB
          Zsombor Gegesy
        2. 0001-RANGER-1991-Import-policy-failure-fix-caused-by-stat.patch
          3 kB
          Pradeep Agrawal
        3. RANGER-1991.patch
          15 kB
          Zsombor Gegesy

          Issue Links

            Activity

              People

              • Assignee:
                zsombor Zsombor Gegesy
                Reporter:
                zsombor Zsombor Gegesy
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: