File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
msal4j-persistence-extension/src/main/java/com/microsoft/aad/msal4jextensions Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 99import com .microsoft .aad .msal4jextensions .persistence .ICacheAccessor ;
1010import com .microsoft .aad .msal4jextensions .persistence .linux .KeyRingAccessor ;
1111import com .microsoft .aad .msal4jextensions .persistence .mac .KeyChainAccessor ;
12- import com .nimbusds .jose .util .StandardCharset ;
1312import com .sun .jna .Platform ;
1413import org .slf4j .Logger ;
1514import org .slf4j .LoggerFactory ;
1615
1716import java .io .File ;
1817import java .io .IOException ;
18+ import java .nio .charset .StandardCharsets ;
1919import java .nio .file .Files ;
2020
2121/**
@@ -124,7 +124,7 @@ public void beforeCacheAccess(ITokenCacheAccessContext iTokenCacheAccessContext)
124124 }
125125 byte [] data = cacheAccessor .read ();
126126 if (data != null ) {
127- iTokenCacheAccessContext .tokenCache ().deserialize (new String (data , StandardCharset .UTF_8 ));
127+ iTokenCacheAccessContext .tokenCache ().deserialize (new String (data , StandardCharsets .UTF_8 ));
128128 }
129129
130130 updateLastSeenCacheFileModifiedTimestamp ();
@@ -141,7 +141,7 @@ public void beforeCacheAccess(ITokenCacheAccessContext iTokenCacheAccessContext)
141141 public void afterCacheAccess (ITokenCacheAccessContext iTokenCacheAccessContext ) {
142142 try {
143143 if (isWriteAccess (iTokenCacheAccessContext )) {
144- cacheAccessor .write (iTokenCacheAccessContext .tokenCache ().serialize ().getBytes (StandardCharset .UTF_8 ));
144+ cacheAccessor .write (iTokenCacheAccessContext .tokenCache ().serialize ().getBytes (StandardCharsets .UTF_8 ));
145145 updateLastSeenCacheFileModifiedTimestamp ();
146146 }
147147 } finally {
Original file line number Diff line number Diff line change 55
66import com .microsoft .aad .msal4jextensions .persistence .CacheFileAccessor ;
77import com .microsoft .aad .msal4jextensions .persistence .ICacheAccessor ;
8- import com .nimbusds .jose .util .StandardCharset ;
98import com .sun .jna .Pointer ;
109
1110import java .io .IOException ;
@@ -57,7 +56,7 @@ public void verify() {
5756
5857 byte [] readData = read (testAttributeValue1 , testAttributeValue2 );
5958
60- if (readData == null || !testData .equals (new String (readData , StandardCharset .UTF_8 ))) {
59+ if (readData == null || !testData .equals (new String (readData , StandardCharsets .UTF_8 ))) {
6160 throw new KeyRingAccessException ("An error while validating KeyRing availability" );
6261 }
6362
You can’t perform that action at this time.
0 commit comments