src/share/jaxws_classes/com/sun/istack/internal/tools/SecureLoader.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 70,79 ****
--- 70,92 ----
}
});
}
}
+ static ClassLoader getParentClassLoader(final ClassLoader cl) {
+ if (System.getSecurityManager() == null) {
+ return cl.getParent();
+ } else {
+ return (ClassLoader) java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction() {
+ public java.lang.Object run() {
+ return cl.getParent();
+ }
+ });
+ }
+ }
+
static void setContextClassLoader(final ClassLoader cl) {
if (System.getSecurityManager() == null) {
Thread.currentThread().setContextClassLoader(cl);
} else {
java.security.AccessController.doPrivileged(