< prev index next >

src/com/sun/javatest/JavaTestSecurityManager.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg


 137         if (allowPropertiesAccess == false) {
 138             if (verbose) {
 139                 System.err.println(getClass().getName() + ": properties access forbidden");
 140                 new Throwable().printStackTrace();
 141             }
 142             throw new SecurityException("Action forbidden by JT Harness: checkPropertiesAccess");
 143         }
 144     }
 145 
 146     public void checkPropertyAccess(String key) { }
 147     public void checkRead(FileDescriptor fd) { }
 148     public void checkRead(String file) { }
 149     public void checkRead(String file, Object context) { }
 150     public void checkSetFactory() { }
 151     public boolean checkTopLevelWindow(Object window) { return true; }
 152     public void checkWrite(FileDescriptor fd) { }
 153     public void checkWrite(String file) { }
 154 
 155     // These methods are added for forward-compatibility with JDK1.1
 156     public void checkAwtEventQueueAccess() { }
 157     public void checkMemberAccess(Class clazz, int which) { }
 158     public void checkMulticast(InetAddress maddr) { }
 159     public void checkMulticast(InetAddress maddr, byte ttl) { }
 160     public void checkPrintJobAccess() { }
 161     public void checkSecurityAccess(String provider) { }
 162     public void checkSystemClipboardAccess() { }
 163 
 164     /**
 165      * Set whether or not the JVM may be exited. The default value is "false".
 166      * @param bool true if the JVM may be exited, and false otherwise
 167      * @return the previous value of this setting
 168      */
 169     public boolean setAllowExit(boolean bool) {
 170         boolean prev = allowExit;
 171         allowExit = bool;
 172         return prev;
 173     }
 174 
 175     /**
 176      * Set whether or not the set of system properties may be accessed.
 177      * The default value is determined by the system property




 137         if (allowPropertiesAccess == false) {
 138             if (verbose) {
 139                 System.err.println(getClass().getName() + ": properties access forbidden");
 140                 new Throwable().printStackTrace();
 141             }
 142             throw new SecurityException("Action forbidden by JT Harness: checkPropertiesAccess");
 143         }
 144     }
 145 
 146     public void checkPropertyAccess(String key) { }
 147     public void checkRead(FileDescriptor fd) { }
 148     public void checkRead(String file) { }
 149     public void checkRead(String file, Object context) { }
 150     public void checkSetFactory() { }
 151     public boolean checkTopLevelWindow(Object window) { return true; }
 152     public void checkWrite(FileDescriptor fd) { }
 153     public void checkWrite(String file) { }
 154 
 155     // These methods are added for forward-compatibility with JDK1.1
 156     public void checkAwtEventQueueAccess() { }
 157     public void checkMemberAccess(Class<?> clazz, int which) { }
 158     public void checkMulticast(InetAddress maddr) { }
 159     public void checkMulticast(InetAddress maddr, byte ttl) { }
 160     public void checkPrintJobAccess() { }
 161     public void checkSecurityAccess(String provider) { }
 162     public void checkSystemClipboardAccess() { }
 163 
 164     /**
 165      * Set whether or not the JVM may be exited. The default value is "false".
 166      * @param bool true if the JVM may be exited, and false otherwise
 167      * @return the previous value of this setting
 168      */
 169     public boolean setAllowExit(boolean bool) {
 170         boolean prev = allowExit;
 171         allowExit = bool;
 172         return prev;
 173     }
 174 
 175     /**
 176      * Set whether or not the set of system properties may be accessed.
 177      * The default value is determined by the system property


< prev index next >