@@ -43,8 +43,6 @@ public class Identity {
4343
4444 private char [] pswd ;
4545
46- private Logger logger ;
47-
4846 /**
4947 * Creates an Identity instance.this type of the instance can
5048 * only be used to store server certificate identity.
@@ -56,8 +54,6 @@ public class Identity {
5654 public Identity (MerchantConfig merchantConfig ,X509Certificate x509Certificate ,Logger logger ) throws SignException {
5755 this .merchantConfig = merchantConfig ;
5856 this .x509Cert =x509Certificate ;
59- this .logger =logger ;
60-
6157 if (merchantConfig .isJdkCertEnabled () || merchantConfig .isCacertEnabled ()){
6258 setupJdkServerCerts ();
6359 }
@@ -97,16 +93,13 @@ else if (subjectDNrray.length == 2 && subjectDNrray[1].contains(SERVER_ALIAS)) {
9793 * @param privateKey
9894 * @throws SignException
9995 */
100- public Identity (MerchantConfig merchantConfig ,X509Certificate x509Certificate , PrivateKey privateKey ,Logger logger ) throws SignException {
96+ public Identity (MerchantConfig merchantConfig ,X509Certificate x509Certificate , PrivateKey privateKey , Logger logger ) throws SignException {
10197 this .merchantConfig = merchantConfig ;
10298 this .x509Cert = x509Certificate ;
10399 this .privateKey = privateKey ;
104- this .logger =logger ;
105-
106100 try {
107101 this .lastModifiedDate =merchantConfig .getKeyFile ().lastModified ();
108102 } catch (ConfigException e ) {
109-
110103 logger .log (Logger .LT_EXCEPTION ,
111104 "Identity object ,cannot instantiate with key file lastModifiedDate. "
112105 + e .getMessage ());
@@ -120,7 +113,7 @@ public Identity(MerchantConfig merchantConfig,X509Certificate x509Certificate, P
120113 * else isValid method will return true and certificate reload will not occur.
121114 */
122115
123- public boolean isValid (File keyFile ) {
116+ public boolean isValid (File keyFile , Logger logger ) {
124117 boolean changeKeyFileStatus =(this .lastModifiedDate == keyFile .lastModified ());
125118 if (!changeKeyFileStatus ) {
126119 logger .log (Logger .LT_INFO , "Key file changed" );
0 commit comments