Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: nathanmarz/thrift
...
head fork: nathanmarz/thrift
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 4 files changed
  • 0 commit comments
  • 2 contributors
Commits on Sep 28, 2010
Bryan Duxbury Branching trunk to 0.5.x to prepare for release.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/branches/0.5.x@1002237 13f79535-47bb-0310-9956-ffa450edef68
51099cc
Bryan Duxbury fix version and rubygem version
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/branches/0.5.x@1002285 13f79535-47bb-0310-9956-ffa450edef68
0b483e1
Commits on Sep 30, 2010
Bryan Duxbury THRIFT-939. java: optional binary fields throw NPE on default byte[] …
…getters

This patch deals with null ByteBuffers correctly.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/branches/0.5.x@1003215 13f79535-47bb-0310-9956-ffa450edef68
7f7795d
Commits on Oct 28, 2010
@gmcdonald gmcdonald Thrift now a TLP - INFRA-3116
git-svn-id: https://svn.apache.org/repos/asf/thrift/branches/0.5.x@1028168 13f79535-47bb-0310-9956-ffa450edef68
e25771d
View
2  configure.ac
@@ -19,7 +19,7 @@
AC_PREREQ(2.65)
-AC_INIT([thrift], [0.5.0-dev])
+AC_INIT([thrift], [0.5.0])
AC_CONFIG_AUX_DIR([.])
View
7 lib/java/src/org/apache/thrift/TBaseHelper.java
@@ -277,6 +277,9 @@ public static ByteBuffer rightSize(ByteBuffer in) {
}
public static ByteBuffer copyBinary(final ByteBuffer orig) {
+ if (orig == null) {
+ return null;
+ }
ByteBuffer copy = ByteBuffer.wrap(new byte[orig.remaining()]);
if (orig.hasArray()) {
System.arraycopy(orig.array(), orig.arrayOffset() + orig.position(), copy.array(), 0, orig.remaining());
@@ -288,6 +291,10 @@ public static ByteBuffer copyBinary(final ByteBuffer orig) {
}
public static byte[] copyBinary(final byte[] orig) {
+ if (orig == null) {
+ return null;
+ }
+
byte[] copy = new byte[orig.length];
System.arraycopy(orig, 0, copy, 0, orig.length);
return copy;
View
4 lib/java/test/org/apache/thrift/TestTBaseHelper.java
@@ -173,6 +173,8 @@ public void testCopyBinaryWithByteBuffer() throws Exception {
assertEquals(1, b.position());
b.reset();
assertEquals(0, b.position());
+
+ assertNull(TBaseHelper.copyBinary((ByteBuffer)null));
}
public void testCopyBinaryWithByteArray() throws Exception {
@@ -180,5 +182,7 @@ public void testCopyBinaryWithByteArray() throws Exception {
byte[] copy = TBaseHelper.copyBinary(bytes);
assertEquals(ByteBuffer.wrap(bytes), ByteBuffer.wrap(copy));
assertNotSame(bytes, copy);
+
+ assertNull(TBaseHelper.copyBinary((byte[])null));
}
}
View
2  lib/rb/Rakefile
@@ -82,7 +82,7 @@ begin
p.summary = "Ruby libraries for Thrift (a language-agnostic RPC system)"
p.url = "http://incubator.apache.org/thrift/"
p.include_rakefile = true
- p.version = "0.2.5"
+ p.version = "0.5.0"
p.rubygems_version = ">= 1.2.0"
end

No commit comments for this range

Something went wrong with that request. Please try again.