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

equals generate by jute potentially cause NPE

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment