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

hint: ClassCastException: JCMethodInvocation not cast to StatementTree

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 12.0
    • None
    • java - Hints
    • None
    • repo build with commits as of 4/28; jdk14.0.1; win7

    Description

      Attached a simple single java file project that causes the problem. message.log with Exception also attached. Probably comes down to these lines:

            Field f = OptUtil1.class.getDeclaredField("baz");
            f.setInt(null, 123);
      

      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.

      Attachments

        1. RefactorReflect.zip
          18 kB
          Ernie Rael
        2. messages.log
          57 kB
          Ernie Rael

        Activity

          People

            jlahoda Jan Lahoda
            errael Ernie Rael
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: