Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9450 Fixing defects reported by code analysis tools
  3. OFBIZ-9686

[FB] Package org.apache.ofbiz.widget.renderer.html

    XMLWordPrintableJSON

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).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: