Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-3521

equals generate by jute potentially cause NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Won't Fix
    • 3.6.0
    • None
    • jute
    • None

    Description

      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 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?

      Attachments

        Activity

          People

            tison Zili Chen
            tison Zili Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: