This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch release120 in repository https://gitbox.apache.org/repos/asf/netbeans.git
commit 2aa1752b86e38ab90ac52d11bb16b27e1210071d Author: Jaroslav Tulach <[email protected]> AuthorDate: Thu Jun 4 16:37:42 2020 +0200 Make sure Lookup initialization succeeds in spite of not being able to start a Thread --- .../src/org/openide/util/lookup/implspi/ActiveQueue.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/platform/openide.util.lookup/src/org/openide/util/lookup/implspi/ActiveQueue.java b/platform/openide.util.lookup/src/org/openide/util/lookup/implspi/ActiveQueue.java index e6a8ac6..6ebfa33 100644 --- a/platform/openide.util.lookup/src/org/openide/util/lookup/implspi/ActiveQueue.java +++ b/platform/openide.util.lookup/src/org/openide/util/lookup/implspi/ActiveQueue.java @@ -81,10 +81,14 @@ public final class ActiveQueue { static synchronized void ping() { if (running == null) { Daemon t = new Daemon(); - t.setPriority(Thread.MIN_PRIORITY); - t.setDaemon(true); - t.start(); - LOGGER.fine("starting thread"); + try { + t.setPriority(Thread.MIN_PRIORITY); + t.setDaemon(true); + t.start(); + LOGGER.fine("starting thread"); + } catch (SecurityException ex) { + LOGGER.log(Level.FINE, "cannot start thread", ex); + } running = t; } } --------------------------------------------------------------------- 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
