From 0fb7f3b9708ded12736e9851a415543e0e4c091f Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Wed, 26 Nov 2014 10:05:30 -0800 Subject: [PATCH] Minor cleanup. // FREEBIE --- .../api/crypto/AttachmentCipherInputStream.java | 13 ++----------- .../push/exceptions/UnregisteredUserException.java | 1 - 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/libtextsecure/src/main/java/org/whispersystems/textsecure/api/crypto/AttachmentCipherInputStream.java b/libtextsecure/src/main/java/org/whispersystems/textsecure/api/crypto/AttachmentCipherInputStream.java index 0b48ec095..d0eff59ee 100644 --- a/libtextsecure/src/main/java/org/whispersystems/textsecure/api/crypto/AttachmentCipherInputStream.java +++ b/libtextsecure/src/main/java/org/whispersystems/textsecure/api/crypto/AttachmentCipherInputStream.java @@ -16,8 +16,6 @@ */ package org.whispersystems.textsecure.api.crypto; -import android.util.Log; - import org.whispersystems.libaxolotl.InvalidMacException; import org.whispersystems.libaxolotl.InvalidMessageException; import org.whispersystems.textsecure.internal.util.Util; @@ -109,15 +107,8 @@ public class AttachmentCipherInputStream extends FileInputStream { done = true; return flourish; - } catch (IllegalBlockSizeException e) { - Log.w("EncryptingPartInputStream", e); - throw new IOException("Illegal block size exception!"); - } catch (ShortBufferException e) { - Log.w("EncryptingPartInputStream", e); - throw new IOException("Short buffer exception!"); - } catch (BadPaddingException e) { - Log.w("EncryptingPartInputStream", e); - throw new IOException("Bad padding exception!"); + } catch (IllegalBlockSizeException | BadPaddingException | ShortBufferException e) { + throw new IOException(e); } } diff --git a/libtextsecure/src/main/java/org/whispersystems/textsecure/api/push/exceptions/UnregisteredUserException.java b/libtextsecure/src/main/java/org/whispersystems/textsecure/api/push/exceptions/UnregisteredUserException.java index 8817f23db..eee53b09d 100644 --- a/libtextsecure/src/main/java/org/whispersystems/textsecure/api/push/exceptions/UnregisteredUserException.java +++ b/libtextsecure/src/main/java/org/whispersystems/textsecure/api/push/exceptions/UnregisteredUserException.java @@ -17,7 +17,6 @@ package org.whispersystems.textsecure.api.push.exceptions; import java.io.IOException; -import java.util.List; public class UnregisteredUserException extends IOException {