Skip to content

Commit

Permalink
Update libthrift to 0.14.1
Browse files Browse the repository at this point in the history
  • Loading branch information
regadas committed May 21, 2021
1 parent cabad6f commit 944d32f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,15 @@ lazy val chillThrift = module("thrift").settings(
crossPaths := false,
autoScalaLibrary := false,
libraryDependencies ++= Seq(
"org.apache.thrift" % "libthrift" % "0.13.0" % "provided"
"org.apache.thrift" % "libthrift" % "0.14.1" % "provided"
)
)

lazy val chillScrooge = module("scrooge")
.settings(
crossScalaVersions += "2.13.6",
libraryDependencies ++= Seq(
("org.apache.thrift" % "libthrift" % "0.13.0").exclude("junit", "junit"),
("org.apache.thrift" % "libthrift" % "0.14.1").exclude("junit", "junit"),
"com.twitter" %% "scrooge-serializer" % scroogeVersion
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,24 @@
import org.apache.thrift.TDeserializer;
import org.apache.thrift.TException;
import org.apache.thrift.TSerializer;
import org.apache.thrift.transport.TTransportException;

/**
* Kryo serializer for Thrift instances.
*
* Note that this class is not thread-safe. (Kryo itself is not thread
* safe, so this shouldn't be a concern.)
* Note that this class is not thread-safe. (Kryo itself is not thread safe, so
* this shouldn't be a concern.)
*
* Use this with
* addDefaultSerializer(TBase.class, TBaseSerializer.class)
* It still helps to .register your instances so the full class name
* does not need to be written.
* Use this with addDefaultSerializer(TBase.class, TBaseSerializer.class) It
* still helps to .register your instances so the full class name does not need
* to be written.
*/
public class TBaseSerializer extends Serializer<TBase> {
private final TSerializer serializer = new TSerializer();
private final TDeserializer deserializer = new TDeserializer();
private final TSerializer serializer = new TSerializer();
private final TDeserializer deserializer = new TDeserializer();

public TBaseSerializer() throws TTransportException {
}

@Override
public void write(Kryo kryo, Output output, TBase tBase) {
Expand All @@ -66,4 +69,3 @@ public TBase read(Kryo kryo, Input input, Class<TBase> tBaseClass) {
}
}
}

0 comments on commit 944d32f

Please sign in to comment.