You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Ernie Rael (Jira)" <ji...@apache.org> on 2020/05/03 04:49:00 UTC

[jira] [Resolved] (NETBEANS-4276) hint: ClassCastException: JCMethodInvocation not cast to StatementTree

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

Ernie Rael resolved NETBEANS-4276.
----------------------------------
    Resolution: Invalid

Add semicolon to <pattern> and <fix-pattern> and it works.

> hint: ClassCastException: JCMethodInvocation not cast to StatementTree 
> -----------------------------------------------------------------------
>
>                 Key: NETBEANS-4276
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4276
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Hints
>    Affects Versions: 12.0
>         Environment: repo build with commits as of 4/28; jdk14.0.1; win7
>            Reporter: Ernie Rael
>            Assignee: Jan Lahoda
>            Priority: Minor
>         Attachments: RefactorReflect.zip, messages.log
>
>
> Attached a simple single java file project that causes the problem. message.log with Exception also attached. Probably comes down to these lines:
> {code:java}
>       Field f = OptUtil1.class.getDeclaredField("baz");
>       f.setInt(null, 123);
> {code}
> Using a custom hint; issue2.hint is in the project at top level. Fails both with clicking on bulb and inspect&transform.
> Those two lines above, reflection, have nothing to do with it. Delete them, leave only the two lines that match the hint. Exception still happens.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
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