Repository: commons-crypto Updated Branches: refs/heads/master 85a5ea1a3 -> 9f73f2fc1
CRYPTO-134 CipherByteBufferExample should not truncate the string Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/9f73f2fc Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/9f73f2fc Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/9f73f2fc Branch: refs/heads/master Commit: 9f73f2fc1ec45d7c26cc36cd89fd5bf455d1de66 Parents: 85a5ea1 Author: Sebb <s...@apache.org> Authored: Sat Feb 11 12:14:45 2017 +0000 Committer: Sebb <s...@apache.org> Committed: Sat Feb 11 12:14:45 2017 +0000 ---------------------------------------------------------------------- src/changes/changes.xml | 1 + .../apache/commons/crypto/examples/CipherByteBufferExample.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/9f73f2fc/src/changes/changes.xml ---------------------------------------------------------------------- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 1aaf861..da1df8f 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -62,6 +62,7 @@ <body> <release version="1.1.0" date="tba" description="tba"> + <action issue="CRYPTO-134" type="fix" dev="sebb" >CipherByteBufferExample should not truncate the string</action> <action issue="CRYPTO-131" type="add" dev="britter" >Provide FAQ page.</action> </release> http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/9f73f2fc/src/test/java/org/apache/commons/crypto/examples/CipherByteBufferExample.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/crypto/examples/CipherByteBufferExample.java b/src/test/java/org/apache/commons/crypto/examples/CipherByteBufferExample.java index c515461..f35ba4c 100644 --- a/src/test/java/org/apache/commons/crypto/examples/CipherByteBufferExample.java +++ b/src/test/java/org/apache/commons/crypto/examples/CipherByteBufferExample.java @@ -99,7 +99,7 @@ public class CipherByteBufferExample { */ private static String asString(ByteBuffer buffer) { final ByteBuffer copy = buffer.duplicate(); - final byte[] bytes = new byte[Math.min(copy.remaining(),50)]; + final byte[] bytes = new byte[copy.remaining()]; copy.get(bytes); return new String(bytes, StandardCharsets.UTF_8); }