You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2017/03/28 15:04:59 UTC
svn commit: r1789158 - in /commons/proper/codec/trunk/src:
changes/changes.xml main/java/org/apache/commons/codec/binary/Base64.java
Author: sebb
Date: Tue Mar 28 15:04:58 2017
New Revision: 1789158
URL: http://svn.apache.org/viewvc?rev=1789158&view=rev
Log:
CODEC-145 Base64.encodeBase64String could better use newStringUsAscii (ditto encodeBase64URLSafeString)
Modified:
commons/proper/codec/trunk/src/changes/changes.xml
commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64.java
Modified: commons/proper/codec/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/changes/changes.xml?rev=1789158&r1=1789157&r2=1789158&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/changes/changes.xml (original)
+++ commons/proper/codec/trunk/src/changes/changes.xml Tue Mar 28 15:04:58 2017
@@ -45,6 +45,7 @@ The <action> type attribute can be add,u
<release version="1.11" date="2017-MM-DD" description="Feature and fix release.">
<!-- The first attribute below should be the issue id; makes it easier to navigate in the IDE outline -->
+ <action issue="CODEC-145" dev="sebb" type="fix" due-to="Jesse Glick">Base64.encodeBase64String could better use newStringUsAscii (ditto encodeBase64URLSafeString)</action>
<action issue="CODEC-144" dev="sebb" type="fix">BaseNCodec: encodeToString and encodeAsString methods are identical</action>
<action issue="CODEC-232" dev="sebb" type="fix">URLCodec is neither immutable nor threadsafe</action>
<action issue="CODEC-231" dev="sebb" type="fix">StringUtils.equals(CharSequence cs1, CharSequence cs2) can fail with String Index OBE</action>
Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64.java?rev=1789158&r1=1789157&r2=1789158&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/Base64.java Tue Mar 28 15:04:58 2017
@@ -567,7 +567,7 @@ public class Base64 extends BaseNCodec {
* @since 1.4 (NOTE: 1.4 chunked the output, whereas 1.5 does not).
*/
public static String encodeBase64String(final byte[] binaryData) {
- return StringUtils.newStringUtf8(encodeBase64(binaryData, false));
+ return StringUtils.newStringUsAscii(encodeBase64(binaryData, false));
}
/**
@@ -593,7 +593,7 @@ public class Base64 extends BaseNCodec {
* @since 1.4
*/
public static String encodeBase64URLSafeString(final byte[] binaryData) {
- return StringUtils.newStringUtf8(encodeBase64(binaryData, false, true));
+ return StringUtils.newStringUsAscii(encodeBase64(binaryData, false, true));
}
/**