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

Missing vararg cast in generated code

    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

          People

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

            Dates

              Created:
              Updated:
              Resolved: