You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "dugenkui (Jira)" <ji...@apache.org> on 2020/07/05 12:10:00 UTC
[jira] [Commented] (THRIFT-5245) NPE when the value of map's key is
null
[ https://issues.apache.org/jira/browse/THRIFT-5245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17151558#comment-17151558 ]
dugenkui commented on THRIFT-5245:
----------------------------------
It seems that, when the element type of map/list is String/ByteBuffer, and the value of element is null, there will always be a NPE.
> NPE when the value of map's key is null
> ---------------------------------------
>
> Key: THRIFT-5245
> URL: https://issues.apache.org/jira/browse/THRIFT-5245
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Reporter: dugenkui
> Priority: Critical
>
> When the value of map is null, there seem always occurs NPE in the implements of TProtocol.java.
> {code:java}
> @Override
> public void writeString(String str) throws TException {
> byte[] dat = str.getBytes(StandardCharsets.UTF_8);
> writeI32(dat.length);
> trans_.write(dat, 0, dat.length);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)