Details

      Description

      HtmlMenuRenderer.java:82, UCF_USELESS_CONTROL_FLOW

      • UCF: Useless control flow in org.apache.ofbiz.widget.renderer.html.HtmlMenuRenderer.appendOfbizUrl(Appendable, String)

      This method contains a useless control flow statement, where control flow continues onto the same place regardless of whether or not the branch is taken. For example, this is caused by having an empty statement block for an if statement:

      if (argv.length == 0)

      { // TODO: handle this case }

      HtmlMenuRenderer.java:111, UCF_USELESS_CONTROL_FLOW

      • UCF: Useless control flow in org.apache.ofbiz.widget.renderer.html.HtmlMenuRenderer.appendContentUrl(Appendable, String)

      This method contains a useless control flow statement, where control flow continues onto the same place regardless of whether or not the branch is taken. For example, this is caused by having an empty statement block for an if statement:

      if (argv.length == 0)

      { // TODO: handle this case }

      HtmlMenuRenderer.java:470, NP_LOAD_OF_KNOWN_NULL_VALUE

      • NP: Load of known null value in org.apache.ofbiz.widget.renderer.html.HtmlMenuRenderer.renderLink(Appendable, Map, ModelMenuItem$MenuLink)

      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
        jleichert Julian Leichert added a comment -
        • Line 82,111: Removed useless Control flow line
        • Line 470: Removed redundant Null check, and following branches that would never be executed.
        Show
        jleichert Julian Leichert added a comment - Line 82,111: Removed useless Control flow line Line 470: Removed redundant Null check, and following branches that would never be executed.
        Hide
        mbrohl Michael Brohl added a comment -

        Thanks Julian,

        your modified patch is in trunk r1811439.

        I additionally removed all commented out code.

        Show
        mbrohl Michael Brohl added a comment - Thanks Julian, your modified patch is in trunk r1811439. I additionally removed all commented out code.

          People

          • Assignee:
            mbrohl Michael Brohl
            Reporter:
            jleichert Julian Leichert
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development