You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "James (Jira)" <ji...@apache.org> on 2020/09/14 15:36:00 UTC

[jira] [Created] (NETBEANS-4801) Netbeans 12.0 syntax checking doesn't parse anonymous inner class

James created NETBEANS-4801:
-------------------------------

             Summary: Netbeans 12.0 syntax checking doesn't parse anonymous inner class
                 Key: NETBEANS-4801
                 URL: https://issues.apache.org/jira/browse/NETBEANS-4801
             Project: NetBeans
          Issue Type: Bug
          Components: cnd - Editor
    Affects Versions: 12.0
         Environment: Windows 10
Netbeans 12.0
JDK 14
            Reporter: James
         Attachments: HelloWorldGui.java

Example is from a simple GUI meant as a class review/demonstration. A JButton was added to a JFrame and an anonymous inner class used to respond to the ActionEvent. Following code does not indicate any errors for inner class - the error does appear when compiled. Problem reported should be that the anonymous class is not declared abstract because it does not override the abstract method actionPerformed(). The syntax of the method is correct - but it is named improperly (on purpose for demonstration purposes).

No hint is displayed.

Also - "Source"->"Insert code" menu does not provide ability to implement abstract methods.

{{ btnClickMe.addActionListener(new ActionListener(){}}

{{   public void ationPerformed(ActionEvent ev){}}
{{      lblResults.setText("Hello " + txtName.getText());}}
{{   }}}
{{ } );}}



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