mbien commented on code in PR #4134:
URL: https://github.com/apache/netbeans/pull/4134#discussion_r878100330
##########
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:
consider `!GraphicsEnvironment.isHeadless() &&
SwingUtilities.isEventDispatchThread()`
it wouldn't surprise me if this has been already extracted into a utility
somewhere since this looks to me like a common check.
--
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