--- a/jdk/src/java.base/share/classes/javax/crypto/CipherInputStream.java Tue Oct 14 10:47:45 2014 -0700
+++ b/jdk/src/java.base/share/classes/javax/crypto/CipherInputStream.java Mon Apr 14 21:02:31 2014 +0000
@@ -107,9 +107,10 @@
done = true;
try {
obuffer = cipher.doFinal();
+ } catch (IllegalBlockSizeException | BadPaddingException e) {
+ obuffer = null;
+ throw new IOException(e);
}
- catch (IllegalBlockSizeException e) {obuffer = null;}
- catch (BadPaddingException e) {obuffer = null;}
if (obuffer == null)
return -1;
else {
@@ -120,7 +121,10 @@
}
try {
obuffer = cipher.update(ibuffer, 0, readin);
- } catch (IllegalStateException e) {obuffer = null;};
+ } catch (IllegalStateException e) {
+ obuffer = null;
+ throw e;
+ }
ostart = 0;
if (obuffer == null)
ofinish = 0;
@@ -302,6 +306,7 @@
}
}
catch (BadPaddingException | IllegalBlockSizeException ex) {
+ throw new IOException(ex);
}
ostart = 0;
ofinish = 0;