You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Jaroslav Tulach (JIRA)" <ji...@apache.org> on 2018/04/08 04:31:00 UTC

[jira] [Updated] (NETBEANS-621) Missing vararg cast in generated code

     [ https://issues.apache.org/jira/browse/NETBEANS-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jaroslav Tulach updated NETBEANS-621:
-------------------------------------
    Description: 
Code that is using @Model as
{code}
        @ModelOperation
        void read(Square square, SquareModel[] arr) {
            arr[0] = this;
        }
{code}
and later called
{code}
                        SquareModel[] arr = { null };
                        sq.read(arr);
{code}
may yield a NPE thanks to wrong generated code.

  was:
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.


> Missing vararg cast in generated code
> -------------------------------------
>
>                 Key: NETBEANS-621
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-621
>             Project: NetBeans
>          Issue Type: Bug
>          Components: platform - HTML4J
>    Affects Versions: 8.2
>            Reporter: Jaroslav Tulach
>            Assignee: Jaroslav Tulach
>            Priority: Major
>
> Code that is using @Model as
> {code}
>         @ModelOperation
>         void read(Square square, SquareModel[] arr) {
>             arr[0] = this;
>         }
> {code}
> and later called
> {code}
>                         SquareModel[] arr = { null };
>                         sq.read(arr);
> {code}
> may yield a NPE thanks to wrong generated code.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists