Author: bryanduxbury
Date: Tue Sep 11 18:33:07 2012
New Revision: 1383515
URL: http://svn.apache.org/viewvc?rev=1383515&view=rev
Log:
THRIFT-1655. java: TBinaryProtocol: exceeded message length raises generic
TException
This patch converts the TException into a TProtocolException.
Patch: Tyler Hobbs
Modified:
thrift/trunk/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java
Modified:
thrift/trunk/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java
URL:
http://svn.apache.org/viewvc/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java?rev=1383515&r1=1383514&r2=1383515&view=diff
==============================================================================
--- thrift/trunk/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java
(original)
+++ thrift/trunk/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java
Tue Sep 11 18:33:07 2012
@@ -385,12 +385,12 @@ public class TBinaryProtocol extends TPr
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);
}
}
}