zookeeper-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TisonKun (Jira)" <j...@apache.org>
Subject [jira] [Created] (ZOOKEEPER-3521) equals generate by jute potentially cause NPE
Date Sun, 25 Aug 2019 02:52:00 GMT
TisonKun created ZOOKEEPER-3521:

             Summary: equals generate by jute potentially cause NPE
                 Key: ZOOKEEPER-3521
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3521
             Project: ZooKeeper
          Issue Type: Bug
          Components: jute
    Affects Versions: 3.6.0
            Reporter: TisonKun
            Assignee: TisonKun
             Fix For: 3.6.0

jute generate {{equals}} as follow

    String genJavaEquals(String fname, String peer) {
        return "    ret = " + fname + ".equals(" + peer + ");\n";

if {{fname}} is null at the runtime, then a {{NullPointerException}} would be thrown, see
[this report|https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build-maven/org.apache.zookeeper$zookeeper/1167/testReport/junit/org.apache.zookeeper.server/PrepRequestProcessorTest/testPRequest/]
for instance.

Java already solved this problem by using {{java.util.Objetcs.equals}}, I address this issue
along with ZOOKEEPER-3290 in GH-839. But I need input from CPP and CSharp side.

BTW, is there anybody use jute's CSharp version or even CPP version?

This message was sent by Atlassian Jira

View raw message