home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 3.4 KB | 128 lines |
- /*---------------------------------------------------------------------------
-
- Written by the Personal Journal developers of Dow Jones & Company, Inc.
-
- Dow Jones makes no representations or warranties about
- the suitability of this software, either express or
- implied, including but not limited to the implied warranties
- of merchantability, fitness for a particular purpose,
- or non-infringement. Dow Jones will not be liable for
- any damages suffered by a user as a result of using,
- modifying or distributing this software or its derivatives.
-
-
- @(#)EmptySecurityManager.java 0.00 19-Jan-96
-
- A workaround for a bug in the beta 2 JDK.
- Used primarily by RemoteImage in pj.net package.
-
- Authors:
-
- rphall Rick Hall
-
- Version Ident:
-
- $Header: /PjJavaClient/src/pj/lang/EmptySecurityManager.java 2 1/21/96 3:40p Rphall $
-
- History:
-
- 0.00 19-Jan-96 rphall Initial Creation
-
- ---------------------------------------------------------------------------*/
-
- package pj.lang;
-
-
- import java.io.FileDescriptor;
- import java.lang.SecurityManager;
-
- /**
- * A workaround for a bug in the beta 2 JDK.
- * Used primarily by RemoteImage in pj.net package.
- *
- * @see pj.net.RemoteImage
- * @version 0.00 19-Jan-96
- * @author rphall
- */
- public final class EmptySecurityManager extends SecurityManager
- {
-
- // --- Class variables
- private static Object theEmptySecurityManager = null;
-
- // --- Public operations
-
- public final void checkCreateClassLoader() {}
-
- public final void checkAccess(Thread g) {}
-
- public final void checkAccess(ThreadGroup g) {}
-
- public final void checkExit(int status) {}
-
- public final void checkExec(String cmd) {}
-
- public final void checkLink(String lib) {}
-
- public final void checkRead(FileDescriptor fd) {}
-
- public final void checkRead(String file) {}
-
- public final void checkRead(String file, Object context) {}
-
- public final void checkWrite(FileDescriptor fd) {}
-
- public final void checkWrite(String file) {}
-
- public final void checkDelete(String file) {}
-
- public final void checkConnect(String host, int port) {}
-
- public final void checkConnect(String host, int port, Object context) {}
-
- public final void checkListen(int port) {}
-
- public final void checkAccept(String host, int port) {}
-
- public final void checkPropertiesAccess() {}
-
- public final void checkPropertyAccess(String key) {}
-
- public final void checkPropertyAccess(String key, String def) {}
-
- public final boolean checkTopLevelWindow(Object window)
- {
- return true;
- }
-
- public final void checkPackageAccess(String pkg) {}
-
- public final void checkPackageDefinition(String pkg) {}
-
- public final void checkSetFactory() {}
-
-
-
- public final static void install()
- {
- if (theEmptySecurityManager == null)
- theEmptySecurityManager = new EmptySecurityManager();
-
- try {
- System.setSecurityManager((SecurityManager)theEmptySecurityManager);
- }
- catch (SecurityException e)
- {
- System.out.println("Caught SecurityException trying to set Security manager");
- }
-
- } // install
-
- // --- Private constructors
-
- private EmptySecurityManager() {}
-
-
-
- } // EmptySecurityManager
-