You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Zili Chen (Jira)" <ji...@apache.org> on 2022/03/14 05:08:00 UTC

[jira] [Resolved] (ZOOKEEPER-3521) equals generate by jute potentially cause NPE

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

Zili Chen resolved ZOOKEEPER-3521.
----------------------------------
    Fix Version/s:     (was: 3.9.0)
       Resolution: Won't Fix

It seems less priority and interested. Resolved as won't fix.

> 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: Zili Chen
>            Assignee: Zili Chen
>            Priority: Critical
>
> jute generate {{equals}} as follow
> {code:java}
>     String genJavaEquals(String fname, String peer) {
>         return "    ret = " + fname + ".equals(" + peer + ");\n";
>     }
> {code}
> 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
(v8.20.1#820001)