Skip to content

Commit 411eddc

Browse files
committed
properly formatted the below source code after code review
1 parent 9b89587 commit 411eddc

5 files changed

Lines changed: 9 additions & 30 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CyberSource Simple Order API for Java
22

3-
[![Build Status](https://travis-ci.org/CyberSource/cybersource-sdk-java.png?branch=master)](https://travis-ci.org/CyberSource/cybersource-sdk-java)
3+
[![Build Status](https://travis-ci.org/CyberSource/cybersource-sdk-java.png?branch=future)](https://travis-ci.org/CyberSource/cybersource-sdk-java)
44

55
## Package Managers
66

java/src/main/java/com/cybersource/ws/client/Identity.java

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ public class Identity {
4343

4444
private Logger logger = null;
4545

46-
47-
48-
49-
5046
/**
5147
* Creates an Identity instance.this type of the instance can
5248
* only be used to store server certificate identity.
@@ -120,20 +116,14 @@ public Identity(MerchantConfig merchantConfig,X509Certificate x509Certificate, P
120116
setUpMerchant();
121117
}
122118

123-
public boolean isValid(File keyFile)
124-
{
125-
126-
if(this.lastModifiedDate == keyFile.lastModified()){
127-
128-
logger.log(Logger.LT_INFO, "key files not yet changed");
129-
}
130-
//boolean b=this.lastModifiedDate == keyFile.lastModified();
131-
//String p=String.valueOf(b);
132-
//logger.log(Logger.LT_INFO,"Check the merchant certificate is new " +p);
133-
//return b;
134-
//logger.log(Logger.LT_INFO, "Could not load the custom HTTP class ");
135-
return this.lastModifiedDate == keyFile.lastModified();
136-
}
119+
public boolean isValid(File keyFile) {
120+
121+
if (this.lastModifiedDate == keyFile.lastModified()) {
122+
123+
logger.log(Logger.LT_INFO, "key files not yet changed");
124+
}
125+
return this.lastModifiedDate == keyFile.lastModified();
126+
}
137127

138128
private void setUpMerchant() throws SignException {
139129
if (serialNumber == null && x509Cert != null) {
@@ -273,5 +263,4 @@ public String toString() {
273263
+ serialNumber + ",expiration=" + expireStr+ " }";
274264
}
275265

276-
277266
}

java/src/main/java/com/cybersource/ws/client/MerchantConfig.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ public boolean isCustomHttpClassEnabled() {
8585
private long retryInterval = 0;
8686
private boolean allowRetry=true;
8787

88-
89-
90-
9188
// getter methods
9289
public boolean getUseSignAndEncrypted() { return useSignAndEncrypted; }
9390

java/src/main/java/com/cybersource/ws/client/SecurityUtil.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ public class SecurityUtil {
4747

4848
private static BouncyCastleProvider bcProvider = new BouncyCastleProvider();
4949

50-
51-
52-
5350
// This is loaded by WSS4J but since we use it lets make sure its here
5451
static {
5552
Security.addProvider(bcProvider);
@@ -83,8 +80,6 @@ public static void loadMerchantP12File(MerchantConfig merchantConfig, Logger log
8380
// Load the KeyStore and get the signing key and certificate
8481
// This change is made based on the assumptions that at point of time , a merchant will have only one P12 Key
8582

86-
87-
8883
Identity identity=identities.get(merchantConfig.getMerchantID());
8984
if(!merchantConfig.isCertificateCacheEnabled() || identity == null || !(identity.isValid(merchantConfig.getKeyFile()))){
9085
try {

java/src/test/java/com/cybersource/ws/client/SecurityUtilIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,6 @@ private static PrivateKey instPrivateKey(PrivateKey pkey) throws Exception{
206206
return privateKey;
207207
}
208208

209-
210-
211209
}
212210

213211

0 commit comments

Comments
 (0)