eliminate clientutil dependency on commons-lang

Patch by Dave Brosius; reviewed by eevans for CASSANDRA-3665
This commit is contained in:
Eric Evans 2012-04-27 09:40:56 -05:00
parent eb9f96146e
commit a725f80fce
2 changed files with 7 additions and 4 deletions

View File

@ -1023,7 +1023,6 @@
</fileset>
<fileset dir="${build.lib}">
<include name="**/guava*.jar" />
<include name="**/commons-lang*.jar" />
</fileset>
</classpath>
</junit>

View File

@ -18,6 +18,12 @@
*/
package org.apache.cassandra.utils;
/*
* BE ADVISED: New imports added here might introduce new dependencies for
* the clientutil jar. If in doubt, run the `ant test-clientutil-jar' target
* afterward, and ensure the tests still pass.
*/
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
@ -32,8 +38,6 @@ import static com.google.common.base.Charsets.UTF_8;
import org.apache.cassandra.io.util.FileDataInput;
import org.apache.cassandra.io.util.FileUtils;
import org.apache.commons.lang.ArrayUtils;
/**
* Utility methods to make ByteBuffers less painful
* The following should illustrate the different ways byte buffers can be used
@ -74,7 +78,7 @@ import org.apache.commons.lang.ArrayUtils;
*/
public class ByteBufferUtil
{
public static final ByteBuffer EMPTY_BYTE_BUFFER = ByteBuffer.wrap(ArrayUtils.EMPTY_BYTE_ARRAY);
public static final ByteBuffer EMPTY_BYTE_BUFFER = ByteBuffer.wrap(new byte[0]);
public static int compareUnsigned(ByteBuffer o1, ByteBuffer o2)
{