[jira] [Created] (OFBIZ-9737) [FB] Package org.apache.ofbiz.order.thirdparty.zipsales

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (OFBIZ-9737) [FB] Package org.apache.ofbiz.order.thirdparty.zipsales

Nicolas Malin (Jira)
Julian Leichert created OFBIZ-9737:
--------------------------------------

             Summary: [FB] Package org.apache.ofbiz.order.thirdparty.zipsales
                 Key: OFBIZ-9737
                 URL: https://issues.apache.org/jira/browse/OFBIZ-9737
             Project: OFBiz
          Issue Type: Sub-task
          Components: order
    Affects Versions: Trunk
            Reporter: Julian Leichert
            Priority: Minor


ZipSalesServices.java:106, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
- RCN: Redundant nullcheck of tri, which is known to be non-null in org.apache.ofbiz.order.thirdparty.zipsales.ZipSalesServices.importFlatTable(DispatchContext, Map)

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

ZipSalesServices.java:175, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
- RCN: Redundant nullcheck of rri, which is known to be non-null in org.apache.ofbiz.order.thirdparty.zipsales.ZipSalesServices.importFlatTable(DispatchContext, Map)

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

ZipSalesServices.java:286, DM_CONVERT_CASE
- Dm: Use of non-localized String.toUpperCase() or String.toLowerCase() in org.apache.ofbiz.order.thirdparty.zipsales.ZipSalesServices.getItemTaxList(Delegator, GenericValue, String, String, BigDecimal, BigDecimal, boolean)

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.

ZipSalesServices.java:290, NP_LOAD_OF_KNOWN_NULL_VALUE
- NP: Load of known null value in org.apache.ofbiz.order.thirdparty.zipsales.ZipSalesServices.getItemTaxList(Delegator, GenericValue, String, String, BigDecimal, BigDecimal, boolean)

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

ZipSalesServices.java:489, STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE
- STCAL: Call to method of static java.text.DateFormat in org.apache.ofbiz.order.thirdparty.zipsales.ZipSalesServices.parseDate(String, Timestamp)

As the JavaDoc states, DateFormats are inherently unsafe for multithreaded use. The detector has found a call to an instance of DateFormat that has been obtained via a static field. This looks suspicous.

For more information on this see Sun Bug #6231579 and Sun Bug #6178997.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)