4e6 commented on code in PR #4134:
URL: https://github.com/apache/netbeans/pull/4134#discussion_r878102153


##########
platform/sampler/src/org/netbeans/modules/sampler/Sampler.java:
##########
@@ -227,7 +226,6 @@ private synchronized void stopSampling(boolean cancel, 
DataOutputStream dos) {
             if (cancel || samples < 1) {
                 return;
             }
-            if (SwingUtilities.isEventDispatchThread()) throw new 
IllegalStateException("sampling cannot be stopped from EDT");  //NOI18N

Review Comment:
   There are also other Swing usages that should be treated in a similar way
   
   ```bash
   $ rg 'isDispatchThread' .
   ./src/main/java/org/netbeans/modules/sampler/InternalSampler.java
   174:        if (EventQueue.isDispatchThread()) {
   183:        if (EventQueue.isDispatchThread()) {
   192:        if (EventQueue.isDispatchThread()) {
   ```



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