XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • Trunk
    • 17.12.01
    • content
    • None

    Description

      — ContentManagementEvents.java:189, WMI_WRONG_MAP_ITERATOR
      WMI: org.apache.ofbiz.content.ContentManagementEvents.updatePublishLinks(HttpServletRequest, HttpServletResponse) makes inefficient use of keySet iterator instead of entrySet iterator

      This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

      — ContentManagementEvents.java:241, NP_LOAD_OF_KNOWN_NULL_VALUE
      NP: Load of known null value in org.apache.ofbiz.content.ContentManagementEvents.updatePublishLinks(HttpServletRequest, HttpServletResponse)

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

      — ContentManagementServices.java:237, DLS_DEAD_LOCAL_STORE
      DLS: Dead store to dataResourceResult in org.apache.ofbiz.content.ContentManagementServices.persistContentAndAssoc(DispatchContext, Map)

      This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

      Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

      — ContentManagementServices.java:313, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
      RCN: Redundant nullcheck of contentPurposeList, which is known to be non-null in org.apache.ofbiz.content.ContentManagementServices.persistContentAndAssoc(DispatchContext, Map)

      This method contains a redundant check of a known non-null value against the constant null.

      — ContentManagementServices.java:459, DLS_DEAD_LOCAL_STORE
      DLS: Dead store to permResults in org.apache.ofbiz.content.ContentManagementServices.updateSiteRoles(DispatchContext, Map)

      This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

      Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

      — ContentManagementServices.java:505, DLS_DEAD_LOCAL_STORE
      DLS: Dead store to result in org.apache.ofbiz.content.ContentManagementServices.persistDataResourceAndData(DispatchContext, Map)

      This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

      Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

      — ContentManagementServices.java:598, DLS_DEAD_LOCAL_STORE
      DLS: Dead store to dataResource in org.apache.ofbiz.content.ContentManagementServices.persistDataResourceAndDataMethod(DispatchContext, Map)

      This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

      Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

      — ContentManagementServices.java:987, DM_CONVERT_CASE
      Dm: Use of non-localized String.toUpperCase() or String.toLowerCase() in org.apache.ofbiz.content.ContentManagementServices.updatePageType(DispatchContext, Map)

      A String is being converted to upper or lowercase, using the platform's default encoding. This may result in improper conversions when used with international characters. Use the

      String.toUpperCase( Locale l )
      String.toLowerCase( Locale l )
      versions instead.

      — ContentManagementServices.java:1026, DM_CONVERT_CASE
      Dm: Use of non-localized String.toUpperCase() or String.toLowerCase() in org.apache.ofbiz.content.ContentManagementServices.resetToOutlineMode(DispatchContext, Map)

      A String is being converted to upper or lowercase, using the platform's default encoding. This may result in improper conversions when used with international characters. Use the

      String.toUpperCase( Locale l )
      String.toLowerCase( Locale l )
      versions instead.

      — ContentManagementServices.java:1363, DLS_DEAD_LOCAL_STORE
      DLS: Dead store to result in org.apache.ofbiz.content.ContentManagementServices.updateContentSubscriptionByProduct(DispatchContext, Map)

      This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

      Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

      — ContentManagementServices.java:1375, DLS_DEAD_LOCAL_STORE
      DLS: Dead store to orderCreatedDate in org.apache.ofbiz.content.ContentManagementServices.updateContentSubscriptionByProduct(DispatchContext, Map)

      This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

      Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

      — ContentManagementWorker.java:301, NP_LOAD_OF_KNOWN_NULL_VALUE
      NP: Load of known null value in org.apache.ofbiz.content.ContentManagementWorker.getPermittedPublishPoints(Delegator, List, GenericValue, Security, String, String, String)

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

      — ContentManagementWorker.java:481, NP_LOAD_OF_KNOWN_NULL_VALUE
      NP: Load of known null value in org.apache.ofbiz.content.ContentManagementWorker.getPublishedLinks(Delegator, String, String, GenericValue, Security, String, String, String)

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

      — ContentManagementWorker.java:490, NP_LOAD_OF_KNOWN_NULL_VALUE
      NP: Load of known null value in org.apache.ofbiz.content.ContentManagementWorker.getPublishedLinks(Delegator, String, String, GenericValue, Security, String, String, String)

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

      — ContentManagementWorker.java:526, WMI_WRONG_MAP_ITERATOR
      WMI: org.apache.ofbiz.content.ContentManagementWorker.getPublishedLinks(Delegator, String, String, GenericValue, Security, String, String, String) makes inefficient use of keySet iterator instead of entrySet iterator

      This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

      — ContentManagementWorker.java:537, NP_LOAD_OF_KNOWN_NULL_VALUE
      NP: Load of known null value in org.apache.ofbiz.content.ContentManagementWorker.getAuthorContent(Delegator, String)

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

      — ContentManagementWorker.java:572, NP_LOAD_OF_KNOWN_NULL_VALUE
      NP: Load of known null value in org.apache.ofbiz.content.ContentManagementWorker.getPermittedDepartmentPoints(Delegator, List, GenericValue, Security, String, String, String)

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

      — ConvertTree.java:80, DM_DEFAULT_ENCODING
      Dm: Found reliance on default encoding in org.apache.ofbiz.content.ConvertTree.convertTree(DispatchContext, Map): new java.io.FileReader(String)

      Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behaviour to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.

      — ConvertTree.java:154, UC_USELESS_CONDITION
      Condition has no effect

      This condition always produces the same result as the value of the involved variable was narrowed before. Probably something else was meant or condition can be removed.

      — ConvertTree.java:229, NP_NULL_ON_SOME_PATH
      NP: Possible null pointer dereference of input in org.apache.ofbiz.content.ConvertTree.convertTree(DispatchContext, Map)

      There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: