You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2008/07/12 03:13:31 UTC

[jira] Created: (THRIFT-80) Improvements to TBinaryProtocol error checking and handling

Improvements to TBinaryProtocol error checking and handling
-----------------------------------------------------------

                 Key: THRIFT-80
                 URL: https://issues.apache.org/jira/browse/THRIFT-80
             Project: Thrift
          Issue Type: Improvement
          Components: Library (Java)
            Reporter: Bryan Duxbury
            Priority: Minor


The Java TBinaryProtocol does very, very little checking and handling of exceptions. For instance, if a bad message is sent with a negative string or list size, it won't be handled correctly. It should result in a TProtocolException with a NEGATIVE_SIZE type. This issue suggests that we should do a thorough once-over of the BinaryProtocol implementation and fortify it against all the various nonsense that it might encounter.

At the same time, should we do away with the exception subtypes and switch to exception subclasses? The standard Java idiom is to inherit specific exception types from a base class rather than use an attribute to indicate its type. (Is this a holdover from another language implementation?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (THRIFT-80) Improvements to TBinaryProtocol error checking and handling

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-80?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury closed THRIFT-80.
-------------------------------

    Resolution: Won't Fix

In retrospect this would probably introduce some performance overhead.

> Improvements to TBinaryProtocol error checking and handling
> -----------------------------------------------------------
>
>                 Key: THRIFT-80
>                 URL: https://issues.apache.org/jira/browse/THRIFT-80
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>
> The Java TBinaryProtocol does very, very little checking and handling of exceptions. For instance, if a bad message is sent with a negative string or list size, it won't be handled correctly. It should result in a TProtocolException with a NEGATIVE_SIZE type. This issue suggests that we should do a thorough once-over of the BinaryProtocol implementation and fortify it against all the various nonsense that it might encounter.
> At the same time, should we do away with the exception subtypes and switch to exception subclasses? The standard Java idiom is to inherit specific exception types from a base class rather than use an attribute to indicate its type. (Is this a holdover from another language implementation?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.