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

Michael Brohl closed OFBIZ-9810.
--------------------------------
       Resolution: Implemented
    Fix Version/s: Upcoming Release

Thanks Julian,

your patch is in trunk r1817678. 

> [FB] Package org.apache.ofbiz.shipment.thirdparty.dhl
> -----------------------------------------------------
>
>                 Key: OFBIZ-9810
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9810
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: ALL APPLICATIONS, ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Julian Leichert
>            Assignee: Michael Brohl
>            Priority: Minor
>             Fix For: Upcoming Release
>
>         Attachments: 
> OFBIZ-9810_org.apache.ofbiz.shipment.thirdparty.dhl_bugfixes.patch
>
>
> DhlServices.java:97, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of conStr, which is known to be non-null in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.sendDhlRequest(String, 
> Delegator, String, String, Locale)
> This method contains a redundant check of a known non-null value against the 
> constant null.
> DhlServices.java:194, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of shippingKey, which is known to be non-null in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.dhlRateEstimate(DispatchContext,
>  Map)
> This method contains a redundant check of a known non-null value against the 
> constant null.
> DhlServices.java:194, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of accountNbr, which is known to be non-null in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.dhlRateEstimate(DispatchContext,
>  Map)
> This method contains a redundant check of a known non-null value against the 
> constant null.
> DhlServices.java:235, DM_BOXED_PRIMITIVE_TOSTRING
> - Bx: Primitive boxed just to call toString in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.dhlRateEstimate(DispatchContext,
>  Map)
> A boxed primitive is allocated just to call toString(). It is more effective 
> to just use the static form of toString which takes the primitive value. So,
> Replace...    With this...
> new Integer(1).toString()     Integer.toString(1)
> new Long(1).toString()        Long.toString(1)
> new Float(1.0).toString()     Float.toString(1.0)
> new Double(1.0).toString()    Double.toString(1.0)
> new Byte(1).toString()        Byte.toString(1)
> new Short(1).toString()       Short.toString(1)
> new Boolean(true).toString()  Boolean.toString(true)
> DhlServices.java:239, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of templateName, which is known to be non-null in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.dhlRateEstimate(DispatchContext,
>  Map)
> This method contains a redundant check of a known non-null value against the 
> constant null.
> DhlServices.java:398, DLS_DEAD_LOCAL_STORE
> - DLS: Dead store to result in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.dhlRegisterInquire(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.
> DhlServices.java:402, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of accountNbr, which is known to be non-null in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.dhlRegisterInquire(DispatchContext,
>  Map)
> This method contains a redundant check of a known non-null value against the 
> constant null.
> DhlServices.java:641, UCF_USELESS_CONTROL_FLOW
> - UCF: Useless control flow in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.dhlShipmentConfirm(DispatchContext,
>  Map)
> 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
>     }
> DhlServices.java:703, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of accountNbr, which is known to be non-null in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.dhlShipmentConfirm(DispatchContext,
>  Map)
> This method contains a redundant check of a known non-null value against the 
> constant null.
> DhlServices.java:703, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of shippingKey, which is known to be non-null in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.dhlShipmentConfirm(DispatchContext,
>  Map)
> This method contains a redundant check of a known non-null value against the 
> constant null.
> DhlServices.java:710, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of labelImagePreference, which is known to be 
> non-null in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.dhlShipmentConfirm(DispatchContext,
>  Map)
> This method contains a redundant check of a known non-null value against the 
> constant null.
> DhlServices.java:722, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE
> - RCN: Redundant nullcheck of templateName, which is known to be non-null in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.dhlShipmentConfirm(DispatchContext,
>  Map)
> This method contains a redundant check of a known non-null value against the 
> constant null.
> DhlServices.java:845, DM_DEFAULT_ENCODING
> - Dm: Found reliance on default encoding in 
> org.apache.ofbiz.shipment.thirdparty.dhl.DhlServices.handleDhlShipmentConfirmResponse(String,
>  GenericValue, List, Locale): 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. 



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

Reply via email to