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

NB editor Null-pointer exception because of javac hints, with non-installed nb-javac plug-in

    XMLWordPrintableJSON

    Details

      Description

      In NB 11.2 +, with un-installed 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 text-file.

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

      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) {
               }
            });
         }
      }

      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.

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

        Attachments

        1. Nullpointer-javac-hints.txt
          4 kB
          Hans Grimmelshausen

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Fidelius Hans Grimmelshausen
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: