Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Implemented
    • Affects Version/s: Trunk
    • Fix Version/s: Upcoming Release
    • 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).

        Activity

        Hide
        Dennis Balkir Dennis Balkir added a comment -
        • fixed Diamond Operators

        did nothing else, everything seems intended as it is, even though findbugs doesn't like it like that.
        there were no critical bugs and errors too

        Show
        Dennis Balkir Dennis Balkir added a comment - fixed Diamond Operators did nothing else, everything seems intended as it is, even though findbugs doesn't like it like that. there were no critical bugs and errors too
        Hide
        mbrohl Michael Brohl added a comment -

        Thanks Dennis,

        your patch is in trunk r1811414.

        Show
        mbrohl Michael Brohl added a comment - Thanks Dennis, your patch is in trunk r1811414.

          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:

              Development