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

[jira] [Updated] (NETBEANS-3919) NB editor Null-pointer exception because of javac hints, with non-installed nb-javac plug-in

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

Hans Grimmelshausen updated NETBEANS-3919:
------------------------------------------
    Description: 
In NB 11.2 +, with uninstalled _nb-javac_ plug-in and enabled _Overrides_ editor hint, whilst editing a Java source file containing _Overrides_ situations, a few seconds later NB raises a red Null-pointer exception notification. Please see attached stacktrace.

How to reproduce the bug, step by step:

1) I use Netbeans Ant projects with JDK11 source-/binary-format, but the bug probably also happens with other project types.

2) When NB asks to install _nb-javac_ plugin, please don't install it. In case it's already installed, un-install it. With enabled _nb-javac_ plugin, the Null-pointer exception bug doesn't happen. (Also the refactoring-rename only works fully with an non-installed _nb-javac_ plug-in.)

3) In NB's menu _Tools_ -> _Options_ -> _Editor_ -> _Hints_ -> _Java_, in section "_Standard javac warnings_", enable the _Overrides_ checkbox.

4) Create a simple mini Java source file with offending source code lines, like:
{code:java}
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JCheckBox;
public class Test {
   public static void main(String[] parameter)  {
      JCheckBox jChecker = new JCheckBox();
      jChecker.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
         }
      });
   }
}{code}
 5) Now whenever we edit some of the code in the source file, a few seconds later, when NB's parser wants to check the source code for potential _Overrides_ hint situations, it raises the red Null-pointer exception notification.

7) Work-around: Disable the _Overrides_ checkbox in the NB editor's hints section.

  was:
Short description: In NB 11.2, with uninstalled nb-javac plug-in and enabled "Overrides" editor hint, whilst editing a Java source file containing "Overrides" situations, a few seconds later NB raises a Null-pointer exception. Please see attached stacktrace.

How to reproduce the bug step by step:

1) I use Netbeans Ant projects with Java 11 source-format, but the bug could also happen with other project types.

2) When NB asks to install nb-javac plugin, don't install it. In case it's already installed, un-install it. With enabled nb-javac plugin, the Null-pointer exception bug doesn't happen. (Also the refactoring-rename only works fully with an non-installed nb-javac plug-in.)

3) In NB's menu Tools -> Options -> Editor -> Hints -> Java, in section "Standard javac warnings", enable the "Overrides" checkbox.

4) Create a simple mini Java source file with offending source code lines, like:

 
{code:java}
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JCheckBox;
public class Test {
   public static void main(String[] parameter)  {
      JCheckBox jChecker = new JCheckBox();
      jChecker.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
         }
      });
   }
}{code}
 

5) Now whenever we edit some of the code in the source file, a few seconds later, when NB's parser wants to check the source code for potential "Overrides" hint situations, it raises the red Null-pointer exception notification.

7) Work-around: Disable the "Overrides" checkbox in the NB editor's hints section.


> NB editor Null-pointer exception because of javac hints, with non-installed nb-javac plug-in
> --------------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-3919
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3919
>             Project: NetBeans
>          Issue Type: Bug
>          Components: editor - Hints &amp; Annotations, editor - Parsing &amp; Indexing
>    Affects Versions: 11.0, 11.2, 11.3
>         Environment: Netbeans 11.2 and 11.3_beta
> Ubuntu 18.04 LTS
> OpenJDK 11.0.6 2020-01-14 (via apt-get installed)
>            Reporter: Hans Grimmelshausen
>            Priority: Minor
>              Labels: editor,, exception, hints, ide,, javac,, plugin
>         Attachments: Nullpointer-javac-hints.txt
>
>
> In NB 11.2 +, with uninstalled _nb-javac_ plug-in and enabled _Overrides_ editor hint, whilst editing a Java source file containing _Overrides_ situations, a few seconds later NB raises a red Null-pointer exception notification. Please see attached stacktrace.
> How to reproduce the bug, step by step:
> 1) I use Netbeans Ant projects with JDK11 source-/binary-format, but the bug probably also happens with other project types.
> 2) When NB asks to install _nb-javac_ plugin, please don't install it. In case it's already installed, un-install it. With enabled _nb-javac_ plugin, the Null-pointer exception bug doesn't happen. (Also the refactoring-rename only works fully with an non-installed _nb-javac_ plug-in.)
> 3) In NB's menu _Tools_ -> _Options_ -> _Editor_ -> _Hints_ -> _Java_, in section "_Standard javac warnings_", enable the _Overrides_ checkbox.
> 4) Create a simple mini Java source file with offending source code lines, like:
> {code:java}
> import java.awt.event.ActionEvent;
> import java.awt.event.ActionListener;
> import javax.swing.JCheckBox;
> public class Test {
>    public static void main(String[] parameter)  {
>       JCheckBox jChecker = new JCheckBox();
>       jChecker.addActionListener(new ActionListener() {
>          public void actionPerformed(ActionEvent evt) {
>          }
>       });
>    }
> }{code}
>  5) Now whenever we edit some of the code in the source file, a few seconds later, when NB's parser wants to check the source code for potential _Overrides_ hint situations, it raises the red Null-pointer exception notification.
> 7) Work-around: Disable the _Overrides_ checkbox in the NB editor's hints section.



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