From f2b0394db3d35160b45a955d383bcebc8592a74e Mon Sep 17 00:00:00 2001 From: ByteDream Date: Sat, 5 Dec 2020 01:01:09 +0100 Subject: [PATCH] Caught NullPointerException --- src/org/bytedream/untisbot/data/Data.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/bytedream/untisbot/data/Data.java b/src/org/bytedream/untisbot/data/Data.java index 28e574c..808bb33 100755 --- a/src/org/bytedream/untisbot/data/Data.java +++ b/src/org/bytedream/untisbot/data/Data.java @@ -50,7 +50,7 @@ public class Data { public String getUsername() { try { return crypt.decrypt((String) (data[2])); - } catch (NoSuchPaddingException | NoSuchAlgorithmException | InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidKeySpecException ignore) { + } catch (NoSuchPaddingException | NoSuchAlgorithmException | InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidKeySpecException | NullPointerException ignore) { return null; } } @@ -58,7 +58,7 @@ public class Data { public String getPassword() { try { return crypt.decrypt((String) (data[3])); - } catch (NoSuchPaddingException | NoSuchAlgorithmException | InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidKeySpecException ignore) { + } catch (NoSuchPaddingException | NoSuchAlgorithmException | InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidKeySpecException | NullPointerException ignore) { return null; } }