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

Missing vararg cast in generated code

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.2
    • Fix Version/s: Next
    • Component/s: platform - HTML4J
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: