You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by lk...@apache.org on 2020/07/04 19:08:58 UTC

[netbeans] 01/04: Make sure Lookup initialization succeeds in spite of not being able to start a Thread

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 <ja...@apidesign.org>
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: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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