[6/7] git commit: eliminate clientutil dependency on commons-lang
eliminate clientutil dependency on commons-lang Patch by Dave Brosius; reviewed by eevans for CASSANDRA-3665 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a725f80f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a725f80f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a725f80f Branch: refs/heads/trunk Commit: a725f80fce2be6880db9572b35339d68acc398a7 Parents: eb9f961 Author: Eric Evans eev...@apache.org Authored: Fri Apr 27 09:40:56 2012 -0500 Committer: Eric Evans eev...@apache.org Committed: Fri Apr 27 09:40:56 2012 -0500 -- build.xml |1 - .../org/apache/cassandra/utils/ByteBufferUtil.java | 10 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a725f80f/build.xml -- diff --git a/build.xml b/build.xml index ebd80f6..233006a 100644 --- a/build.xml +++ b/build.xml @@ -1023,7 +1023,6 @@ /fileset fileset dir=${build.lib} include name=**/guava*.jar / - include name=**/commons-lang*.jar / /fileset /classpath /junit http://git-wip-us.apache.org/repos/asf/cassandra/blob/a725f80f/src/java/org/apache/cassandra/utils/ByteBufferUtil.java -- diff --git a/src/java/org/apache/cassandra/utils/ByteBufferUtil.java b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java index c584205..0470abf 100644 --- a/src/java/org/apache/cassandra/utils/ByteBufferUtil.java +++ b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java @@ -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) {
[7/7] git commit: eliminate clientutil dependency on commons-lang
eliminate clientutil dependency on commons-lang Patch by Dave Brosius; reviewed by eevans for CASSANDRA-3665 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a725f80f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a725f80f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a725f80f Branch: refs/heads/cassandra-1.1 Commit: a725f80fce2be6880db9572b35339d68acc398a7 Parents: eb9f961 Author: Eric Evans eev...@apache.org Authored: Fri Apr 27 09:40:56 2012 -0500 Committer: Eric Evans eev...@apache.org Committed: Fri Apr 27 09:40:56 2012 -0500 -- build.xml |1 - .../org/apache/cassandra/utils/ByteBufferUtil.java | 10 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a725f80f/build.xml -- diff --git a/build.xml b/build.xml index ebd80f6..233006a 100644 --- a/build.xml +++ b/build.xml @@ -1023,7 +1023,6 @@ /fileset fileset dir=${build.lib} include name=**/guava*.jar / - include name=**/commons-lang*.jar / /fileset /classpath /junit http://git-wip-us.apache.org/repos/asf/cassandra/blob/a725f80f/src/java/org/apache/cassandra/utils/ByteBufferUtil.java -- diff --git a/src/java/org/apache/cassandra/utils/ByteBufferUtil.java b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java index c584205..0470abf 100644 --- a/src/java/org/apache/cassandra/utils/ByteBufferUtil.java +++ b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java @@ -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) {
git commit: eliminate clientutil dependency on commons-lang
Updated Branches: refs/heads/cassandra-1.0 eb9f96146 - a725f80fc eliminate clientutil dependency on commons-lang Patch by Dave Brosius; reviewed by eevans for CASSANDRA-3665 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a725f80f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a725f80f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a725f80f Branch: refs/heads/cassandra-1.0 Commit: a725f80fce2be6880db9572b35339d68acc398a7 Parents: eb9f961 Author: Eric Evans eev...@apache.org Authored: Fri Apr 27 09:40:56 2012 -0500 Committer: Eric Evans eev...@apache.org Committed: Fri Apr 27 09:40:56 2012 -0500 -- build.xml |1 - .../org/apache/cassandra/utils/ByteBufferUtil.java | 10 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a725f80f/build.xml -- diff --git a/build.xml b/build.xml index ebd80f6..233006a 100644 --- a/build.xml +++ b/build.xml @@ -1023,7 +1023,6 @@ /fileset fileset dir=${build.lib} include name=**/guava*.jar / - include name=**/commons-lang*.jar / /fileset /classpath /junit http://git-wip-us.apache.org/repos/asf/cassandra/blob/a725f80f/src/java/org/apache/cassandra/utils/ByteBufferUtil.java -- diff --git a/src/java/org/apache/cassandra/utils/ByteBufferUtil.java b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java index c584205..0470abf 100644 --- a/src/java/org/apache/cassandra/utils/ByteBufferUtil.java +++ b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java @@ -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) {
git commit: eliminate clientutil dependency on commons-lang
Updated Branches: refs/heads/cassandra-1.1 60aa1d03e - 2af8591bd eliminate clientutil dependency on commons-lang Patch by Dave Brosius; reviewed by eevans for CASSANDRA-3665 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2af8591b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2af8591b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2af8591b Branch: refs/heads/cassandra-1.1 Commit: 2af8591bd71838b9782c552c6724f1efe1cc836e Parents: 60aa1d0 Author: Eric Evans eev...@apache.org Authored: Fri Apr 27 09:40:56 2012 -0500 Committer: Eric Evans eev...@apache.org Committed: Fri Apr 27 09:44:59 2012 -0500 -- build.xml |1 - .../org/apache/cassandra/utils/ByteBufferUtil.java | 10 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/2af8591b/build.xml -- diff --git a/build.xml b/build.xml index b7df8d2..1ef21f0 100644 --- a/build.xml +++ b/build.xml @@ -1077,7 +1077,6 @@ /fileset fileset dir=${build.lib} include name=**/guava*.jar / - include name=**/commons-lang*.jar / /fileset /classpath /junit http://git-wip-us.apache.org/repos/asf/cassandra/blob/2af8591b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java -- diff --git a/src/java/org/apache/cassandra/utils/ByteBufferUtil.java b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java index 93f28df..e35e137 100644 --- a/src/java/org/apache/cassandra/utils/ByteBufferUtil.java +++ b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java @@ -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.*; import java.nio.ByteBuffer; import java.nio.charset.CharacterCodingException; @@ -29,8 +35,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 @@ -71,7 +75,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) {
[5/6] git commit: eliminate clientutil dependency on commons-lang
eliminate clientutil dependency on commons-lang Patch by Dave Brosius; reviewed by eevans for CASSANDRA-3665 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2af8591b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2af8591b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2af8591b Branch: refs/heads/trunk Commit: 2af8591bd71838b9782c552c6724f1efe1cc836e Parents: 60aa1d0 Author: Eric Evans eev...@apache.org Authored: Fri Apr 27 09:40:56 2012 -0500 Committer: Eric Evans eev...@apache.org Committed: Fri Apr 27 09:44:59 2012 -0500 -- build.xml |1 - .../org/apache/cassandra/utils/ByteBufferUtil.java | 10 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/2af8591b/build.xml -- diff --git a/build.xml b/build.xml index b7df8d2..1ef21f0 100644 --- a/build.xml +++ b/build.xml @@ -1077,7 +1077,6 @@ /fileset fileset dir=${build.lib} include name=**/guava*.jar / - include name=**/commons-lang*.jar / /fileset /classpath /junit http://git-wip-us.apache.org/repos/asf/cassandra/blob/2af8591b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java -- diff --git a/src/java/org/apache/cassandra/utils/ByteBufferUtil.java b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java index 93f28df..e35e137 100644 --- a/src/java/org/apache/cassandra/utils/ByteBufferUtil.java +++ b/src/java/org/apache/cassandra/utils/ByteBufferUtil.java @@ -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.*; import java.nio.ByteBuffer; import java.nio.charset.CharacterCodingException; @@ -29,8 +35,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 @@ -71,7 +75,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) {