Skip to content

Commit 9fc38b9

Browse files
author
Inbal Tako
committed
Merge branch 'master' of github.com:securenative/securenative-java into dev
2 parents 98b634f + 0bfbcbe commit 9fc38b9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/com/securenative/Logger.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,3 @@ public void error(String var1, Object... var2) {
8787
}
8888
}
8989
}
90-
91-

src/main/java/com/securenative/models/SDKEvent.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,16 @@ public SDKEvent(EventOptions event, SecureNativeOptions options) throws SecureNa
5454
}
5555

5656
private ClientToken decryptToken(String token, String key) {
57+
if (token == null || token.length() == 0) {
58+
return new ClientToken();
59+
}
5760
ObjectMapper mapper = new ObjectMapper();
5861
try {
5962
String decryptedClientToken = EncryptionUtils.decrypt(token, key);
6063
return mapper.readValue(decryptedClientToken, ClientToken.class);
6164
} catch (Exception ex) {
6265
logger.error("Failed to decrypt token");
6366
}
64-
6567
return new ClientToken();
6668
}
6769

0 commit comments

Comments
 (0)