commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1309062 - in /commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary: BaseNCodecInputStream.java BaseNCodecOutputStream.java
Date Tue, 03 Apr 2012 17:29:09 GMT
Author: ggregory
Date: Tue Apr  3 17:29:09 2012
New Revision: 1309062

URL: http://svn.apache.org/viewvc?rev=1309062&view=rev
Log:
[CODEC-96] Base64 encode() method is no longer thread-safe, breaking clients using it as a
shared BinaryEncoder. Make Context ivar final.

Modified:
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java?rev=1309062&r1=1309061&r2=1309062&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java
Tue Apr  3 17:29:09 2012
@@ -38,7 +38,7 @@ public class BaseNCodecInputStream exten
 
     private final byte[] singleByte = new byte[1];
 
-    private Context context = new Context();
+    private final Context context = new Context();
 
     protected BaseNCodecInputStream(InputStream in, BaseNCodec baseNCodec, boolean doEncode)
{
         super(in);

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java?rev=1309062&r1=1309061&r2=1309062&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java
(original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodecOutputStream.java
Tue Apr  3 17:29:09 2012
@@ -38,7 +38,7 @@ public class BaseNCodecOutputStream exte
 
     private final byte[] singleByte = new byte[1];
 
-    private Context context = new Context();
+    private final Context context = new Context();
 
     // TODO should this be protected?
     public BaseNCodecOutputStream(OutputStream out, BaseNCodec basedCodec, boolean doEncode)
{



Mime
View raw message