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

Fix problems detected by static code analysis

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Issue Links

          Activity

            People

            • Assignee:
              zsombor Zsombor Gegesy
              Reporter:
              zsombor Zsombor Gegesy

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment