This is an automated email from the ASF dual-hosted git repository.

ebakke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git

commit e1c9ff4d3967988b78609a4f3b0d2d3b71340478
Author: Eirik Bakke <[email protected]>
AuthorDate: Thu Jun 20 11:39:24 2024 +0200

    Remove the dead code, as requested in PR review. (Will squash this commit 
before merging.)
---
 .../src/org/openide/util/RequestProcessor.java     | 36 +++-------------------
 1 file changed, 4 insertions(+), 32 deletions(-)

diff --git a/platform/openide.util/src/org/openide/util/RequestProcessor.java 
b/platform/openide.util/src/org/openide/util/RequestProcessor.java
index 8db6a7d3854..d0e8498d5c5 100644
--- a/platform/openide.util/src/org/openide/util/RequestProcessor.java
+++ b/platform/openide.util/src/org/openide/util/RequestProcessor.java
@@ -19,7 +19,6 @@
 
 package org.openide.util;
 
-import java.lang.reflect.Method;
 import java.security.PrivilegedAction;
 import java.util.ArrayDeque;
 import java.util.ArrayList;
@@ -1051,37 +1050,10 @@ outer:  do {
     private static final TopLevelThreadGroup TOP_GROUP = new 
TopLevelThreadGroup();
     private static final class TopLevelThreadGroup implements 
PrivilegedAction<ThreadGroup> {
         public ThreadGroup getTopLevelThreadGroup() {
-            /* An old bugfix for Applet/JNLP environments now triggers an 
"Illegal reflective access"
-            warning on modern Java versions. Since Applets and JNLP have now 
long been deprecated,
-            we can disable said bugfix. I never ever saw the "differs from 
originally used" log
-            message below occur in a regular NetBeans IDE or NetBeans Platform 
application context
-            either. See https://bz.apache.org/netbeans/show_bug.cgi?id=184494 
*/
-            final boolean INCLUDE_APPLET_BUGFIX_184494 = false;
-
-            ThreadGroup orig = 
java.security.AccessController.doPrivileged(this);
-            if (INCLUDE_APPLET_BUGFIX_184494) {
-                ThreadGroup nuova = null;
-
-                try {
-                    Class<?> appContext = Class.forName("sun.awt.AppContext");
-                    Method instance = appContext.getMethod("getAppContext");
-                    Method getTG = appContext.getMethod("getThreadGroup");
-                    nuova = (ThreadGroup) getTG.invoke(instance.invoke(null));
-                } catch (Exception exception) {
-                    logger().log(Level.FINE, "Cannot access 
sun.awt.AppContext", exception);
-                    return orig;
-                }
-
-                assert nuova != null;
-
-                if (nuova != orig) {
-                    logger().log(Level.WARNING, "AppContext group {0} differs 
from originally used {1}", new Object[]{nuova, orig});
-                }
-                return nuova;
-            } else {
-                return orig;
-            }
-            
+            /* There used to be a workaround for
+            https://bz.apache.org/netbeans/show_bug.cgi?id=184494 here, 
relating to Applet and JNLP
+            environments. It was removed, since these environments are never 
used anymore. */
+            return java.security.AccessController.doPrivileged(this);
         }
         @Override
         public ThreadGroup run() {


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