Skip to content

Commit

Permalink
Remove useless nullcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Apr 14, 2024
1 parent 7563834 commit 2440c0f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/mpo/dayon/common/utils/SystemUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ public static boolean isValidToken(String token) throws NoSuchAlgorithmException

static String checksum(String input) throws NoSuchAlgorithmException {
MessageDigest objSHA = MessageDigest.getInstance("SHA-1");
byte[] bytSHA = objSHA != null ? objSHA.digest(input.getBytes()) : new byte[0];
String hash = new BigInteger(1, bytSHA).toString(16);
String hash = new BigInteger(1, objSHA.digest(input.getBytes())).toString(16);
return hash.substring(hash.length()-1).toUpperCase();
}

Expand Down

0 comments on commit 2440c0f

Please sign in to comment.