Kyra Pritzel-Hentley created OFBIZ-9485: -------------------------------------------
Summary: [FB] Package org.apache.ofbiz.accounting.thirdparty.eway Key: OFBIZ-9485 URL: https://issues.apache.org/jira/browse/OFBIZ-9485 Project: OFBiz Issue Type: Sub-task Components: accounting Affects Versions: Trunk Reporter: Kyra Pritzel-Hentley Priority: Minor EwayServices.java:99, DM_BOOLEAN_CTOR * Dm: org.apache.ofbiz.accounting.thirdparty.eway.EwayServices.ewayCharge(DispatchContext, Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead Creating new instances of java.lang.Boolean wastes memory, since Boolean objects are immutable and there are only two useful values of this type. Use the Boolean.valueOf() method (or Java 1.5 autoboxing) to create Boolean objects instead. EwayServices.java:166, DM_BOOLEAN_CTOR * Dm: org.apache.ofbiz.accounting.thirdparty.eway.EwayServices.ewayRefund(DispatchContext, Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead Creating new instances of java.lang.Boolean wastes memory, since Boolean objects are immutable and there are only two useful values of this type. Use the Boolean.valueOf() method (or Java 1.5 autoboxing) to create Boolean objects instead. EwayServices.java:231, DM_BOOLEAN_CTOR * Dm: org.apache.ofbiz.accounting.thirdparty.eway.EwayServices.ewayRelease(DispatchContext, Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead Creating new instances of java.lang.Boolean wastes memory, since Boolean objects are immutable and there are only two useful values of this type. Use the Boolean.valueOf() method (or Java 1.5 autoboxing) to create Boolean objects instead. GatewayConnector.java:90, RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE * RCN: Nullcheck of connection at line 90 of value previously dereferenced in org.apache.ofbiz.accounting.thirdparty.eway.GatewayConnector.sendRequest(GatewayRequest) A value is checked here to see whether it is null, but this value can't be null because it was previously dereferenced and if it were null a null pointer exception would have occurred at the earlier dereference. Essentially, this code and the previous dereference disagree as to whether this value is allowed to be null. Either the check is redundant or the previous dereference is erroneous. GatewayConnector.java:96, DM_DEFAULT_ENCODING * Dm: Found reliance on default encoding in org.apache.ofbiz.accounting.thirdparty.eway.GatewayConnector.sendRequest(GatewayRequest): new java.io.OutputStreamWriter(OutputStream) 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)