Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Implemented
    • Affects Version/s: Trunk
    • Fix Version/s: 17.12.01
    • Component/s: base
    • Labels:
      None

      Description

      • GenericTestCaseBase.java:47, UC_USELESS_OBJECT
        Useless object created

      Our analysis shows that this object is useless. It's created and modified, but its value never go outside of the method or produce any side-effect. Either there is a mistake and object was intended to be used or it can be removed.

      This analysis rarely produces false-positives. Common false-positive cases include:

      • This object used to implicitly throw some obscure exception.
      • This object used as a stub to generalize the code.
      • This object used to hold strong references to weak/soft-referenced objects.
      • GenericTestCaseBase.java:99, NP_LOAD_OF_KNOWN_NULL_VALUE
        NP: Load of known null value in org.apache.ofbiz.base.test.GenericTestCaseBase.assertNotEquals(String, Object, Object)

      The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was non-null).

      • GenericTestCaseBase.java:99, NP_LOAD_OF_KNOWN_NULL_VALUE
        NP: Load of known null value in org.apache.ofbiz.base.test.GenericTestCaseBase.assertNotEquals(String, Object, Object)

      The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was non-null).

      • GenericTestCaseBase.java:327, NP_LOAD_OF_KNOWN_NULL_VALUE
        NP: Load of known null value in org.apache.ofbiz.base.test.GenericTestCaseBase.assertEquals(String, Object, Object)

      The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was non-null).

      • GenericTestCaseBase.java:334, NP_LOAD_OF_KNOWN_NULL_VALUE
        NP: Load of known null value in org.apache.ofbiz.base.test.GenericTestCaseBase.assertEquals(String, Object, Object)

      The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was non-null).

        Attachments

          Activity

            People

            • Assignee:
              mbrohl Michael Brohl
              Reporter:
              Dennis Balkir Dennis Balkir
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: