THRIFT-34 Java libraries should be namespaced under org.apache.thrift, not com.facebook.thrift
Library classes and tests have been moved to the proper package and directory structure, and references to com.facebook.thrift where replaced with org.apache.thrift throughout the code. The fb303 contrib project still contains com.facebook packages.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@734855 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_java_generator.cc b/compiler/cpp/src/generate/t_java_generator.cc
index cf1ea19..5f2c999 100644
--- a/compiler/cpp/src/generate/t_java_generator.cc
+++ b/compiler/cpp/src/generate/t_java_generator.cc
@@ -228,7 +228,7 @@
/**
* Packages the generated file
*
- * @return String of the package, i.e. "package com.facebook.thriftdemo;"
+ * @return String of the package, i.e. "package org.apache.thriftdemo;"
*/
string t_java_generator::java_package() {
if (!package_name_.empty()) {
@@ -258,7 +258,7 @@
"import java.util.HashSet;\n" +
"import java.util.Collections;\n" +
hash_builder +
- "import com.facebook.thrift.*;\n\n";
+ "import org.apache.thrift.*;\n\n";
}
/**
@@ -269,8 +269,8 @@
string t_java_generator::java_thrift_imports() {
return
string() +
- "import com.facebook.thrift.protocol.*;\n" +
- "import com.facebook.thrift.transport.*;\n\n";
+ "import org.apache.thrift.protocol.*;\n" +
+ "import org.apache.thrift.transport.*;\n\n";
}
/**
diff --git a/contrib/fb303/java/Constants.java b/contrib/fb303/java/Constants.java
index d1e8c73..79034b4 100644
--- a/contrib/fb303/java/Constants.java
+++ b/contrib/fb303/java/Constants.java
@@ -9,7 +9,7 @@
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import org.apache.thrift.*;
public class Constants {
diff --git a/contrib/fb303/java/FacebookBase.java b/contrib/fb303/java/FacebookBase.java
index c9fe43b..50c38ae 100644
--- a/contrib/fb303/java/FacebookBase.java
+++ b/contrib/fb303/java/FacebookBase.java
@@ -83,8 +83,8 @@
return "";
}
- public com.facebook.thrift.reflection.limited.Service getLimitedReflection() {
- return new com.facebook.thrift.reflection.limited.Service();
+ public org.apache.thrift.reflection.limited.Service getLimitedReflection() {
+ return new org.apache.thrift.reflection.limited.Service();
}
public void reinitialize() {}
diff --git a/contrib/fb303/java/FacebookService.java b/contrib/fb303/java/FacebookService.java
index b7a23dd..50d19f8 100644
--- a/contrib/fb303/java/FacebookService.java
+++ b/contrib/fb303/java/FacebookService.java
@@ -9,10 +9,10 @@
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import org.apache.thrift.*;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
public class FacebookService {
@@ -27,7 +27,7 @@
public String getOption(String key) throws TException;
public AbstractMap<String,String> getOptions() throws TException;
public long aliveSince() throws TException;
- public com.facebook.thrift.reflection.limited.Service getLimitedReflection() throws TException;
+ public org.apache.thrift.reflection.limited.Service getLimitedReflection() throws TException;
public void reinitialize() throws TException;
public void shutdown() throws TException;
}
@@ -370,7 +370,7 @@
throw new TApplicationException(TApplicationException.MISSING_RESULT, "aliveSince failed: unknown result");
}
- public com.facebook.thrift.reflection.limited.Service getLimitedReflection() throws TException
+ public org.apache.thrift.reflection.limited.Service getLimitedReflection() throws TException
{
send_getLimitedReflection();
return recv_getLimitedReflection();
@@ -385,7 +385,7 @@
oprot_.getTransport().flush();
}
- public com.facebook.thrift.reflection.limited.Service recv_getLimitedReflection() throws TException
+ public org.apache.thrift.reflection.limited.Service recv_getLimitedReflection() throws TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -1906,7 +1906,7 @@
}
public static class getLimitedReflection_result {
- public com.facebook.thrift.reflection.limited.Service success;
+ public org.apache.thrift.reflection.limited.Service success;
public final Isset __isset = new Isset();
public final class Isset {
@@ -1929,7 +1929,7 @@
{
case 0:
if (field.type == TType.STRUCT) {
- this.success = new com.facebook.thrift.reflection.limited.Service();
+ this.success = new org.apache.thrift.reflection.limited.Service();
this.success.read(iprot);
this.__isset.success = true;
} else {
diff --git a/lib/java/src/com/facebook/thrift/FieldMetaData.java b/lib/java/src/org/apache/thrift/FieldMetaData.java
similarity index 85%
rename from lib/java/src/com/facebook/thrift/FieldMetaData.java
rename to lib/java/src/org/apache/thrift/FieldMetaData.java
index de530d6..2469892 100644
--- a/lib/java/src/com/facebook/thrift/FieldMetaData.java
+++ b/lib/java/src/org/apache/thrift/FieldMetaData.java
@@ -1,4 +1,4 @@
-package com.facebook.thrift;
+package org.apache.thrift;
public class FieldMetaData implements java.io.Serializable {
public final String fieldName;
diff --git a/lib/java/src/com/facebook/thrift/TApplicationException.java b/lib/java/src/org/apache/thrift/TApplicationException.java
similarity index 90%
rename from lib/java/src/com/facebook/thrift/TApplicationException.java
rename to lib/java/src/org/apache/thrift/TApplicationException.java
index fed9a63..e2b34b9 100644
--- a/lib/java/src/com/facebook/thrift/TApplicationException.java
+++ b/lib/java/src/org/apache/thrift/TApplicationException.java
@@ -4,13 +4,13 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift;
+package org.apache.thrift;
-import com.facebook.thrift.protocol.TField;
-import com.facebook.thrift.protocol.TProtocol;
-import com.facebook.thrift.protocol.TProtocolUtil;
-import com.facebook.thrift.protocol.TStruct;
-import com.facebook.thrift.protocol.TType;
+import org.apache.thrift.protocol.TField;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.protocol.TProtocolUtil;
+import org.apache.thrift.protocol.TStruct;
+import org.apache.thrift.protocol.TType;
/**
* Application level exception
diff --git a/lib/java/src/com/facebook/thrift/TBase.java b/lib/java/src/org/apache/thrift/TBase.java
similarity index 89%
rename from lib/java/src/com/facebook/thrift/TBase.java
rename to lib/java/src/org/apache/thrift/TBase.java
index 6a30ae0..faf1435 100644
--- a/lib/java/src/com/facebook/thrift/TBase.java
+++ b/lib/java/src/org/apache/thrift/TBase.java
@@ -4,9 +4,9 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift;
+package org.apache.thrift;
-import com.facebook.thrift.protocol.TProtocol;
+import org.apache.thrift.protocol.TProtocol;
/**
* Generic base interface for generated Thrift objects.
diff --git a/lib/java/src/com/facebook/thrift/TByteArrayOutputStream.java b/lib/java/src/org/apache/thrift/TByteArrayOutputStream.java
similarity index 95%
rename from lib/java/src/com/facebook/thrift/TByteArrayOutputStream.java
rename to lib/java/src/org/apache/thrift/TByteArrayOutputStream.java
index 4d3ffbf..08eda02 100644
--- a/lib/java/src/com/facebook/thrift/TByteArrayOutputStream.java
+++ b/lib/java/src/org/apache/thrift/TByteArrayOutputStream.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift;
+package org.apache.thrift;
import java.io.ByteArrayOutputStream;
diff --git a/lib/java/src/com/facebook/thrift/TDeserializer.java b/lib/java/src/org/apache/thrift/TDeserializer.java
similarity index 91%
rename from lib/java/src/com/facebook/thrift/TDeserializer.java
rename to lib/java/src/org/apache/thrift/TDeserializer.java
index 99fd056..bb6a0e5 100644
--- a/lib/java/src/com/facebook/thrift/TDeserializer.java
+++ b/lib/java/src/org/apache/thrift/TDeserializer.java
@@ -4,14 +4,14 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift;
+package org.apache.thrift;
import java.io.ByteArrayInputStream;
import java.io.UnsupportedEncodingException;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.protocol.TProtocolFactory;
-import com.facebook.thrift.transport.TIOStreamTransport;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.thrift.transport.TIOStreamTransport;
/**
* Generic utility for easily deserializing objects from a byte array or Java
diff --git a/lib/java/src/com/facebook/thrift/TException.java b/lib/java/src/org/apache/thrift/TException.java
similarity index 95%
rename from lib/java/src/com/facebook/thrift/TException.java
rename to lib/java/src/org/apache/thrift/TException.java
index 4a7b1a5..f62bd5d 100644
--- a/lib/java/src/com/facebook/thrift/TException.java
+++ b/lib/java/src/org/apache/thrift/TException.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift;
+package org.apache.thrift;
/**
* Generic exception class for Thrift.
diff --git a/lib/java/src/com/facebook/thrift/TProcessor.java b/lib/java/src/org/apache/thrift/TProcessor.java
similarity index 85%
rename from lib/java/src/com/facebook/thrift/TProcessor.java
rename to lib/java/src/org/apache/thrift/TProcessor.java
index 973f1d0..030e4a6 100644
--- a/lib/java/src/com/facebook/thrift/TProcessor.java
+++ b/lib/java/src/org/apache/thrift/TProcessor.java
@@ -4,9 +4,9 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift;
+package org.apache.thrift;
-import com.facebook.thrift.protocol.TProtocol;
+import org.apache.thrift.protocol.TProtocol;
/**
* A processor is a generic object which operates upon an input stream and
diff --git a/lib/java/src/com/facebook/thrift/TProcessorFactory.java b/lib/java/src/org/apache/thrift/TProcessorFactory.java
similarity index 86%
rename from lib/java/src/com/facebook/thrift/TProcessorFactory.java
rename to lib/java/src/org/apache/thrift/TProcessorFactory.java
index 5bac1ba..057435d 100644
--- a/lib/java/src/com/facebook/thrift/TProcessorFactory.java
+++ b/lib/java/src/org/apache/thrift/TProcessorFactory.java
@@ -4,9 +4,9 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift;
+package org.apache.thrift;
-import com.facebook.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransport;
/**
* The default processor factory just returns a singleton
diff --git a/lib/java/src/com/facebook/thrift/TSerializer.java b/lib/java/src/org/apache/thrift/TSerializer.java
similarity index 91%
rename from lib/java/src/com/facebook/thrift/TSerializer.java
rename to lib/java/src/org/apache/thrift/TSerializer.java
index 1df068d..0653305 100644
--- a/lib/java/src/com/facebook/thrift/TSerializer.java
+++ b/lib/java/src/org/apache/thrift/TSerializer.java
@@ -4,15 +4,15 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift;
+package org.apache.thrift;
import java.io.ByteArrayOutputStream;
import java.io.UnsupportedEncodingException;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.protocol.TProtocol;
-import com.facebook.thrift.protocol.TProtocolFactory;
-import com.facebook.thrift.transport.TIOStreamTransport;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.thrift.transport.TIOStreamTransport;
/**
* Generic utility for easily serializing objects into a byte array or Java
diff --git a/lib/java/src/com/facebook/thrift/protocol/TBase64Utils.java b/lib/java/src/org/apache/thrift/protocol/TBase64Utils.java
similarity index 98%
rename from lib/java/src/com/facebook/thrift/protocol/TBase64Utils.java
rename to lib/java/src/org/apache/thrift/protocol/TBase64Utils.java
index f3fc1c3..6b12152 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TBase64Utils.java
+++ b/lib/java/src/org/apache/thrift/protocol/TBase64Utils.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
/**
* Class for encoding and decoding Base64 data.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TBinaryProtocol.java b/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java
similarity index 98%
rename from lib/java/src/com/facebook/thrift/protocol/TBinaryProtocol.java
rename to lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java
index d8c9473..36fb566 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TBinaryProtocol.java
+++ b/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java
@@ -4,12 +4,12 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
import java.io.UnsupportedEncodingException;
-import com.facebook.thrift.TException;
-import com.facebook.thrift.transport.TTransport;
+import org.apache.thrift.TException;
+import org.apache.thrift.transport.TTransport;
/**
* Binary protocol implementation for thrift.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TField.java b/lib/java/src/org/apache/thrift/protocol/TField.java
similarity index 92%
rename from lib/java/src/com/facebook/thrift/protocol/TField.java
rename to lib/java/src/org/apache/thrift/protocol/TField.java
index 85675e0..d74b0ce 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TField.java
+++ b/lib/java/src/org/apache/thrift/protocol/TField.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
/**
* Helper class that encapsulates field metadata.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TJSONProtocol.java b/lib/java/src/org/apache/thrift/protocol/TJSONProtocol.java
similarity index 98%
rename from lib/java/src/com/facebook/thrift/protocol/TJSONProtocol.java
rename to lib/java/src/org/apache/thrift/protocol/TJSONProtocol.java
index 1e51dd2..b66b8f6 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TJSONProtocol.java
+++ b/lib/java/src/org/apache/thrift/protocol/TJSONProtocol.java
@@ -4,11 +4,11 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
-import com.facebook.thrift.TException;
-import com.facebook.thrift.TByteArrayOutputStream;
-import com.facebook.thrift.transport.TTransport;
+import org.apache.thrift.TException;
+import org.apache.thrift.TByteArrayOutputStream;
+import org.apache.thrift.transport.TTransport;
import java.io.UnsupportedEncodingException;
import java.util.Stack;
diff --git a/lib/java/src/com/facebook/thrift/protocol/TList.java b/lib/java/src/org/apache/thrift/protocol/TList.java
similarity index 92%
rename from lib/java/src/com/facebook/thrift/protocol/TList.java
rename to lib/java/src/org/apache/thrift/protocol/TList.java
index 3fe8599..4d356e9 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TList.java
+++ b/lib/java/src/org/apache/thrift/protocol/TList.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
/**
* Helper class that encapsulates list metadata.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TMap.java b/lib/java/src/org/apache/thrift/protocol/TMap.java
similarity index 93%
rename from lib/java/src/com/facebook/thrift/protocol/TMap.java
rename to lib/java/src/org/apache/thrift/protocol/TMap.java
index 9b7126e..964eb79 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TMap.java
+++ b/lib/java/src/org/apache/thrift/protocol/TMap.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
/**
* Helper class that encapsulates map metadata.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TMessage.java b/lib/java/src/org/apache/thrift/protocol/TMessage.java
similarity index 92%
rename from lib/java/src/com/facebook/thrift/protocol/TMessage.java
rename to lib/java/src/org/apache/thrift/protocol/TMessage.java
index 9f1fec1..fa93394 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TMessage.java
+++ b/lib/java/src/org/apache/thrift/protocol/TMessage.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
/**
* Helper class that encapsulates struct metadata.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TMessageType.java b/lib/java/src/org/apache/thrift/protocol/TMessageType.java
similarity index 91%
rename from lib/java/src/com/facebook/thrift/protocol/TMessageType.java
rename to lib/java/src/org/apache/thrift/protocol/TMessageType.java
index 2b4c8cd..62f6e30 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TMessageType.java
+++ b/lib/java/src/org/apache/thrift/protocol/TMessageType.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
/**
* Message type constants in the Thrift protocol.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TProtocol.java b/lib/java/src/org/apache/thrift/protocol/TProtocol.java
similarity index 95%
rename from lib/java/src/com/facebook/thrift/protocol/TProtocol.java
rename to lib/java/src/org/apache/thrift/protocol/TProtocol.java
index 551ef50..412aa43 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TProtocol.java
+++ b/lib/java/src/org/apache/thrift/protocol/TProtocol.java
@@ -4,10 +4,10 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
-import com.facebook.thrift.TException;
-import com.facebook.thrift.transport.TTransport;
+import org.apache.thrift.TException;
+import org.apache.thrift.transport.TTransport;
/**
* Protocol interface definition.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TProtocolException.java b/lib/java/src/org/apache/thrift/protocol/TProtocolException.java
similarity index 94%
rename from lib/java/src/com/facebook/thrift/protocol/TProtocolException.java
rename to lib/java/src/org/apache/thrift/protocol/TProtocolException.java
index cea786a..2228b5c 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TProtocolException.java
+++ b/lib/java/src/org/apache/thrift/protocol/TProtocolException.java
@@ -4,9 +4,9 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
-import com.facebook.thrift.TException;
+import org.apache.thrift.TException;
/**
* Protocol exceptions.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TProtocolFactory.java b/lib/java/src/org/apache/thrift/protocol/TProtocolFactory.java
similarity index 83%
rename from lib/java/src/com/facebook/thrift/protocol/TProtocolFactory.java
rename to lib/java/src/org/apache/thrift/protocol/TProtocolFactory.java
index 09ffb22..6a77eba 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TProtocolFactory.java
+++ b/lib/java/src/org/apache/thrift/protocol/TProtocolFactory.java
@@ -4,9 +4,9 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
-import com.facebook.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransport;
/**
* Factory interface for constructing protocol instances.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TProtocolUtil.java b/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java
similarity index 97%
rename from lib/java/src/com/facebook/thrift/protocol/TProtocolUtil.java
rename to lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java
index dc4aeeb..fe2ea9f 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TProtocolUtil.java
+++ b/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java
@@ -4,9 +4,9 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
-import com.facebook.thrift.TException;
+import org.apache.thrift.TException;
/**
* Utility class with static methods for interacting with protocol data
diff --git a/lib/java/src/com/facebook/thrift/protocol/TSet.java b/lib/java/src/org/apache/thrift/protocol/TSet.java
similarity index 92%
rename from lib/java/src/com/facebook/thrift/protocol/TSet.java
rename to lib/java/src/org/apache/thrift/protocol/TSet.java
index c40ef71..6f14154 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TSet.java
+++ b/lib/java/src/org/apache/thrift/protocol/TSet.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
/**
* Helper class that encapsulates set metadata.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TSimpleJSONProtocol.java b/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java
similarity index 98%
rename from lib/java/src/com/facebook/thrift/protocol/TSimpleJSONProtocol.java
rename to lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java
index b577c0d..1a5167c 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TSimpleJSONProtocol.java
+++ b/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java
@@ -4,13 +4,13 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
import java.io.UnsupportedEncodingException;
import java.util.Stack;
-import com.facebook.thrift.TException;
-import com.facebook.thrift.transport.TTransport;
+import org.apache.thrift.TException;
+import org.apache.thrift.transport.TTransport;
/**
* JSON protocol implementation for thrift.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TStruct.java b/lib/java/src/org/apache/thrift/protocol/TStruct.java
similarity index 91%
rename from lib/java/src/com/facebook/thrift/protocol/TStruct.java
rename to lib/java/src/org/apache/thrift/protocol/TStruct.java
index 6832bab..2a8f869 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TStruct.java
+++ b/lib/java/src/org/apache/thrift/protocol/TStruct.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
/**
* Helper class that encapsulates struct metadata.
diff --git a/lib/java/src/com/facebook/thrift/protocol/TType.java b/lib/java/src/org/apache/thrift/protocol/TType.java
similarity index 95%
rename from lib/java/src/com/facebook/thrift/protocol/TType.java
rename to lib/java/src/org/apache/thrift/protocol/TType.java
index 4a0f0d0..dfa4a5d 100644
--- a/lib/java/src/com/facebook/thrift/protocol/TType.java
+++ b/lib/java/src/org/apache/thrift/protocol/TType.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.protocol;
+package org.apache.thrift.protocol;
/**
* Type constants in the Thrift protocol.
diff --git a/lib/java/src/com/facebook/thrift/reflection/limited/Argument.java b/lib/java/src/org/apache/thrift/reflection/limited/Argument.java
similarity index 94%
rename from lib/java/src/com/facebook/thrift/reflection/limited/Argument.java
rename to lib/java/src/org/apache/thrift/reflection/limited/Argument.java
index 2a485e8..9dc7d95 100644
--- a/lib/java/src/com/facebook/thrift/reflection/limited/Argument.java
+++ b/lib/java/src/org/apache/thrift/reflection/limited/Argument.java
@@ -3,16 +3,16 @@
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
-package com.facebook.thrift.reflection.limited;
+package org.apache.thrift.reflection.limited;
import java.util.ArrayList;
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import org.apache.thrift.*;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
public class Argument implements java.io.Serializable {
public short key;
diff --git a/lib/java/src/com/facebook/thrift/reflection/limited/Constants.java b/lib/java/src/org/apache/thrift/reflection/limited/Constants.java
similarity index 75%
rename from lib/java/src/com/facebook/thrift/reflection/limited/Constants.java
rename to lib/java/src/org/apache/thrift/reflection/limited/Constants.java
index 669abac..2e6cc51 100644
--- a/lib/java/src/com/facebook/thrift/reflection/limited/Constants.java
+++ b/lib/java/src/org/apache/thrift/reflection/limited/Constants.java
@@ -3,13 +3,13 @@
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
-package com.facebook.thrift.reflection.limited;
+package org.apache.thrift.reflection.limited;
import java.util.ArrayList;
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import org.apache.thrift.*;
public class Constants {
diff --git a/lib/java/src/com/facebook/thrift/reflection/limited/ContainerType.java b/lib/java/src/org/apache/thrift/reflection/limited/ContainerType.java
similarity index 95%
rename from lib/java/src/com/facebook/thrift/reflection/limited/ContainerType.java
rename to lib/java/src/org/apache/thrift/reflection/limited/ContainerType.java
index 6c8bcc3..c006dc3 100644
--- a/lib/java/src/com/facebook/thrift/reflection/limited/ContainerType.java
+++ b/lib/java/src/org/apache/thrift/reflection/limited/ContainerType.java
@@ -3,16 +3,16 @@
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
-package com.facebook.thrift.reflection.limited;
+package org.apache.thrift.reflection.limited;
import java.util.ArrayList;
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import org.apache.thrift.*;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
public class ContainerType implements java.io.Serializable {
public int ttype;
diff --git a/lib/java/src/com/facebook/thrift/reflection/limited/Method.java b/lib/java/src/org/apache/thrift/reflection/limited/Method.java
similarity index 95%
rename from lib/java/src/com/facebook/thrift/reflection/limited/Method.java
rename to lib/java/src/org/apache/thrift/reflection/limited/Method.java
index 41fa6ca..34d9164 100644
--- a/lib/java/src/com/facebook/thrift/reflection/limited/Method.java
+++ b/lib/java/src/org/apache/thrift/reflection/limited/Method.java
@@ -3,16 +3,16 @@
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
-package com.facebook.thrift.reflection.limited;
+package org.apache.thrift.reflection.limited;
import java.util.ArrayList;
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import org.apache.thrift.*;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
public class Method implements java.io.Serializable {
public String name;
diff --git a/lib/java/src/com/facebook/thrift/reflection/limited/Service.java b/lib/java/src/org/apache/thrift/reflection/limited/Service.java
similarity index 95%
rename from lib/java/src/com/facebook/thrift/reflection/limited/Service.java
rename to lib/java/src/org/apache/thrift/reflection/limited/Service.java
index fcbd09c..dd5f901 100644
--- a/lib/java/src/com/facebook/thrift/reflection/limited/Service.java
+++ b/lib/java/src/org/apache/thrift/reflection/limited/Service.java
@@ -3,16 +3,16 @@
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
-package com.facebook.thrift.reflection.limited;
+package org.apache.thrift.reflection.limited;
import java.util.ArrayList;
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import org.apache.thrift.*;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
public class Service implements java.io.Serializable {
public String name;
diff --git a/lib/java/src/com/facebook/thrift/reflection/limited/SimpleType.java b/lib/java/src/org/apache/thrift/reflection/limited/SimpleType.java
similarity index 93%
rename from lib/java/src/com/facebook/thrift/reflection/limited/SimpleType.java
rename to lib/java/src/org/apache/thrift/reflection/limited/SimpleType.java
index 2a69e39..3cbdd89 100644
--- a/lib/java/src/com/facebook/thrift/reflection/limited/SimpleType.java
+++ b/lib/java/src/org/apache/thrift/reflection/limited/SimpleType.java
@@ -3,16 +3,16 @@
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
-package com.facebook.thrift.reflection.limited;
+package org.apache.thrift.reflection.limited;
import java.util.ArrayList;
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import org.apache.thrift.*;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
public class SimpleType implements java.io.Serializable {
public int ttype;
diff --git a/lib/java/src/com/facebook/thrift/reflection/limited/TTypeTag.java b/lib/java/src/org/apache/thrift/reflection/limited/TTypeTag.java
similarity index 93%
rename from lib/java/src/com/facebook/thrift/reflection/limited/TTypeTag.java
rename to lib/java/src/org/apache/thrift/reflection/limited/TTypeTag.java
index c9095f5..e196c78 100644
--- a/lib/java/src/com/facebook/thrift/reflection/limited/TTypeTag.java
+++ b/lib/java/src/org/apache/thrift/reflection/limited/TTypeTag.java
@@ -3,7 +3,7 @@
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
-package com.facebook.thrift.reflection.limited;
+package org.apache.thrift.reflection.limited;
public class TTypeTag {
diff --git a/lib/java/src/com/facebook/thrift/reflection/limited/ThriftType.java b/lib/java/src/org/apache/thrift/reflection/limited/ThriftType.java
similarity index 95%
rename from lib/java/src/com/facebook/thrift/reflection/limited/ThriftType.java
rename to lib/java/src/org/apache/thrift/reflection/limited/ThriftType.java
index 63022ec..91586df 100644
--- a/lib/java/src/com/facebook/thrift/reflection/limited/ThriftType.java
+++ b/lib/java/src/org/apache/thrift/reflection/limited/ThriftType.java
@@ -3,16 +3,16 @@
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
-package com.facebook.thrift.reflection.limited;
+package org.apache.thrift.reflection.limited;
import java.util.ArrayList;
import java.util.AbstractMap;
import java.util.HashMap;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import org.apache.thrift.*;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
public class ThriftType implements java.io.Serializable {
public boolean is_container;
diff --git a/lib/java/src/com/facebook/thrift/server/THsHaServer.java b/lib/java/src/org/apache/thrift/server/THsHaServer.java
similarity index 93%
rename from lib/java/src/com/facebook/thrift/server/THsHaServer.java
rename to lib/java/src/org/apache/thrift/server/THsHaServer.java
index 8790d84..ccb4a8e 100644
--- a/lib/java/src/com/facebook/thrift/server/THsHaServer.java
+++ b/lib/java/src/org/apache/thrift/server/THsHaServer.java
@@ -1,18 +1,18 @@
-package com.facebook.thrift.server;
+package org.apache.thrift.server;
-import com.facebook.thrift.TException;
-import com.facebook.thrift.TProcessor;
-import com.facebook.thrift.TProcessorFactory;
-import com.facebook.thrift.protocol.TProtocol;
-import com.facebook.thrift.protocol.TProtocolFactory;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.transport.TNonblockingServerTransport;
-import com.facebook.thrift.transport.TTransport;
-import com.facebook.thrift.transport.TFramedTransport;
-import com.facebook.thrift.transport.TNonblockingTransport;
-import com.facebook.thrift.transport.TTransportException;
-import com.facebook.thrift.transport.TTransportFactory;
+import org.apache.thrift.TException;
+import org.apache.thrift.TProcessor;
+import org.apache.thrift.TProcessorFactory;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.transport.TNonblockingServerTransport;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TFramedTransport;
+import org.apache.thrift.transport.TNonblockingTransport;
+import org.apache.thrift.transport.TTransportException;
+import org.apache.thrift.transport.TTransportFactory;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
diff --git a/lib/java/src/com/facebook/thrift/server/TNonblockingServer.java b/lib/java/src/org/apache/thrift/server/TNonblockingServer.java
similarity index 96%
rename from lib/java/src/com/facebook/thrift/server/TNonblockingServer.java
rename to lib/java/src/org/apache/thrift/server/TNonblockingServer.java
index 8e9d3bd..2185980 100644
--- a/lib/java/src/com/facebook/thrift/server/TNonblockingServer.java
+++ b/lib/java/src/org/apache/thrift/server/TNonblockingServer.java
@@ -1,20 +1,20 @@
-package com.facebook.thrift.server;
+package org.apache.thrift.server;
-import com.facebook.thrift.TException;
-import com.facebook.thrift.TProcessor;
-import com.facebook.thrift.TProcessorFactory;
-import com.facebook.thrift.protocol.TProtocol;
-import com.facebook.thrift.protocol.TProtocolFactory;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.transport.TNonblockingServerTransport;
-import com.facebook.thrift.transport.TIOStreamTransport;
-import com.facebook.thrift.transport.TTransport;
-import com.facebook.thrift.transport.TFramedTransport;
-import com.facebook.thrift.transport.TNonblockingTransport;
-import com.facebook.thrift.transport.TTransportException;
-import com.facebook.thrift.transport.TTransportFactory;
-import com.facebook.thrift.TByteArrayOutputStream;
+import org.apache.thrift.TException;
+import org.apache.thrift.TProcessor;
+import org.apache.thrift.TProcessorFactory;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.transport.TNonblockingServerTransport;
+import org.apache.thrift.transport.TIOStreamTransport;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TFramedTransport;
+import org.apache.thrift.transport.TNonblockingTransport;
+import org.apache.thrift.transport.TTransportException;
+import org.apache.thrift.transport.TTransportFactory;
+import org.apache.thrift.TByteArrayOutputStream;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
diff --git a/lib/java/src/com/facebook/thrift/server/TServer.java b/lib/java/src/org/apache/thrift/server/TServer.java
similarity index 90%
rename from lib/java/src/com/facebook/thrift/server/TServer.java
rename to lib/java/src/org/apache/thrift/server/TServer.java
index c066607..d4ec10c 100644
--- a/lib/java/src/com/facebook/thrift/server/TServer.java
+++ b/lib/java/src/org/apache/thrift/server/TServer.java
@@ -4,13 +4,13 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.server;
+package org.apache.thrift.server;
-import com.facebook.thrift.TProcessorFactory;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.protocol.TProtocolFactory;
-import com.facebook.thrift.transport.TServerTransport;
-import com.facebook.thrift.transport.TTransportFactory;
+import org.apache.thrift.TProcessorFactory;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.thrift.transport.TServerTransport;
+import org.apache.thrift.transport.TTransportFactory;
/**
* Generic interface for a Thrift server.
diff --git a/lib/java/src/com/facebook/thrift/server/TSimpleServer.java b/lib/java/src/org/apache/thrift/server/TSimpleServer.java
similarity index 89%
rename from lib/java/src/com/facebook/thrift/server/TSimpleServer.java
rename to lib/java/src/org/apache/thrift/server/TSimpleServer.java
index 1c25261..3f8da13 100644
--- a/lib/java/src/com/facebook/thrift/server/TSimpleServer.java
+++ b/lib/java/src/org/apache/thrift/server/TSimpleServer.java
@@ -4,20 +4,20 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.server;
+package org.apache.thrift.server;
import java.util.logging.Level;
import java.util.logging.Logger;
-import com.facebook.thrift.TException;
-import com.facebook.thrift.TProcessor;
-import com.facebook.thrift.TProcessorFactory;
-import com.facebook.thrift.protocol.TProtocol;
-import com.facebook.thrift.protocol.TProtocolFactory;
-import com.facebook.thrift.transport.TServerTransport;
-import com.facebook.thrift.transport.TTransport;
-import com.facebook.thrift.transport.TTransportFactory;
-import com.facebook.thrift.transport.TTransportException;
+import org.apache.thrift.TException;
+import org.apache.thrift.TProcessor;
+import org.apache.thrift.TProcessorFactory;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.thrift.transport.TServerTransport;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportFactory;
+import org.apache.thrift.transport.TTransportException;
/**
* Simple singlethreaded server for testing.
diff --git a/lib/java/src/com/facebook/thrift/server/TThreadPoolServer.java b/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
similarity index 94%
rename from lib/java/src/com/facebook/thrift/server/TThreadPoolServer.java
rename to lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
index 13f83a1..83c95ae 100644
--- a/lib/java/src/com/facebook/thrift/server/TThreadPoolServer.java
+++ b/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
@@ -4,18 +4,18 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.server;
+package org.apache.thrift.server;
-import com.facebook.thrift.TException;
-import com.facebook.thrift.TProcessor;
-import com.facebook.thrift.TProcessorFactory;
-import com.facebook.thrift.protocol.TProtocol;
-import com.facebook.thrift.protocol.TProtocolFactory;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.transport.TServerTransport;
-import com.facebook.thrift.transport.TTransport;
-import com.facebook.thrift.transport.TTransportException;
-import com.facebook.thrift.transport.TTransportFactory;
+import org.apache.thrift.TException;
+import org.apache.thrift.TProcessor;
+import org.apache.thrift.TProcessorFactory;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.transport.TServerTransport;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportException;
+import org.apache.thrift.transport.TTransportFactory;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
diff --git a/lib/java/src/com/facebook/thrift/transport/TFramedTransport.java b/lib/java/src/org/apache/thrift/transport/TFramedTransport.java
similarity index 96%
rename from lib/java/src/com/facebook/thrift/transport/TFramedTransport.java
rename to lib/java/src/org/apache/thrift/transport/TFramedTransport.java
index dbb9e5f..f7ff5ac 100644
--- a/lib/java/src/com/facebook/thrift/transport/TFramedTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TFramedTransport.java
@@ -4,11 +4,11 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
import java.io.ByteArrayInputStream;
-import com.facebook.thrift.TByteArrayOutputStream;
+import org.apache.thrift.TByteArrayOutputStream;
/**
* Socket implementation of the TTransport interface. To be commented soon!
diff --git a/lib/java/src/com/facebook/thrift/transport/THttpClient.java b/lib/java/src/org/apache/thrift/transport/THttpClient.java
similarity index 98%
rename from lib/java/src/com/facebook/thrift/transport/THttpClient.java
rename to lib/java/src/org/apache/thrift/transport/THttpClient.java
index ab3893d..100cb9c 100644
--- a/lib/java/src/com/facebook/thrift/transport/THttpClient.java
+++ b/lib/java/src/org/apache/thrift/transport/THttpClient.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
diff --git a/lib/java/src/com/facebook/thrift/transport/TIOStreamTransport.java b/lib/java/src/org/apache/thrift/transport/TIOStreamTransport.java
similarity index 98%
rename from lib/java/src/com/facebook/thrift/transport/TIOStreamTransport.java
rename to lib/java/src/org/apache/thrift/transport/TIOStreamTransport.java
index fd561ed..717f48e 100644
--- a/lib/java/src/com/facebook/thrift/transport/TIOStreamTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TIOStreamTransport.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
import java.io.IOException;
import java.io.InputStream;
diff --git a/lib/java/src/com/facebook/thrift/transport/TMemoryBuffer.java b/lib/java/src/org/apache/thrift/transport/TMemoryBuffer.java
similarity index 94%
rename from lib/java/src/com/facebook/thrift/transport/TMemoryBuffer.java
rename to lib/java/src/org/apache/thrift/transport/TMemoryBuffer.java
index d558f6b..ed3c844 100644
--- a/lib/java/src/com/facebook/thrift/transport/TMemoryBuffer.java
+++ b/lib/java/src/org/apache/thrift/transport/TMemoryBuffer.java
@@ -4,9 +4,9 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
-import com.facebook.thrift.TByteArrayOutputStream;
+import org.apache.thrift.TByteArrayOutputStream;
import java.io.UnsupportedEncodingException;
/**
diff --git a/lib/java/src/com/facebook/thrift/transport/TNonblockingServerSocket.java b/lib/java/src/org/apache/thrift/transport/TNonblockingServerSocket.java
similarity index 98%
rename from lib/java/src/com/facebook/thrift/transport/TNonblockingServerSocket.java
rename to lib/java/src/org/apache/thrift/transport/TNonblockingServerSocket.java
index 44ed0d8..9e1af69 100644
--- a/lib/java/src/com/facebook/thrift/transport/TNonblockingServerSocket.java
+++ b/lib/java/src/org/apache/thrift/transport/TNonblockingServerSocket.java
@@ -1,5 +1,5 @@
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
import java.io.IOException;
import java.net.InetSocketAddress;
diff --git a/lib/java/src/com/facebook/thrift/transport/TNonblockingServerTransport.java b/lib/java/src/org/apache/thrift/transport/TNonblockingServerTransport.java
similarity index 86%
rename from lib/java/src/com/facebook/thrift/transport/TNonblockingServerTransport.java
rename to lib/java/src/org/apache/thrift/transport/TNonblockingServerTransport.java
index 7911851..60e43a2 100644
--- a/lib/java/src/com/facebook/thrift/transport/TNonblockingServerTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TNonblockingServerTransport.java
@@ -1,5 +1,5 @@
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
import java.nio.channels.Selector;
diff --git a/lib/java/src/com/facebook/thrift/transport/TNonblockingSocket.java b/lib/java/src/org/apache/thrift/transport/TNonblockingSocket.java
similarity index 99%
rename from lib/java/src/com/facebook/thrift/transport/TNonblockingSocket.java
rename to lib/java/src/org/apache/thrift/transport/TNonblockingSocket.java
index 07c03e3..b14b84b 100644
--- a/lib/java/src/com/facebook/thrift/transport/TNonblockingSocket.java
+++ b/lib/java/src/org/apache/thrift/transport/TNonblockingSocket.java
@@ -1,5 +1,5 @@
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
diff --git a/lib/java/src/com/facebook/thrift/transport/TNonblockingTransport.java b/lib/java/src/org/apache/thrift/transport/TNonblockingTransport.java
similarity index 91%
rename from lib/java/src/com/facebook/thrift/transport/TNonblockingTransport.java
rename to lib/java/src/org/apache/thrift/transport/TNonblockingTransport.java
index a702490..6619c70 100644
--- a/lib/java/src/com/facebook/thrift/transport/TNonblockingTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TNonblockingTransport.java
@@ -1,4 +1,4 @@
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
import java.io.IOException;
import java.nio.channels.Selector;
diff --git a/lib/java/src/com/facebook/thrift/transport/TServerSocket.java b/lib/java/src/org/apache/thrift/transport/TServerSocket.java
similarity index 98%
rename from lib/java/src/com/facebook/thrift/transport/TServerSocket.java
rename to lib/java/src/org/apache/thrift/transport/TServerSocket.java
index b4ad6fb..d5cee7f 100644
--- a/lib/java/src/com/facebook/thrift/transport/TServerSocket.java
+++ b/lib/java/src/org/apache/thrift/transport/TServerSocket.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
import java.io.IOException;
import java.net.InetSocketAddress;
diff --git a/lib/java/src/com/facebook/thrift/transport/TServerTransport.java b/lib/java/src/org/apache/thrift/transport/TServerTransport.java
similarity index 96%
rename from lib/java/src/com/facebook/thrift/transport/TServerTransport.java
rename to lib/java/src/org/apache/thrift/transport/TServerTransport.java
index 872ac3c..1730a03 100644
--- a/lib/java/src/com/facebook/thrift/transport/TServerTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TServerTransport.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
/**
* Server transport. Object which provides client transports.
diff --git a/lib/java/src/com/facebook/thrift/transport/TSocket.java b/lib/java/src/org/apache/thrift/transport/TSocket.java
similarity index 98%
rename from lib/java/src/com/facebook/thrift/transport/TSocket.java
rename to lib/java/src/org/apache/thrift/transport/TSocket.java
index c30a478..6a2feb7 100644
--- a/lib/java/src/com/facebook/thrift/transport/TSocket.java
+++ b/lib/java/src/org/apache/thrift/transport/TSocket.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
diff --git a/lib/java/src/com/facebook/thrift/transport/TTransport.java b/lib/java/src/org/apache/thrift/transport/TTransport.java
similarity index 98%
rename from lib/java/src/com/facebook/thrift/transport/TTransport.java
rename to lib/java/src/org/apache/thrift/transport/TTransport.java
index 3d911bf..fd7e619 100644
--- a/lib/java/src/com/facebook/thrift/transport/TTransport.java
+++ b/lib/java/src/org/apache/thrift/transport/TTransport.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
/**
* Generic class that encapsulates the I/O layer. This is basically a thin
diff --git a/lib/java/src/com/facebook/thrift/transport/TTransportException.java b/lib/java/src/org/apache/thrift/transport/TTransportException.java
similarity index 94%
rename from lib/java/src/com/facebook/thrift/transport/TTransportException.java
rename to lib/java/src/org/apache/thrift/transport/TTransportException.java
index 7a04ae1..3bbf38e 100644
--- a/lib/java/src/com/facebook/thrift/transport/TTransportException.java
+++ b/lib/java/src/org/apache/thrift/transport/TTransportException.java
@@ -4,9 +4,9 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
-import com.facebook.thrift.TException;
+import org.apache.thrift.TException;
/**
* Transport exceptions.
diff --git a/lib/java/src/com/facebook/thrift/transport/TTransportFactory.java b/lib/java/src/org/apache/thrift/transport/TTransportFactory.java
similarity index 95%
rename from lib/java/src/com/facebook/thrift/transport/TTransportFactory.java
rename to lib/java/src/org/apache/thrift/transport/TTransportFactory.java
index cbe5808..e0883ed 100644
--- a/lib/java/src/com/facebook/thrift/transport/TTransportFactory.java
+++ b/lib/java/src/org/apache/thrift/transport/TTransportFactory.java
@@ -4,7 +4,7 @@
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
-package com.facebook.thrift.transport;
+package org.apache.thrift.transport;
/**
* Factory class used to create wrapped instance of Transports.
diff --git a/test/java/TestClient b/test/java/TestClient
index bcdffa2..b848755 100755
--- a/test/java/TestClient
+++ b/test/java/TestClient
@@ -1,2 +1,2 @@
#!/bin/bash -v
-java -cp thrifttest.jar:../../lib/java/libthrift.jar com.facebook.thrift.test.TestClient $*
+java -cp thrifttest.jar:../../lib/java/libthrift.jar org.apache.thrift.test.TestClient $*
diff --git a/test/java/TestNonblockingServer b/test/java/TestNonblockingServer
index ee2ba9d..f2c596b 100644
--- a/test/java/TestNonblockingServer
+++ b/test/java/TestNonblockingServer
@@ -1,2 +1,2 @@
#!/bin/bash -v
-java -server -Xmx256m -cp thrifttest.jar:../../lib/java/libthrift.jar com.facebook.thrift.test.TestNonblockingServer $*
+java -server -Xmx256m -cp thrifttest.jar:../../lib/java/libthrift.jar org.apache.thrift.test.TestNonblockingServer $*
diff --git a/test/java/TestServer b/test/java/TestServer
index 360efdf..82a6d2a 100755
--- a/test/java/TestServer
+++ b/test/java/TestServer
@@ -1,2 +1,2 @@
#!/bin/bash -v
-java -server -cp thrifttest.jar:../../lib/java/libthrift.jar com.facebook.thrift.test.TestServer $*
+java -server -cp thrifttest.jar:../../lib/java/libthrift.jar org.apache.thrift.test.TestServer $*
diff --git a/test/java/build.xml b/test/java/build.xml
index 0860d9c..b779663 100644
--- a/test/java/build.xml
+++ b/test/java/build.xml
@@ -40,17 +40,17 @@
</target>
<target name="test" depends="compile">
- <java classname="com.facebook.thrift.test.JSONProtoTest"
+ <java classname="org.apache.thrift.test.JSONProtoTest"
classpath="${cpath}:${testjar}:${gen}" failonerror="true" />
- <java classname="com.facebook.thrift.test.IdentityTest"
+ <java classname="org.apache.thrift.test.IdentityTest"
classpath="${cpath}:${testjar}:${gen}" failonerror="true" />
- <java classname="com.facebook.thrift.test.EqualityTest"
+ <java classname="org.apache.thrift.test.EqualityTest"
classpath="${cpath}:${testjar}:${gen}" failonerror="true" />
- <java classname="com.facebook.thrift.test.ToStringTest"
+ <java classname="org.apache.thrift.test.ToStringTest"
classpath="${cpath}:${testjar}:${gen}" failonerror="true" />
- <java classname="com.facebook.thrift.test.DeepCopyTest"
+ <java classname="org.apache.thrift.test.DeepCopyTest"
classpath="${cpath}:${testjar}:${gen}" failonerror="true" />
- <java classname="com.facebook.thrift.test.JavaBeansTest"
+ <java classname="org.apache.thrift.test.JavaBeansTest"
classpath="${cpath}:${testjar}:${gen}" failonerror="true" />
</target>
diff --git a/test/java/src/DeepCopyTest.java b/test/java/src/DeepCopyTest.java
index ac11ffa..3983373 100644
--- a/test/java/src/DeepCopyTest.java
+++ b/test/java/src/DeepCopyTest.java
@@ -1,9 +1,9 @@
-package com.facebook.thrift.test;
+package org.apache.thrift.test;
-import com.facebook.thrift.TDeserializer;
-import com.facebook.thrift.TSerializer;
-import com.facebook.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.TDeserializer;
+import org.apache.thrift.TSerializer;
+import org.apache.thrift.protocol.TBinaryProtocol;
import thrift.test.*;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/test/java/src/EqualityTest.java b/test/java/src/EqualityTest.java
index 8bdba2c..5ff0d69 100644
--- a/test/java/src/EqualityTest.java
+++ b/test/java/src/EqualityTest.java
@@ -22,7 +22,7 @@
print >> out, "*""/"
print >> out, r'''
-package com.facebook.thrift.test;
+package org.apache.thrift.test;
// Generated code
import thrift.test.*;
@@ -84,7 +84,7 @@
'''
*/
-package com.facebook.thrift.test;
+package org.apache.thrift.test;
// Generated code
import thrift.test.*;
diff --git a/test/java/src/IdentityTest.java b/test/java/src/IdentityTest.java
index 3f64ef7..afc114a 100644
--- a/test/java/src/IdentityTest.java
+++ b/test/java/src/IdentityTest.java
@@ -1,12 +1,12 @@
-package com.facebook.thrift.test;
+package org.apache.thrift.test;
// Generated code
import thrift.test.*;
-import com.facebook.thrift.TSerializer;
-import com.facebook.thrift.TDeserializer;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.protocol.TSimpleJSONProtocol;
+import org.apache.thrift.TSerializer;
+import org.apache.thrift.TDeserializer;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TSimpleJSONProtocol;
import java.util.Map;
import java.util.HashMap;
diff --git a/test/java/src/JSONProtoTest.java b/test/java/src/JSONProtoTest.java
index 4177765..4dba33f 100644
--- a/test/java/src/JSONProtoTest.java
+++ b/test/java/src/JSONProtoTest.java
@@ -1,10 +1,10 @@
-package com.facebook.thrift.test;
+package org.apache.thrift.test;
// Generated code
import thrift.test.*;
-import com.facebook.thrift.transport.TMemoryBuffer;
-import com.facebook.thrift.protocol.TJSONProtocol;
+import org.apache.thrift.transport.TMemoryBuffer;
+import org.apache.thrift.protocol.TJSONProtocol;
import java.util.Map;
import java.util.HashMap;
diff --git a/test/java/src/JavaBeansTest.java b/test/java/src/JavaBeansTest.java
index f1d70a3..707a4c2 100644
--- a/test/java/src/JavaBeansTest.java
+++ b/test/java/src/JavaBeansTest.java
@@ -1,4 +1,4 @@
-package com.facebook.thrift.test;
+package org.apache.thrift.test;
import java.util.LinkedList;
import thrift.test.OneOfEachBeans;
diff --git a/test/java/src/OverloadNonblockingServer.java b/test/java/src/OverloadNonblockingServer.java
index 26f5354..49b7509 100644
--- a/test/java/src/OverloadNonblockingServer.java
+++ b/test/java/src/OverloadNonblockingServer.java
@@ -1,16 +1,16 @@
-package com.facebook.thrift;
+package org.apache.thrift;
import thrift.test.*;
-import com.facebook.thrift.TApplicationException;
-import com.facebook.thrift.TSerializer;
-import com.facebook.thrift.transport.TTransport;
-import com.facebook.thrift.transport.TSocket;
-import com.facebook.thrift.transport.TFramedTransport;
-import com.facebook.thrift.transport.TTransportException;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.protocol.TSimpleJSONProtocol;
+import org.apache.thrift.TApplicationException;
+import org.apache.thrift.TSerializer;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TFramedTransport;
+import org.apache.thrift.transport.TTransportException;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TSimpleJSONProtocol;
import java.util.Map;
import java.util.HashMap;
diff --git a/test/java/src/TestClient.java b/test/java/src/TestClient.java
index b092197..da638d2 100644
--- a/test/java/src/TestClient.java
+++ b/test/java/src/TestClient.java
@@ -1,17 +1,17 @@
-package com.facebook.thrift.test;
+package org.apache.thrift.test;
// Generated code
import thrift.test.*;
-import com.facebook.thrift.TApplicationException;
-import com.facebook.thrift.TSerializer;
-import com.facebook.thrift.transport.TTransport;
-import com.facebook.thrift.transport.TSocket;
-import com.facebook.thrift.transport.THttpClient;
-import com.facebook.thrift.transport.TFramedTransport;
-import com.facebook.thrift.transport.TTransportException;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.protocol.TSimpleJSONProtocol;
+import org.apache.thrift.TApplicationException;
+import org.apache.thrift.TSerializer;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.THttpClient;
+import org.apache.thrift.transport.TFramedTransport;
+import org.apache.thrift.transport.TTransportException;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TSimpleJSONProtocol;
import java.util.Map;
import java.util.HashMap;
diff --git a/test/java/src/TestNonblockingServer.java b/test/java/src/TestNonblockingServer.java
index 450d67a..5df52da 100644
--- a/test/java/src/TestNonblockingServer.java
+++ b/test/java/src/TestNonblockingServer.java
@@ -1,16 +1,16 @@
-package com.facebook.thrift.test;
+package org.apache.thrift.test;
-import com.facebook.thrift.TException;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.protocol.TProtocol;
-import com.facebook.thrift.protocol.TProtocolFactory;
-import com.facebook.thrift.server.TServer;
-import com.facebook.thrift.server.TSimpleServer;
-import com.facebook.thrift.server.TNonblockingServer;
-import com.facebook.thrift.server.THsHaServer;
-import com.facebook.thrift.transport.TNonblockingServerSocket;
-import com.facebook.thrift.transport.TNonblockingServerTransport;
-import com.facebook.thrift.transport.TFramedTransport;
+import org.apache.thrift.TException;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.thrift.server.TServer;
+import org.apache.thrift.server.TSimpleServer;
+import org.apache.thrift.server.TNonblockingServer;
+import org.apache.thrift.server.THsHaServer;
+import org.apache.thrift.transport.TNonblockingServerSocket;
+import org.apache.thrift.transport.TNonblockingServerTransport;
+import org.apache.thrift.transport.TFramedTransport;
// Generated code
import thrift.test.*;
diff --git a/test/java/src/TestServer.java b/test/java/src/TestServer.java
index 92fd4d2..a2f2d20 100644
--- a/test/java/src/TestServer.java
+++ b/test/java/src/TestServer.java
@@ -1,14 +1,14 @@
-package com.facebook.thrift.test;
+package org.apache.thrift.test;
-import com.facebook.thrift.TException;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.protocol.TProtocol;
-import com.facebook.thrift.protocol.TProtocolFactory;
-import com.facebook.thrift.server.TServer;
-import com.facebook.thrift.server.TSimpleServer;
-import com.facebook.thrift.server.TThreadPoolServer;
-import com.facebook.thrift.transport.TServerSocket;
-import com.facebook.thrift.transport.TServerTransport;
+import org.apache.thrift.TException;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.thrift.server.TServer;
+import org.apache.thrift.server.TSimpleServer;
+import org.apache.thrift.server.TThreadPoolServer;
+import org.apache.thrift.transport.TServerSocket;
+import org.apache.thrift.transport.TServerTransport;
// Generated code
import thrift.test.*;
diff --git a/test/java/src/ToStringTest.java b/test/java/src/ToStringTest.java
index 6b328ee..56ce4c9 100644
--- a/test/java/src/ToStringTest.java
+++ b/test/java/src/ToStringTest.java
@@ -1,4 +1,4 @@
-package com.facebook.thrift.test;
+package org.apache.thrift.test;
import thrift.test.*;
diff --git a/tutorial/java/src/JavaClient.java b/tutorial/java/src/JavaClient.java
index 753f0c6..eaeafc9 100644
--- a/tutorial/java/src/JavaClient.java
+++ b/tutorial/java/src/JavaClient.java
@@ -2,12 +2,12 @@
import tutorial.*;
import shared.*;
-import com.facebook.thrift.TException;
-import com.facebook.thrift.transport.TTransport;
-import com.facebook.thrift.transport.TSocket;
-import com.facebook.thrift.transport.TTransportException;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.protocol.TProtocol;
+import org.apache.thrift.TException;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TTransportException;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
import java.util.AbstractMap;
import java.util.HashMap;
diff --git a/tutorial/java/src/JavaServer.java b/tutorial/java/src/JavaServer.java
index b7db0db..631fb9a 100644
--- a/tutorial/java/src/JavaServer.java
+++ b/tutorial/java/src/JavaServer.java
@@ -1,10 +1,10 @@
-import com.facebook.thrift.TException;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.protocol.TProtocol;
-import com.facebook.thrift.server.TServer;
-import com.facebook.thrift.server.TSimpleServer;
-import com.facebook.thrift.transport.TServerSocket;
-import com.facebook.thrift.transport.TServerTransport;
+import org.apache.thrift.TException;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.server.TServer;
+import org.apache.thrift.server.TSimpleServer;
+import org.apache.thrift.transport.TServerSocket;
+import org.apache.thrift.transport.TServerTransport;
// Generated code
import tutorial.*;