Remove redundant array creations.

This commit is contained in:
Craig P. Motlin 2011-11-12 13:08:00 -05:00
parent 0b3a685f95
commit 41d4884194
2 changed files with 5 additions and 5 deletions

View File

@ -177,10 +177,10 @@ public class ChannelBuffersTest {
assertSame(EMPTY_BUFFER, wrappedBuffer(new byte[][] { new byte[0] })); assertSame(EMPTY_BUFFER, wrappedBuffer(new byte[][] { new byte[0] }));
assertSame(EMPTY_BUFFER, wrappedBuffer(new ByteBuffer[0])); assertSame(EMPTY_BUFFER, wrappedBuffer(new ByteBuffer[0]));
assertSame(EMPTY_BUFFER, wrappedBuffer(new ByteBuffer[] { ByteBuffer.allocate(0) })); assertSame(EMPTY_BUFFER, wrappedBuffer(new ByteBuffer[] { ByteBuffer.allocate(0) }));
assertSame(EMPTY_BUFFER, wrappedBuffer(new ByteBuffer[] { ByteBuffer.allocate(0), ByteBuffer.allocate(0) })); assertSame(EMPTY_BUFFER, wrappedBuffer(ByteBuffer.allocate(0), ByteBuffer.allocate(0)));
assertSame(EMPTY_BUFFER, wrappedBuffer(new ChannelBuffer[0])); assertSame(EMPTY_BUFFER, wrappedBuffer(new ChannelBuffer[0]));
assertSame(EMPTY_BUFFER, wrappedBuffer(new ChannelBuffer[] { buffer(0) })); assertSame(EMPTY_BUFFER, wrappedBuffer(new ChannelBuffer[] { buffer(0) }));
assertSame(EMPTY_BUFFER, wrappedBuffer(new ChannelBuffer[] { buffer(0), buffer(0) })); assertSame(EMPTY_BUFFER, wrappedBuffer(buffer(0), buffer(0)));
assertSame(EMPTY_BUFFER, copiedBuffer(new byte[0])); assertSame(EMPTY_BUFFER, copiedBuffer(new byte[0]));
assertSame(EMPTY_BUFFER, copiedBuffer(LITTLE_ENDIAN, new byte[0])); assertSame(EMPTY_BUFFER, copiedBuffer(LITTLE_ENDIAN, new byte[0]));
@ -194,10 +194,10 @@ public class ChannelBuffersTest {
assertSame(EMPTY_BUFFER, copiedBuffer(new byte[][] { new byte[0] })); assertSame(EMPTY_BUFFER, copiedBuffer(new byte[][] { new byte[0] }));
assertSame(EMPTY_BUFFER, copiedBuffer(new ByteBuffer[0])); assertSame(EMPTY_BUFFER, copiedBuffer(new ByteBuffer[0]));
assertSame(EMPTY_BUFFER, copiedBuffer(new ByteBuffer[] { ByteBuffer.allocate(0) })); assertSame(EMPTY_BUFFER, copiedBuffer(new ByteBuffer[] { ByteBuffer.allocate(0) }));
assertSame(EMPTY_BUFFER, copiedBuffer(new ByteBuffer[] { ByteBuffer.allocate(0), ByteBuffer.allocate(0) })); assertSame(EMPTY_BUFFER, copiedBuffer(ByteBuffer.allocate(0), ByteBuffer.allocate(0)));
assertSame(EMPTY_BUFFER, copiedBuffer(new ChannelBuffer[0])); assertSame(EMPTY_BUFFER, copiedBuffer(new ChannelBuffer[0]));
assertSame(EMPTY_BUFFER, copiedBuffer(new ChannelBuffer[] { buffer(0) })); assertSame(EMPTY_BUFFER, copiedBuffer(new ChannelBuffer[] { buffer(0) }));
assertSame(EMPTY_BUFFER, copiedBuffer(new ChannelBuffer[] { buffer(0), buffer(0) })); assertSame(EMPTY_BUFFER, copiedBuffer(buffer(0), buffer(0)));
} }
@Test @Test