HADOOP-11674. oneByteBuf in CryptoInputStream and CryptoOutputStream should be non static. (Sean Busbey via yliu)

This commit is contained in:
yliu 2015-03-05 06:39:58 +08:00
parent f805d48b19
commit b569c3ab1c
3 changed files with 5 additions and 2 deletions

View File

@ -634,6 +634,9 @@ Release 2.7.0 - UNRELEASED
HADOOP-11666. Revert the format change of du output introduced by HADOOP-11666. Revert the format change of du output introduced by
HADOOP-6857. (Byron Wong via aajisaka) HADOOP-6857. (Byron Wong via aajisaka)
HADOOP-11674. oneByteBuf in CryptoInputStream and CryptoOutputStream
should be non static. (Sean Busbey via yliu)
Release 2.6.1 - UNRELEASED Release 2.6.1 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -60,7 +60,7 @@ public class CryptoInputStream extends FilterInputStream implements
Seekable, PositionedReadable, ByteBufferReadable, HasFileDescriptor, Seekable, PositionedReadable, ByteBufferReadable, HasFileDescriptor,
CanSetDropBehind, CanSetReadahead, HasEnhancedByteBufferAccess, CanSetDropBehind, CanSetReadahead, HasEnhancedByteBufferAccess,
ReadableByteChannel { ReadableByteChannel {
private static final byte[] oneByteBuf = new byte[1]; private final byte[] oneByteBuf = new byte[1];
private final CryptoCodec codec; private final CryptoCodec codec;
private final Decryptor decryptor; private final Decryptor decryptor;
private final int bufferSize; private final int bufferSize;

View File

@ -45,7 +45,7 @@ import com.google.common.base.Preconditions;
@InterfaceStability.Evolving @InterfaceStability.Evolving
public class CryptoOutputStream extends FilterOutputStream implements public class CryptoOutputStream extends FilterOutputStream implements
Syncable, CanSetDropBehind { Syncable, CanSetDropBehind {
private static final byte[] oneByteBuf = new byte[1]; private final byte[] oneByteBuf = new byte[1];
private final CryptoCodec codec; private final CryptoCodec codec;
private final Encryptor encryptor; private final Encryptor encryptor;
private final int bufferSize; private final int bufferSize;