Skip to content

Commit 0a4653e

Browse files
committed
There was a bug with the test I wrote. With the conditions that I passed to parseVersion it would never throw the error
because the value was the same as CURRENT_CIPHERTEXT_VERSION. The test would pass but the error would not be thrown. It is now fixed and it throws the right error when it receives a wrong version.
1 parent 444146a commit 0a4653e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/com/amazonaws/encryptionsdk/model/CiphertextHeadersTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public void invalidVersion(){
329329
headerBuff.put((byte) 0);
330330

331331
final CiphertextHeaders reconstructedHeaders = new CiphertextHeaders();
332-
reconstructedHeaders.deserialize(headerBuff.array(), 0);
332+
reconstructedHeaders.deserialize(headerBuff.array(), 1);
333333
}
334334

335335
@Test(expected = BadCiphertextException.class)

0 commit comments

Comments
 (0)