/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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 General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* VersionHelper was used by JNDI to accommodate differences between
* JDK 1.1.x and the Java 2 platform. As this is no longer necessary
* since JNDI's inclusion in the platform, this class currently
* serves as a set of utilities for performing system-level things,
* such as class-loading and reading system properties.
*
* @author Rosanna Lee
* @author Scott Seligman
*/
private boolean getSystemPropsFailed = false;
}
/**
* Package private.
*/
throws ClassNotFoundException {
}
/**
* @param className A non-null fully qualified class name.
* @param codebase A non-null, space-separated list of URL strings.
*/
throws ClassNotFoundException, MalformedURLException {
}
new PrivilegedAction() {
try {
} catch (SecurityException e) {
return null;
}
}
}
);
}
if (getSystemPropsFailed) {
return null; // after one failure, don't bother trying again
}
new PrivilegedAction() {
try {
return System.getProperties();
} catch (SecurityException e) {
getSystemPropsFailed = true;
return null;
}
}
}
);
return null;
}
}
return jProps;
}
new PrivilegedAction() {
return c.getResourceAsStream(name);
}
}
);
}
new PrivilegedAction() {
try {
return null;
}
} catch (Exception e) {
return null;
}
}
}
);
}
throws IOException
{
try {
new PrivilegedExceptionAction() {
}
}
);
} catch (PrivilegedActionException e) {
throw (IOException)e.getException();
}
return new InputStreamEnumeration(urls);
}
new PrivilegedAction() {
}
}
);
}
/**
* Given an enumeration of URLs, an instance of this class represents
* an enumeration of their InputStreams. Each operation on the URL
* enumeration is performed within a doPrivileged block.
* This is used to enumerate the resources under a foreign codebase.
* This class is not MT-safe.
*/
}
/*
* Returns the next InputStream, or null if there are no more.
* An InputStream that cannot be opened is skipped.
*/
return AccessController.doPrivileged(
new PrivilegedAction() {
while (urls.hasMoreElements()) {
try {
} catch (IOException e) {
// skip this URL
}
}
return null;
}
}
);
}
public boolean hasMore() {
if (nextElement != null) {
return true;
}
return (nextElement != null);
}
public boolean hasMoreElements() {
return hasMore();
}
if (hasMore()) {
nextElement = null;
return res;
} else {
throw new NoSuchElementException();
}
}
return next();
}
public void close() {
}
}
}