Author: sebb Date: Sat Feb 11 12:34:40 2017 New Revision: 1006551 Log: CRYPTO-134 CipherByteBufferExample should not truncate the string
Modified: websites/production/commons/content/proper/commons-crypto/xref-test/org/apache/commons/crypto/examples/CipherByteBufferExample.html Modified: websites/production/commons/content/proper/commons-crypto/xref-test/org/apache/commons/crypto/examples/CipherByteBufferExample.html ============================================================================== --- websites/production/commons/content/proper/commons-crypto/xref-test/org/apache/commons/crypto/examples/CipherByteBufferExample.html (original) +++ websites/production/commons/content/proper/commons-crypto/xref-test/org/apache/commons/crypto/examples/CipherByteBufferExample.html Sat Feb 11 12:34:40 2017 @@ -107,7 +107,7 @@ <a class="jxr_linenumber" name="L99" href="#L99">99</a> <em class="jxr_javadoccomment"> */</em> <a class="jxr_linenumber" name="L100" href="#L100">100</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> String asString(ByteBuffer buffer) { <a class="jxr_linenumber" name="L101" href="#L101">101</a> <strong class="jxr_keyword">final</strong> ByteBuffer copy = buffer.duplicate(); -<a class="jxr_linenumber" name="L102" href="#L102">102</a> <strong class="jxr_keyword">final</strong> byte[] bytes = <strong class="jxr_keyword">new</strong> byte[Math.min(copy.remaining(),50)]; +<a class="jxr_linenumber" name="L102" href="#L102">102</a> <strong class="jxr_keyword">final</strong> byte[] bytes = <strong class="jxr_keyword">new</strong> byte[copy.remaining()]; <a class="jxr_linenumber" name="L103" href="#L103">103</a> copy.get(bytes); <a class="jxr_linenumber" name="L104" href="#L104">104</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> String(bytes, StandardCharsets.UTF_8); <a class="jxr_linenumber" name="L105" href="#L105">105</a> }