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 12:42:00 UTC

[jira] [Updated] (OFBIZ-9735) [FB] Package org.apache.ofbiz.party.contact

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

Julian Leichert updated OFBIZ-9735:
-----------------------------------
    Attachment: OFBIZ-9735_org.apache.ofbiz.party.party_bugfixes.patch

class ContactMechServices
 - removed redundant null-checks
 - added utf8
 
class ContactMechWorker
 - added Locale in multiple lines

> [FB] Package org.apache.ofbiz.party.contact
> -------------------------------------------
>
>                 Key: OFBIZ-9735
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9735
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: party
>    Affects Versions: Trunk
>            Reporter: Julian Leichert
>            Priority: Minor
>         Attachments: OFBIZ-9735_org.apache.ofbiz.party.party_bugfixes.patch
>
>
> ContactMechServices.java:508, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of relatedEntityToSet, which is known to be non-null in org.apache.ofbiz.party.contact.ContactMechServices.updatePostalAddress(DispatchContext, Map)
> This method contains a redundant check of a known non-null value against the constant null.
> ContactMechServices.java:710, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of relatedEntityToSet, which is known to be non-null in org.apache.ofbiz.party.contact.ContactMechServices.updateTelecomNumber(DispatchContext, Map)
> This method contains a redundant check of a known non-null value against the constant null.
> ContactMechServices.java:1064, DM_DEFAULT_ENCODING
> - Dm: Found reliance on default encoding in org.apache.ofbiz.party.contact.ContactMechServices.createEmailAddressVerification(DispatchContext, Map): String.getBytes()
> 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.
> ContactMechWorker.java:825, DM_CONVERT_CASE
> - Dm: Use of non-localized String.toUpperCase() or String.toLowerCase() in org.apache.ofbiz.party.contact.ContactMechWorker.isUspsAddress(GenericValue)
> 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.
> ContactMechWorker.java:854, DM_CONVERT_CASE
> - Dm: Use of non-localized String.toUpperCase() or String.toLowerCase() in org.apache.ofbiz.party.contact.ContactMechWorker.isCompanyAddress(GenericValue, String)
> 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.
> ContactMechWorker.java:889, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of postalAddresses, which is known to be non-null in org.apache.ofbiz.party.contact.ContactMechWorker.isCompanyAddress(GenericValue, String)
> This method contains a redundant check of a known non-null value against the constant null.



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