Improved: Fixing defects reported by code analysis tools, package
org.apache.ofbiz.accounting.thirdparty.authorizedotnet.
Thanks Kyra Pritzel-Hentley for reporting.
package org.apache.ofbiz.accounting.thirdparty.authorizedotnet;
import java.math.BigDecimal;
+import java.util.Arrays;
import org.apache.ofbiz.base.util.UtilValidate;
@@ -112,8 +113,9 @@ public class AuthorizeResponse {
private String getResponseField(String field) {
int position = pos.getPosition(field);
- if (position == -1)
+ if (position == -1) {
return null;
+ }
return getResponseField(position);
}
@@ -128,7 +130,7 @@ public class AuthorizeResponse {
@Override
public String toString() {
- return response.toString();
+ return Arrays.toString(response);
}
public static abstract class RespPositions {
