eirikbakke commented on PR #5361:
URL: https://github.com/apache/netbeans/pull/5361#issuecomment-1577691353
I think the "Turned Connect action to asynchronous" commit may have broken
the public DatabaseConnection.showConnectionDialog API method, which should
work from the EDT, but now doesn't:
```
java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread
at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1351)
at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1344)
at
java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480)
at
org.netbeans.modules.db.explorer.action.ConnectAction$ConnectionDialogDisplayer.showDialog(ConnectAction.java:254)
at
org.netbeans.modules.db.explorer.DatabaseConnection$5.run(DatabaseConnection.java:1230)
at
org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEvent(NbMutexEventProvider.java:97)
at
org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:72)
at
org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:66)
at org.openide.util.Mutex.readAccess(Mutex.java:242)
at
org.netbeans.modules.db.explorer.DatabaseConnection.showConnectionDialog(DatabaseConnection.java:1227)
at
org.netbeans.api.db.explorer.ConnectionManager.showConnectionDialog(ConnectionManager.java:343)
```
I'll test a fix that simply changes invokeAndWait to
"Mutex.EVENT.writeAccess((Mutex.Action<Void>) () -> { ... })", but if you can
think of other potential problems like this, let me know...
--
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