diff options
author | Bryan Duxbury <bryanduxbury@apache.org> | 2012-09-11 18:33:07 +0000 |
---|---|---|
committer | Bryan Duxbury <bryanduxbury@apache.org> | 2012-09-11 18:33:07 +0000 |
commit | 630ce09ae6f8bca0ac456cbdc9984de73e08512c (patch) | |
tree | 6b8fc230e6644e2f46002c4891174dcac869b4f9 | |
parent | 5cac98c659b2fa14ff08f9acd6907786644e250a (diff) | |
download | thrift-630ce09ae6f8bca0ac456cbdc9984de73e08512c.tar.gz |
THRIFT-1655. java: TBinaryProtocol: exceeded message length raises generic TException
This patch converts the TException into a TProtocolException.
Patch: Tyler Hobbs
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1383515 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java b/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java index d0d993b30..0c20fa98c 100644 --- a/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java +++ b/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java @@ -385,12 +385,12 @@ public class TBinaryProtocol extends TProtocol { protected void checkReadLength(int length) throws TException { if (length < 0) { - throw new TException("Negative length: " + length); + throw new TProtocolException("Negative length: " + length); } if (checkReadLength_) { readLength_ -= length; if (readLength_ < 0) { - throw new TException("Message length exceeded: " + length); + throw new TProtocolException("Message length exceeded: " + length); } } } |