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 2009/02/03 19:49:59 UTC

[jira] Updated: (THRIFT-135) Nulls in set throw an exception in Java

     [ https://issues.apache.org/jira/browse/THRIFT-135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury updated THRIFT-135:
---------------------------------

    Fix Version/s: 0.1

> Nulls in set<string> throw an exception in Java
> -----------------------------------------------
>
>                 Key: THRIFT-135
>                 URL: https://issues.apache.org/jira/browse/THRIFT-135
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Java)
>            Reporter: David Reiss
>             Fix For: 0.1
>
>
> From Amit Sudharshan:
> I recently noticed a bug(feature?) in com.facebook.thrift.protocol.TBinaryProtocol.writeString where if it is passed a null pointer it will throw NPE.
> Now, the autogenerated stub code tries to prevent this, however we recently came across a case where we had a Set<String> which contained a "NULL" (legal in java). Thrift tests to see if the set is non-null and implicitely whether it has any elements, both of these pass in this case, and so the null string is passed to the writeString method where we get the NPE.

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