Skip to content

Commit 55f200f

Browse files
committed
Various miscellaneous lint fixes
1 parent 9067a42 commit 55f200f

File tree

17 files changed

+49
-58
lines changed

17 files changed

+49
-58
lines changed

src/main/java/net/authorize/aim/Transaction.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,27 +140,27 @@ public static final Transaction createTransaction(Transaction transaction, Map<R
140140

141141
// populate the authorization code
142142
if(responseMap.containsKey(ResponseField.AUTHORIZATION_CODE)) {
143-
_transaction.setAuthorizationCode((String)responseMap.get(ResponseField.AUTHORIZATION_CODE));
143+
_transaction.setAuthorizationCode(responseMap.get(ResponseField.AUTHORIZATION_CODE));
144144
}
145145

146146
// transaction ID
147147
if(responseMap.containsKey(ResponseField.TRANSACTION_ID)) {
148-
_transaction.setTransactionId((String)responseMap.get(ResponseField.TRANSACTION_ID));
148+
_transaction.setTransactionId(responseMap.get(ResponseField.TRANSACTION_ID));
149149
}
150150

151151
CreditCard creditCard = _transaction.getCreditCard();
152152
if(creditCard != null) {
153153
// masked credit card
154154
if(responseMap.containsKey(ResponseField.ACCOUNT_NUMBER)) {
155-
creditCard.setMaskedCreditCardNumber((String)responseMap.get(ResponseField.ACCOUNT_NUMBER));
155+
creditCard.setMaskedCreditCardNumber(responseMap.get(ResponseField.ACCOUNT_NUMBER));
156156
}
157157
// credit card type
158158
if(responseMap.containsKey(ResponseField.CARD_TYPE)) {
159-
creditCard.setCardType(CardType.findByValue((String)responseMap.get(ResponseField.CARD_TYPE)));
159+
creditCard.setCardType(CardType.findByValue(responseMap.get(ResponseField.CARD_TYPE)));
160160
}
161161
// AVS response
162162
if(responseMap.containsKey(ResponseField.AVS_CODE)) {
163-
creditCard.setAvsCode(AVSCode.findByValue((String)responseMap.get(ResponseField.AVS_CODE)));
163+
creditCard.setAvsCode(AVSCode.findByValue(responseMap.get(ResponseField.AVS_CODE)));
164164
}
165165

166166
_transaction.setCreditCard(creditCard);

src/main/java/net/authorize/aim/cardpresent/Result.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ private void importTestMode(Transaction txn) {
314314
txn.getCurrentResponse().getDocumentElement(),
315315
AuthNetField.ELEMENT__TEST_MODE.getFieldName());
316316

317-
this.testMode = "1".equals(_testMode)?true:false;
317+
this.testMode = "1".equals(_testMode);
318318
}
319319

320320
/**

src/main/java/net/authorize/arb/Result.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public void printMessages() {
8888
System.out.println("Result Subscription Id: " + resultSubscriptionId);
8989
}
9090
for(int i = 0; i < messages.size(); i++){
91-
Message message = (Message)messages.get(i);
91+
Message message = messages.get(i);
9292
System.out.println(message.getCode() + " - " + message.getText());
9393
}
9494
}

src/main/java/net/authorize/cim/Result.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,15 +323,15 @@ private void importBillTo(Element root_el, PaymentProfile paymentProfile) {
323323
billTo.setState(getElementText(bill_to_el, AuthNetField.ELEMENT_STATE.getFieldName()));
324324
billTo.setZipPostalCode(getElementText(bill_to_el, AuthNetField.ELEMENT_ZIP.getFieldName()));
325325
billTo.setCountry(getElementText(bill_to_el, AuthNetField.ELEMENT_COUNTRY.getFieldName()));
326-
billTo.setPhoneNumber(getElementText(bill_to_el, AuthNetField.ELEMENT_PHONE_NUMBER.getFieldName()));;
327-
paymentProfile.setBillTo(billTo);
326+
billTo.setPhoneNumber(getElementText(bill_to_el, AuthNetField.ELEMENT_PHONE_NUMBER.getFieldName()));
327+
paymentProfile.setBillTo(billTo);
328328
}
329329
}
330330

331331
/**
332332
* Import the payment information.
333333
*
334-
* @param payment_profile_el
334+
* @param root_el
335335
* @param paymentProfile
336336
*/
337337
private void importPaymentInfo(Element root_el, PaymentProfile paymentProfile) {
@@ -500,7 +500,7 @@ public void printMessages() {
500500
System.out.println("Result customerProfile Id: " + getCustomerProfileId());
501501
}
502502
for(int i = 0; i < messages.size(); i++){
503-
Message message = (Message)messages.get(i);
503+
Message message = messages.get(i);
504504
System.out.println(message.getCode() + " - " + message.getText());
505505
}
506506
}

src/main/java/net/authorize/cim/SplitTenderStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
public enum SplitTenderStatus {
44
VOIDED,
5-
COMPLETED;
5+
COMPLETED
66
}

src/main/java/net/authorize/cim/Transaction.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ private void addAuthentication(BasicXmlDocument document){
130130
* Add the refId to the request.
131131
*
132132
* @param document
133-
* @param subscription
134-
*/
133+
*/
135134
private void addRefId(BasicXmlDocument document) {
136135
if(refId != null) {
137136
Element ref_id_el = document.createElement(AuthNetField.ELEMENT_REFID.getFieldName());
@@ -144,8 +143,7 @@ private void addRefId(BasicXmlDocument document) {
144143
* Add the customer profile id to the request.
145144
*
146145
* @param document
147-
* @param subscription
148-
*/
146+
*/
149147
private void addCustomerProfileId(BasicXmlDocument document) {
150148
if(customerProfile != null && customerProfile.getCustomerProfileId() != null) {
151149
Element customer_profile_id_el = document.createElement(AuthNetField.ELEMENT_CUSTOMER_PROFILE_ID.getFieldName());
@@ -158,8 +156,7 @@ private void addCustomerProfileId(BasicXmlDocument document) {
158156
* Add the customer address id to the request.
159157
*
160158
* @param document
161-
* @param subscription
162-
*/
159+
*/
163160
private void addCustomerAddressId(BasicXmlDocument document) {
164161
if(this.paymentTransaction.getCustomerShippingAddressId() != null) {
165162
Element customer_shipping_address_id_el = document.createElement(AuthNetField.ELEMENT_CUSTOMER_ADDRESS_ID.getFieldName());
@@ -171,8 +168,7 @@ private void addCustomerAddressId(BasicXmlDocument document) {
171168
* Add the customer shipping address id to the request.
172169
*
173170
* @param document
174-
* @param subscription
175-
*/
171+
*/
176172
private void addCustomerShippingAddressId(BasicXmlDocument document) {
177173
if(this.paymentTransaction.getCustomerShippingAddressId() != null) {
178174
Element customer_shipping_address_id_el = document.createElement(AuthNetField.ELEMENT_CUSTOMER_SHIPPING_ADDRESS_ID.getFieldName());
@@ -185,8 +181,7 @@ private void addCustomerShippingAddressId(BasicXmlDocument document) {
185181
* Add the customer payment profile id to the request.
186182
*
187183
* @param document
188-
* @param subscription
189-
*/
184+
*/
190185
private void addCustomerPaymentProfileId(BasicXmlDocument document) {
191186
if(this.paymentTransaction.getCustomerPaymentProfileId() != null) {
192187
Element customer_payment_profile_id_el = document.createElement(AuthNetField.ELEMENT_CUSTOMER_PAYMENT_PROFILE_ID.getFieldName());
@@ -199,8 +194,7 @@ private void addCustomerPaymentProfileId(BasicXmlDocument document) {
199194
* Add the card code to the request.
200195
*
201196
* @param document
202-
* @param subscription
203-
*/
197+
*/
204198
private void addCardCode(BasicXmlDocument document) {
205199
if(paymentTransaction != null && !StringUtils.isEmpty(paymentTransaction.getCardCode())) {
206200
Element card_code_el = document.createElement(AuthNetField.ELEMENT_CARD_CODE.getFieldName());
@@ -253,7 +247,6 @@ private void addCustomerProfile(BasicXmlDocument document) {
253247
* Add payment profiles to the request profile.
254248
*
255249
* @param document
256-
* @param paymentProfiles
257250
* @param profile_el - if null handles the singular element case
258251
*/
259252
private void addPaymentProfiles(BasicXmlDocument document, Element profile_el) {

src/main/java/net/authorize/data/EmailReceipt.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public class EmailReceipt implements Serializable {
2323
private String footerEmailReceipt;
2424
private String merchantEmail;
2525

26-
private EmailReceipt() { };
26+
private EmailReceipt() { }
2727

28-
public static EmailReceipt createEmailReceipt() {
28+
public static EmailReceipt createEmailReceipt() {
2929

3030
return new EmailReceipt();
3131
}

src/main/java/net/authorize/data/reporting/ReturnedItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static ReturnedItem createReturnedItem(String id, Date dateUTC, Date date
6060
returnedItem.setCode( code);
6161
returnedItem.setDescription( description);
6262

63-
logger.debug(String.format("Created: ", returnedItem));
63+
logger.debug(String.format("Created: '%s'", returnedItem));
6464

6565
return returnedItem;
6666
}

src/main/java/net/authorize/data/reporting/Solution.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static Solution createSolution(String id, String name) {
4545
solution.setId(id);
4646
solution.setName(name);
4747

48-
logger.debug(String.format("Created: ", solution));
48+
logger.debug(String.format("Created: '%s'", solution));
4949

5050
return solution;
5151
}

src/main/java/net/authorize/reporting/Result.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ private void importBatchSettledInformation(Transaction txn) {
9292
NodeList batchlist_list = txn.getCurrentResponse().getDocument().getElementsByTagName(AuthNetField.ELEMENT_BATCH.getFieldName());
9393

9494
if(batchlist_list.getLength() == 0) {
95-
return;
96-
} else {
95+
} else {
9796
for(int i = 0; i < batchlist_list.getLength(); i++) {
9897
Element batch_el = (Element)batchlist_list.item(i);
9998
BatchDetails batchDetail = BatchDetails.createBatchDetail();
@@ -157,8 +156,7 @@ private void importTransactionList(Transaction txn) {
157156
NodeList transactions_list = txn.getCurrentResponse().getDocument().getElementsByTagName(AuthNetField.ELEMENT_TRANSACTION.getFieldName());
158157

159158
if(transactions_list.getLength() == 0) {
160-
return;
161-
} else {
159+
} else {
162160
ArrayList<TransactionDetails> transactionDetailList = new ArrayList<TransactionDetails>();
163161
for(int i = 0; i < transactions_list.getLength(); i++) {
164162
Element transaction_el = (Element)transactions_list.item(i);
@@ -514,7 +512,7 @@ public ReportingDetails getReportingDetails() {
514512
public void printMessages() {
515513
System.out.println("Result Code: " + (resultCode != null ? resultCode : "No result code"));
516514
for(int i = 0; i < messages.size(); i++){
517-
Message message = (Message)messages.get(i);
515+
Message message = messages.get(i);
518516
System.out.println(message.getCode() + " - " + message.getText());
519517
}
520518
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy