Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-621

Missing vararg cast in generated code

VotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 8.2
    • Next
    • platform - HTML4J
    • None

    Description

      Code that is using @Model as

      @ModelOperation
      void read(Square square, SquareModel[] arr) {
          arr[0] = this;
      }
      

      and later called

      SquareModel[] arr = { null };
      sq.read(arr);
      

      may yield a NPE thanks to wrong generated code.

      Attachments

        Activity

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

          People

            jtulach Jaroslav Tulach
            jtulach Jaroslav Tulach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment