Skip to content

Commit 0e243e4

Browse files
Fix null ptr in diagnostics user-id generation
1 parent 6525027 commit 0e243e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TypeDBConsole.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ private static String userID() {
182182
byte[] macHash = MessageDigest.getInstance("SHA-256").digest(mac);
183183
byte[] truncatedHash = Arrays.copyOfRange(macHash, 0, 8);
184184
return String.format("%X", ByteBuffer.wrap(truncatedHash).getLong());
185-
} catch (NoSuchAlgorithmException | IOException e) {
185+
} catch (NoSuchAlgorithmException | IOException | NullPointerException e) {
186186
return "";
187187
}
188188
}

0 commit comments

Comments
 (0)