diff options
author | Jiri Vanek <[email protected]> | 2013-06-20 17:00:52 +0200 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2013-06-20 17:00:52 +0200 |
commit | 70371886c351800a6fad9bad17777179af2d8584 (patch) | |
tree | 5fa59db9ff4e9172838dad7112c63bb62080e452 | |
parent | 1829a343309c767b0a07fd918e19a04f481a18f9 (diff) |
Removed out-of date Boot13 class
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | netx/net/sourceforge/jnlp/runtime/Boot.java | 3 | ||||
-rw-r--r-- | netx/net/sourceforge/jnlp/runtime/Boot13.java | 98 |
4 files changed, 7 insertions, 101 deletions
@@ -1,5 +1,11 @@ 2013-06-20 Jiri Vanek <[email protected]> + Removed out-of date support for jdk 1.5 and older + * netx/net/sourceforge/jnlp/runtime/Boot.java: removed memories to Boot13 + * netx/net/sourceforge/jnlp/runtime/Boot13.java: removed + +2013-06-20 Jiri Vanek <[email protected]> + Made it work with OpenJDK build 25 * netx/net/sourceforge/jnlp/runtime/Boot.java: (main) Application context created as soon as possible @@ -9,6 +9,7 @@ GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY New in release 1.5 (2013-XX-XX): +* JDK older then 1.5 no longer supported * NetX - PR1465 - java.io.FileNotFoundException while trying to download a JAR file * Plugin diff --git a/netx/net/sourceforge/jnlp/runtime/Boot.java b/netx/net/sourceforge/jnlp/runtime/Boot.java index f6d76d0..9b69660 100644 --- a/netx/net/sourceforge/jnlp/runtime/Boot.java +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java @@ -171,9 +171,6 @@ public final class Boot implements PrivilegedAction<Void> { JNLPRuntime.setInitialArgments(Arrays.asList(argsIn)); - // do in a privileged action to clear the security context of - // the Boot13 class, which doesn't have any privileges in - // JRE1.3; JRE1.4 works without Boot13 or this PrivilegedAction. AccessController.doPrivileged(new Boot()); } diff --git a/netx/net/sourceforge/jnlp/runtime/Boot13.java b/netx/net/sourceforge/jnlp/runtime/Boot13.java deleted file mode 100644 index f33e7ae..0000000 --- a/netx/net/sourceforge/jnlp/runtime/Boot13.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2001-2003 Jon A. Maxwell (JAM) -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -package net.sourceforge.jnlp.runtime; - -import java.lang.reflect.*; -import java.net.*; -import java.security.*; - -/** - * Allows a Policy and SecurityManager to be set in JRE1.3 without - * running the code with only applet permissions; this class is - * for backward compatibility only and is totally unnecessary if - * running in jdk 1.4 or later (can call Boot directly). - * - * @author <a href="mailto:[email protected]">Jon A. Maxwell (JAM)</a> - initial author - * @version $Revision: 1.5 $ - */ -public class Boot13 extends URLClassLoader { - - // The problem with setting a Policy in jdk1.3 is that the - // system and application classes seem to be loaded in such a - // way that only their protection domain determines the - // permissions; the policy object is never asked for permissions - // after the class is loaded. This hack creates a classloader - // that loads duplicate versions of the classes in such a - // manner where they ask with the policy object. The jdk1.4 - // correctly honors the Policy object making this unneccessary - // post-1.3. - - private Boot13(URL source[]) { - super(source); - } - - protected PermissionCollection getPermissions(CodeSource source) { - Permissions result = new Permissions(); - result.add(new AllPermission()); - - return result; - } - - public Class loadClass(String name) throws ClassNotFoundException { - Class c = findLoadedClass(name); - if (c != null) - return c; - - // reverse the search order so that classes from this - // classloader, which sets the right permissions, are found - // before the parent classloader which has the same classes - // but the wrong permissions. - try { - return findClass(name); - } catch (ClassNotFoundException ex) { - } - - return getParent().loadClass(name); - } - - public static void main(final String args[]) throws Exception { - URL cs = Boot13.class.getProtectionDomain().getCodeSource().getLocation(); - // instead of using a custom loadClass search order, we could - // put the classes in a boot/ subdir of the JAR and load - // them from there. This would be an improvement by not - // allowing applications to get a duplicate jnlp engine (one - // with applet access permissions) by using the system - // classloader but a drawback by not allowing Boot to be - // called directly. - //cs = new URL("jar:"+cs+"!/boot/"); - - if (cs == null) { - System.err.println("fatal: cannot determine code source."); - System.exit(1); - } - - Boot13 b = new Boot13(new URL[] { cs }); - - Thread.currentThread().setContextClassLoader(b); // try to prevent getting the non-policy version of classes - - Class<?> c = b.loadClass("net.sourceforge.jnlp.runtime.Boot"); - Method main = c.getDeclaredMethod("main", new Class<?>[] { String[].class }); - - main.invoke(null, new Object[] { args }); - } - -} |