summaryrefslogtreecommitdiff
path: root/libre/icedtea-web/java13-SecurityManager.patch
blob: b7b80cc1e1589c03e0c6f8c8f8ef5631d522a844 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From 276806d9984331c754fb636ab11f05e78b3fc8c7 Mon Sep 17 00:00:00 2001
From: Martin Schelldorfer <schelldorfer@gmail.com>
Date: Fri, 20 Sep 2019 14:51:29 +0200
Subject: [PATCH]  #437 Application cannot be started with JDK 13 -
 AWTSecurityManager was removed

---
 .../jnlp/runtime/JNLPSecurityManager.java     | 30 +------------------
 1 file changed, 1 insertion(+), 29 deletions(-)

diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
index 367b2b25..be418103 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
@@ -29,7 +29,6 @@
 import net.sourceforge.jnlp.util.logging.OutputController;
 import net.sourceforge.jnlp.util.WeakList;
 import net.sourceforge.swing.SwingUtils;
-import sun.awt.AWTSecurityManager;
 import sun.awt.AppContext;

 /**
@@ -47,7 +46,7 @@
  * @author <a href="mailto:jmaxwell@users.sourceforge.net">Jon A. Maxwell (JAM)</a> - initial author
  * @version $Revision: 1.17 $
  */
-class JNLPSecurityManager extends AWTSecurityManager {
+class JNLPSecurityManager extends SecurityManager {

     // todo: some apps like JDiskReport can close the VM even when
     // an exit class is set - fix!
@@ -424,33 +423,6 @@
     }

     /**
-     * This returns the appropriate {@link AppContext}. Hooks in AppContext
-     * check if the current {@link SecurityManager} is an instance of
-     * AWTSecurityManager and if so, call this method to give it a chance to
-     * return the appropriate appContext based on the application that is
-     * running.
-     * <p>
-     * This can be called from any thread (possibly a swing thread) to find out
-     * the AppContext for the thread (which may correspond to a particular
-     * applet).
-     * </p>
-     */
-    @Override
-    public AppContext getAppContext() {
-        ApplicationInstance app = getApplication();
-        if (app == null) {
-            /*
-             * if we cannot find an application based on the code on the stack,
-             * then assume it is the main application
-             */
-            return mainAppContext;
-        } else {
-            return app.getAppContext();
-        }
-
-    }
-
-    /**
      * Tests if a client can get access to the AWT event queue. This version allows
      * complete access to the EventQueue for its own AppContext-specific EventQueue.
      *