[jira] [Updated] (OFBIZ-9454) [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce

2017-07-14 Thread Kyra Pritzel-Hentley (JIRA)

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

Kyra Pritzel-Hentley updated OFBIZ-9454:

Attachment: OFBIZ-9454_accounting.thirdparty.clearcommerce.patch

This patch should finally cover all above mentioned bugs. The class 
CCServicesTest needed another assertion of the of authResult parameter to check 
if it is null and then fail the test. (Since no more NullPointerException is 
thrown with the equals() method) 

While trying to test the class I learned that CCServicesTest is actually never 
tested (not included in any test-suite). I wonder why this class is still in 
the OFBiz project if it is never used for testing. And after adding the class 
to a suite, the class failed 4 out of 6 tests. This, of course, is a topic for 
another ticket but is probably worth looking into.  

> [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce
> -
>
> Key: OFBIZ-9454
> URL: https://issues.apache.org/jira/browse/OFBIZ-9454
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: accounting
>Affects Versions: Trunk
>Reporter: Kyra Pritzel-Hentley
>Assignee: Michael Brohl
>Priority: Minor
> Attachments: 
> OFBIZ-9454_accounting.thirdparty.clearcommerce_bugfixes.patch, 
> OFBIZ-9454_accounting.thirdparty.clearcommerce.patch
>
>
> CCPaymentServices.java:78: 109: 144: 178: 235: 270, DM_BOOLEAN_CTOR
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccAuth(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCredit(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCapture(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRelease(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRefund(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccReAuth(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.
> CCPaymentServices.java:772, SBSC_USE_STRINGBUFFER_CONCATENATION
> * SBSC: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.appendPaymentMechNode(Element,
>  GenericValue, String, String) concatenates strings using + in a loop
> The method seems to be building a String using concatenation in a loop. In 
> each iteration, the String is converted to a StringBuffer/StringBuilder, 
> appended to, and converted back to a String. This can lead to a cost 
> quadratic in the number of iterations, as the growing string is recopied in 
> each iteration.
> Better performance can be obtained by using a StringBuffer (or StringBuilder 
> in Java 1.5) explicitly.
> CCPaymentServices.java:902, DM_DEFAULT_ENCODING
> * Dm: Found reliance on default encoding in 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.sendRequest(Document,
>  String, Delegator): java.io.ByteArrayOutputStream.toString()
> 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 behavior to vary between platforms. 
> Use an alternative API and specify a charset name or Charset object 
> explicitly.
> CCServicesTest.java:101: 131: 162: 209, DM_BOOLEAN_CTOR, Priorität: Normal
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testAuth()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCredit()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testPurchaseSubscription()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCCReport()
>  invokes inefficient Boolean 

[jira] [Updated] (OFBIZ-9454) [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce

2017-07-13 Thread Kyra Pritzel-Hentley (JIRA)

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

Kyra Pritzel-Hentley updated OFBIZ-9454:

Attachment: OFBIZ-9454_accounting.thirdparty.clearcommerce_bugfixes.patch

The String formatter works great! Thank you Tobias for your suggestion. 
Additionally the new patch changes 
{code:java} if (((Boolean) result.get("authResult")).equals(new 
Boolean(false))) {code} to
{code:java} if ((Boolean.FALSE).equals((Boolean) result.get("authResult"))) 
{code} in order to prevent Null Pointer Exceptions.

 

> [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce
> -
>
> Key: OFBIZ-9454
> URL: https://issues.apache.org/jira/browse/OFBIZ-9454
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: accounting
>Affects Versions: Trunk
>Reporter: Kyra Pritzel-Hentley
>Assignee: Michael Brohl
>Priority: Minor
> Attachments: 
> OFBIZ-9454_accounting.thirdparty.clearcommerce_bugfixes.patch
>
>
> CCPaymentServices.java:78: 109: 144: 178: 235: 270, DM_BOOLEAN_CTOR
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccAuth(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCredit(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCapture(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRelease(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRefund(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccReAuth(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.
> CCPaymentServices.java:772, SBSC_USE_STRINGBUFFER_CONCATENATION
> * SBSC: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.appendPaymentMechNode(Element,
>  GenericValue, String, String) concatenates strings using + in a loop
> The method seems to be building a String using concatenation in a loop. In 
> each iteration, the String is converted to a StringBuffer/StringBuilder, 
> appended to, and converted back to a String. This can lead to a cost 
> quadratic in the number of iterations, as the growing string is recopied in 
> each iteration.
> Better performance can be obtained by using a StringBuffer (or StringBuilder 
> in Java 1.5) explicitly.
> CCPaymentServices.java:902, DM_DEFAULT_ENCODING
> * Dm: Found reliance on default encoding in 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.sendRequest(Document,
>  String, Delegator): java.io.ByteArrayOutputStream.toString()
> 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 behavior to vary between platforms. 
> Use an alternative API and specify a charset name or Charset object 
> explicitly.
> CCServicesTest.java:101: 131: 162: 209, DM_BOOLEAN_CTOR, Priorität: Normal
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testAuth()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCredit()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testPurchaseSubscription()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCCReport()
>  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.



--
This message was sent by Atlassian JIRA

[jira] [Updated] (OFBIZ-9454) [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce

2017-07-13 Thread Kyra Pritzel-Hentley (JIRA)

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

Kyra Pritzel-Hentley updated OFBIZ-9454:

Attachment: (was: 
OFBIZ-9454_accounting.thirdparty.clearcommerce_bugfixes.patch)

> [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce
> -
>
> Key: OFBIZ-9454
> URL: https://issues.apache.org/jira/browse/OFBIZ-9454
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: accounting
>Affects Versions: Trunk
>Reporter: Kyra Pritzel-Hentley
>Assignee: Michael Brohl
>Priority: Minor
>
> CCPaymentServices.java:78: 109: 144: 178: 235: 270, DM_BOOLEAN_CTOR
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccAuth(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCredit(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCapture(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRelease(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRefund(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccReAuth(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.
> CCPaymentServices.java:772, SBSC_USE_STRINGBUFFER_CONCATENATION
> * SBSC: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.appendPaymentMechNode(Element,
>  GenericValue, String, String) concatenates strings using + in a loop
> The method seems to be building a String using concatenation in a loop. In 
> each iteration, the String is converted to a StringBuffer/StringBuilder, 
> appended to, and converted back to a String. This can lead to a cost 
> quadratic in the number of iterations, as the growing string is recopied in 
> each iteration.
> Better performance can be obtained by using a StringBuffer (or StringBuilder 
> in Java 1.5) explicitly.
> CCPaymentServices.java:902, DM_DEFAULT_ENCODING
> * Dm: Found reliance on default encoding in 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.sendRequest(Document,
>  String, Delegator): java.io.ByteArrayOutputStream.toString()
> 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 behavior to vary between platforms. 
> Use an alternative API and specify a charset name or Charset object 
> explicitly.
> CCServicesTest.java:101: 131: 162: 209, DM_BOOLEAN_CTOR, Priorität: Normal
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testAuth()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCredit()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testPurchaseSubscription()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCCReport()
>  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.



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


[jira] [Updated] (OFBIZ-9454) [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce

2017-07-13 Thread Kyra Pritzel-Hentley (JIRA)

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

Kyra Pritzel-Hentley updated OFBIZ-9454:

Attachment: OFBIZ-9454_accounting.thirdparty.clearcommerce_bugfixes.patch

Hi Michael,

thank you for your suggestion! I have updated the patch, replacing 
Boolean.valueOf(false) with Boolean.FALSE.

> [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce
> -
>
> Key: OFBIZ-9454
> URL: https://issues.apache.org/jira/browse/OFBIZ-9454
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: accounting
>Affects Versions: Trunk
>Reporter: Kyra Pritzel-Hentley
>Assignee: Michael Brohl
>Priority: Minor
> Attachments: 
> OFBIZ-9454_accounting.thirdparty.clearcommerce_bugfixes.patch
>
>
> CCPaymentServices.java:78: 109: 144: 178: 235: 270, DM_BOOLEAN_CTOR
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccAuth(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCredit(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCapture(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRelease(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRefund(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccReAuth(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.
> CCPaymentServices.java:772, SBSC_USE_STRINGBUFFER_CONCATENATION
> * SBSC: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.appendPaymentMechNode(Element,
>  GenericValue, String, String) concatenates strings using + in a loop
> The method seems to be building a String using concatenation in a loop. In 
> each iteration, the String is converted to a StringBuffer/StringBuilder, 
> appended to, and converted back to a String. This can lead to a cost 
> quadratic in the number of iterations, as the growing string is recopied in 
> each iteration.
> Better performance can be obtained by using a StringBuffer (or StringBuilder 
> in Java 1.5) explicitly.
> CCPaymentServices.java:902, DM_DEFAULT_ENCODING
> * Dm: Found reliance on default encoding in 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.sendRequest(Document,
>  String, Delegator): java.io.ByteArrayOutputStream.toString()
> 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 behavior to vary between platforms. 
> Use an alternative API and specify a charset name or Charset object 
> explicitly.
> CCServicesTest.java:101: 131: 162: 209, DM_BOOLEAN_CTOR, Priorität: Normal
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testAuth()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCredit()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testPurchaseSubscription()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCCReport()
>  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.



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


[jira] [Updated] (OFBIZ-9454) [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce

2017-07-13 Thread Kyra Pritzel-Hentley (JIRA)

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

Kyra Pritzel-Hentley updated OFBIZ-9454:

Attachment: (was: 
OFBIZ-9454_accounting.thirdparty.clearcommerce_bugfixes.patch)

> [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce
> -
>
> Key: OFBIZ-9454
> URL: https://issues.apache.org/jira/browse/OFBIZ-9454
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: accounting
>Affects Versions: Trunk
>Reporter: Kyra Pritzel-Hentley
>Assignee: Michael Brohl
>Priority: Minor
>
> CCPaymentServices.java:78: 109: 144: 178: 235: 270, DM_BOOLEAN_CTOR
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccAuth(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCredit(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCapture(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRelease(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRefund(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccReAuth(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.
> CCPaymentServices.java:772, SBSC_USE_STRINGBUFFER_CONCATENATION
> * SBSC: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.appendPaymentMechNode(Element,
>  GenericValue, String, String) concatenates strings using + in a loop
> The method seems to be building a String using concatenation in a loop. In 
> each iteration, the String is converted to a StringBuffer/StringBuilder, 
> appended to, and converted back to a String. This can lead to a cost 
> quadratic in the number of iterations, as the growing string is recopied in 
> each iteration.
> Better performance can be obtained by using a StringBuffer (or StringBuilder 
> in Java 1.5) explicitly.
> CCPaymentServices.java:902, DM_DEFAULT_ENCODING
> * Dm: Found reliance on default encoding in 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.sendRequest(Document,
>  String, Delegator): java.io.ByteArrayOutputStream.toString()
> 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 behavior to vary between platforms. 
> Use an alternative API and specify a charset name or Charset object 
> explicitly.
> CCServicesTest.java:101: 131: 162: 209, DM_BOOLEAN_CTOR, Priorität: Normal
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testAuth()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCredit()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testPurchaseSubscription()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCCReport()
>  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.



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


[jira] [Updated] (OFBIZ-9454) [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce

2017-07-10 Thread Kyra Pritzel-Hentley (JIRA)

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

Kyra Pritzel-Hentley updated OFBIZ-9454:

Flags: Patch

> [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce
> -
>
> Key: OFBIZ-9454
> URL: https://issues.apache.org/jira/browse/OFBIZ-9454
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: accounting
>Affects Versions: Trunk
>Reporter: Kyra Pritzel-Hentley
>Priority: Minor
> Attachments: 
> OFBIZ-9454_accounting.thirdparty.clearcommerce_bugfixes.patch
>
>
> CCPaymentServices.java:78: 109: 144: 178: 235: 270, DM_BOOLEAN_CTOR
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccAuth(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCredit(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCapture(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRelease(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRefund(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccReAuth(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.
> CCPaymentServices.java:772, SBSC_USE_STRINGBUFFER_CONCATENATION
> * SBSC: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.appendPaymentMechNode(Element,
>  GenericValue, String, String) concatenates strings using + in a loop
> The method seems to be building a String using concatenation in a loop. In 
> each iteration, the String is converted to a StringBuffer/StringBuilder, 
> appended to, and converted back to a String. This can lead to a cost 
> quadratic in the number of iterations, as the growing string is recopied in 
> each iteration.
> Better performance can be obtained by using a StringBuffer (or StringBuilder 
> in Java 1.5) explicitly.
> CCPaymentServices.java:902, DM_DEFAULT_ENCODING
> * Dm: Found reliance on default encoding in 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.sendRequest(Document,
>  String, Delegator): java.io.ByteArrayOutputStream.toString()
> 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 behavior to vary between platforms. 
> Use an alternative API and specify a charset name or Charset object 
> explicitly.
> CCServicesTest.java:101: 131: 162: 209, DM_BOOLEAN_CTOR, Priorität: Normal
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testAuth()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCredit()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testPurchaseSubscription()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCCReport()
>  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.



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


[jira] [Updated] (OFBIZ-9454) [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce

2017-07-10 Thread Kyra Pritzel-Hentley (JIRA)

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

Kyra Pritzel-Hentley updated OFBIZ-9454:

Attachment: OFBIZ-9454_accounting.thirdparty.clearcommerce_bugfixes.patch

The patch resolves all bugs except for DM_DEFAULT_ENCODING.

> [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce
> -
>
> Key: OFBIZ-9454
> URL: https://issues.apache.org/jira/browse/OFBIZ-9454
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: accounting
>Affects Versions: Trunk
>Reporter: Kyra Pritzel-Hentley
>Priority: Minor
> Attachments: 
> OFBIZ-9454_accounting.thirdparty.clearcommerce_bugfixes.patch
>
>
> CCPaymentServices.java:78: 109: 144: 178: 235: 270, DM_BOOLEAN_CTOR
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccAuth(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCredit(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCapture(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRelease(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRefund(DispatchContext,
>  Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) 
> instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccReAuth(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.
> CCPaymentServices.java:772, SBSC_USE_STRINGBUFFER_CONCATENATION
> * SBSC: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.appendPaymentMechNode(Element,
>  GenericValue, String, String) concatenates strings using + in a loop
> The method seems to be building a String using concatenation in a loop. In 
> each iteration, the String is converted to a StringBuffer/StringBuilder, 
> appended to, and converted back to a String. This can lead to a cost 
> quadratic in the number of iterations, as the growing string is recopied in 
> each iteration.
> Better performance can be obtained by using a StringBuffer (or StringBuilder 
> in Java 1.5) explicitly.
> CCPaymentServices.java:902, DM_DEFAULT_ENCODING
> * Dm: Found reliance on default encoding in 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.sendRequest(Document,
>  String, Delegator): java.io.ByteArrayOutputStream.toString()
> 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 behavior to vary between platforms. 
> Use an alternative API and specify a charset name or Charset object 
> explicitly.
> CCServicesTest.java:101: 131: 162: 209, DM_BOOLEAN_CTOR, Priorität: Normal
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testAuth()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCredit()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testPurchaseSubscription()
>  invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
> * Dm: 
> org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCCReport()
>  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.



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


[jira] [Updated] (OFBIZ-9454) [FB] Package org.apache.ofbiz.accounting.thirdparty.clearcommerce

2017-07-07 Thread Kyra Pritzel-Hentley (JIRA)

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

Kyra Pritzel-Hentley updated OFBIZ-9454:

Description: 
CCPaymentServices.java:78: 109: 144: 178: 235: 270, DM_BOOLEAN_CTOR
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccAuth(DispatchContext,
 Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCredit(DispatchContext,
 Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCapture(DispatchContext,
 Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRelease(DispatchContext,
 Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRefund(DispatchContext,
 Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccReAuth(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.


CCPaymentServices.java:772, SBSC_USE_STRINGBUFFER_CONCATENATION
* SBSC: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.appendPaymentMechNode(Element,
 GenericValue, String, String) concatenates strings using + in a loop
The method seems to be building a String using concatenation in a loop. In each 
iteration, the String is converted to a StringBuffer/StringBuilder, appended 
to, and converted back to a String. This can lead to a cost quadratic in the 
number of iterations, as the growing string is recopied in each iteration.
Better performance can be obtained by using a StringBuffer (or StringBuilder in 
Java 1.5) explicitly.

CCPaymentServices.java:902, DM_DEFAULT_ENCODING
* Dm: Found reliance on default encoding in 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.sendRequest(Document,
 String, Delegator): java.io.ByteArrayOutputStream.toString()
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 behavior to vary between platforms. 
Use an alternative API and specify a charset name or Charset object explicitly.

CCServicesTest.java:101: 131: 162: 209, DM_BOOLEAN_CTOR, Priorität: Normal
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testAuth() 
invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCredit()
 invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testPurchaseSubscription()
 invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCServicesTest.testCCReport()
 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.


  was:
CCPaymentServices.java:78: 109: 144: 178: 235: 270, DM_BOOLEAN_CTOR
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccAuth(DispatchContext,
 Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCredit(DispatchContext,
 Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccCapture(DispatchContext,
 Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRelease(DispatchContext,
 Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccRefund(DispatchContext,
 Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
* Dm: 
org.apache.ofbiz.accounting.thirdparty.clearcommerce.CCPaymentServices.ccReAuth(DispatchContext,
 Map) invokes inefficient Boolean constructor; use