Commit 2b41a213 authored by Shubham Ajmera's avatar Shubham Ajmera
Browse files

Port OpenJDK 8 changes to CipherInputStream

List of changes:
 - Throwing back IllegalBlockException, BadPaddingException and
 IllegalStateException caught in getMoreDate().
 - An instance variable has been introduced to keep a note of state of the
   stream. If the stream is already closed, close method doesn't perform
   any operations. Also, minor optimization to not to call
   cipher.doFinal() when the end of the input stream has already been
   reached.
 - Minor updates in JavaDocs.

Added test for change in behavior of close method.

Test: libcore.javax.crypto.CipherInputStreamTest
Test: org.apache.harmony.crypto.tests.javax.crypto.CipherInputStreamTest
Test: org.apache.harmony.crypto.tests.javax.crypto.CipherInputStream1Test

Bug: 29631070
Change-Id: I407256a1b9ec2c72a59ce3ba50192496cd86d4bb
parent f9228566
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment