You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Julian Leichert (JIRA)" <ji...@apache.org> on 2017/09/21 13:30:00 UTC

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

     [ https://issues.apache.org/jira/browse/OFBIZ-9737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Leichert updated OFBIZ-9737:
-----------------------------------
    Attachment: OFBIZ-9737_org.apache.ofbiz.order.thirdparty.zipsales_bugfixes.patch

class ZipSalesServices
 - line 65 : moved SimpleDateFormat to method, to fix findbug warning
 - line 286 : added locale
 - line 288 - 301 : removed, because it will never be executed. Maye cityLookup or zipLookup
                            were intended?

> [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
>         Attachments: OFBIZ-9737_org.apache.ofbiz.order.thirdparty.zipsales_bugfixes.patch
>
>
> 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)