loransrjones opened a new issue, #5458:
URL: https://github.com/apache/netbeans/issues/5458

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   java.lang.NullPointerException: Cannot invoke 
"org.netbeans.modules.maven.api.NbMavenProject.getMavenProject()" because 
"nbMavenProject" is null
        at 
org.netbeans.modules.fish.payara.micro.project.ReloadAction.actionPerformed(ReloadAction.java:98)
        at 
org.openide.awt.AlwaysEnabledAction$1.run(AlwaysEnabledAction.java:174)
        at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:70)
        at 
org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:91)
        at 
org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:74)
        at 
org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:177)
        at 
java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
        at 
java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
        at 
java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
        at 
java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
        at 
java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)
        at 
java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1028)
        at 
java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1072)
        at 
java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
        at 
java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
        at java.desktop/java.awt.Component.processEvent(Component.java:6391)
        at java.desktop/java.awt.Container.processEvent(Container.java:2266)
        at 
java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
        at 
java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
        at 
java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
        at 
java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
        at 
java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
        at 
java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
        at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
        at 
java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
        at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at 
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at 
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
        at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at 
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
        at 
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
   [catch] at 
java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at 
java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at 
java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at 
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at 
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at 
java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
   
   
   ### How to reproduce
   
   /*
    * Click 
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change 
this license
    * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit 
this template
    */
   package listdemo;
   import java.awt.*;
   import java.awt.event.*;
   import javax.swing.*;
   import javax.swing.event.*;
   
   /**
    *
    * @author ljones
    */
   public class ListDemo implements ListSelectionListener {
       
       JList<String> jlst;
       JLabel jlab;
       JScrollPane jscrlp;
       
       // Create an array of names.
       String names[] = {"Sherry", "Jon", "Rachel",
                           "Sasha", "Joselyn", "Randy", 
                           "Tom", "Mary", "Ken", 
                           "Andrew", "Matt", "Todd"};
       
       ListDemo()  {
           JFrame jfrm = new JFrame("JList Demo");
           
           jfrm.setLayout(new FlowLayout());
           
           jfrm.setSize(280, 120);
           
           jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
           
           // Create a JList
           jlst = new JList<String>(names);
           
           // Set the list selection mode to single-selection
           jlst.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
           
           // Add list to a scroll pane.
           jscrlp = new JScrollPane(jlst);
           
           // Set the preferred size of the scroll pane.
           jscrlp.setPreferredSize(new Dimension(120, 90));
           
           // Make a label that displays the selection.
           jlab = new JLabel("Please choose a name");
           
           // Add list selection handler.
           jlst.addListSelectionListener(this);
           
           // Add the list and label to the content pane.
           jfrm.add(jscrlp);
           jfrm.add(jlab);
       }
       
       // Handle list selection events.
       public void valueChanged(ListSelectionEvent le) {
           // Get the index of the changed item.
           int idx = jlst.getSelectedIndex();
           // Display selection, if item was selected.
           if(idx != -1)
               jlab.setText("Current selection: " + names[idx]);
           else // Otherwise, reprompt.
               jlab.setText("Please choose a name");
       }
   
       /**
        * @param args the command line arguments
        */
       public static void main(String[] args) {
           // Create the frame on the event dispatching thread.
           SwingUtilities.invokeLater(new Runnable()   {
               public void run()   {
                   new ListDemo();
               }
           });
       }
       
   }
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 10
   
   ### JDK
   
   17
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   Yes
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to