src/share/classes/java/lang/SecurityManager.java

Print this page
rev 10048 : 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
Reviewed-by:

*** 214,224 **** * @see java.awt.AWTPermission * @see java.security.Policy Policy * @see java.security.SecurityPermission SecurityPermission * @see java.security.ProtectionDomain * ! * @since JDK1.0 */ public class SecurityManager { /** --- 214,224 ---- * @see java.awt.AWTPermission * @see java.security.Policy Policy * @see java.security.SecurityPermission SecurityPermission * @see java.security.ProtectionDomain * ! * @since 1.0 */ public class SecurityManager { /**
*** 1177,1187 **** * @param maddr Internet group address to be used. * @exception SecurityException if the calling thread is not allowed to * use (join/leave/send/receive) IP multicast. * @exception NullPointerException if the address argument is * <code>null</code>. ! * @since JDK1.1 * @see #checkPermission(java.security.Permission) checkPermission */ public void checkMulticast(InetAddress maddr) { String host = maddr.getHostAddress(); if (!host.startsWith("[") && host.indexOf(':') != -1) { --- 1177,1187 ---- * @param maddr Internet group address to be used. * @exception SecurityException if the calling thread is not allowed to * use (join/leave/send/receive) IP multicast. * @exception NullPointerException if the address argument is * <code>null</code>. ! * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission */ public void checkMulticast(InetAddress maddr) { String host = maddr.getHostAddress(); if (!host.startsWith("[") && host.indexOf(':') != -1) {
*** 1211,1221 **** * parameter. * @exception SecurityException if the calling thread is not allowed to * use (join/leave/send/receive) IP multicast. * @exception NullPointerException if the address argument is * <code>null</code>. ! * @since JDK1.1 * @deprecated Use #checkPermission(java.security.Permission) instead * @see #checkPermission(java.security.Permission) checkPermission */ @Deprecated public void checkMulticast(InetAddress maddr, byte ttl) { --- 1211,1221 ---- * parameter. * @exception SecurityException if the calling thread is not allowed to * use (join/leave/send/receive) IP multicast. * @exception NullPointerException if the address argument is * <code>null</code>. ! * @since 1.1 * @deprecated Use #checkPermission(java.security.Permission) instead * @see #checkPermission(java.security.Permission) checkPermission */ @Deprecated public void checkMulticast(InetAddress maddr, byte ttl) {
*** 1320,1341 **** * at the point the overridden method would normally throw an * exception. * * @exception SecurityException if the calling thread does not have * permission to initiate a print job request. ! * @since JDK1.1 * @see #checkPermission(java.security.Permission) checkPermission */ public void checkPrintJobAccess() { checkPermission(new RuntimePermission("queuePrintJob")); } /** * Throws {@code SecurityException} if the calling thread does * not have {@code AllPermission}. * ! * @since JDK1.1 * @exception SecurityException if the calling thread does not have * {@code AllPermission} * @deprecated This method was originally used to check if the calling * thread could access the system clipboard. The method has been * obsoleted and code should instead use {@link #checkPermission} --- 1320,1341 ---- * at the point the overridden method would normally throw an * exception. * * @exception SecurityException if the calling thread does not have * permission to initiate a print job request. ! * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission */ public void checkPrintJobAccess() { checkPermission(new RuntimePermission("queuePrintJob")); } /** * Throws {@code SecurityException} if the calling thread does * not have {@code AllPermission}. * ! * @since 1.1 * @exception SecurityException if the calling thread does not have * {@code AllPermission} * @deprecated This method was originally used to check if the calling * thread could access the system clipboard. The method has been * obsoleted and code should instead use {@link #checkPermission}
*** 1349,1359 **** /** * Throws {@code SecurityException} if the calling thread does * not have {@code AllPermission}. * ! * @since JDK1.1 * @exception SecurityException if the calling thread does not have * {@code AllPermission} * @deprecated This method was originally used to check if the calling * thread could access the AWT event queue. The method has been * obsoleted and code should instead use {@link #checkPermission} --- 1349,1359 ---- /** * Throws {@code SecurityException} if the calling thread does * not have {@code AllPermission}. * ! * @since 1.1 * @exception SecurityException if the calling thread does not have * {@code AllPermission} * @deprecated This method was originally used to check if the calling * thread could access the AWT event queue. The method has been * obsoleted and code should instead use {@link #checkPermission}
*** 1608,1618 **** * Users of this method should instead invoke {@link #checkPermission} * directly. This method will be changed in a future release * to check the permission {@code java.security.AllPermission}. * * @see java.lang.reflect.Member ! * @since JDK1.1 * @see #checkPermission(java.security.Permission) checkPermission */ @Deprecated @CallerSensitive public void checkMemberAccess(Class<?> clazz, int which) { --- 1608,1618 ---- * Users of this method should instead invoke {@link #checkPermission} * directly. This method will be changed in a future release * to check the permission {@code java.security.AllPermission}. * * @see java.lang.reflect.Member ! * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission */ @Deprecated @CallerSensitive public void checkMemberAccess(Class<?> clazz, int which) {
*** 1664,1674 **** * @exception SecurityException if the calling thread does not have * permission for the requested access. * @exception NullPointerException if <code>target</code> is null. * @exception IllegalArgumentException if <code>target</code> is empty. * ! * @since JDK1.1 * @see #checkPermission(java.security.Permission) checkPermission */ public void checkSecurityAccess(String target) { checkPermission(new SecurityPermission(target)); } --- 1664,1674 ---- * @exception SecurityException if the calling thread does not have * permission for the requested access. * @exception NullPointerException if <code>target</code> is null. * @exception IllegalArgumentException if <code>target</code> is empty. * ! * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission */ public void checkSecurityAccess(String target) { checkPermission(new SecurityPermission(target)); }
*** 1681,1691 **** * By default, it returns the thread group of the current * thread. This should be overridden by a specific security * manager to return the appropriate thread group. * * @return ThreadGroup that new threads are instantiated into ! * @since JDK1.1 * @see java.lang.ThreadGroup */ public ThreadGroup getThreadGroup() { return Thread.currentThread().getThreadGroup(); } --- 1681,1691 ---- * By default, it returns the thread group of the current * thread. This should be overridden by a specific security * manager to return the appropriate thread group. * * @return ThreadGroup that new threads are instantiated into ! * @since 1.1 * @see java.lang.ThreadGroup */ public ThreadGroup getThreadGroup() { return Thread.currentThread().getThreadGroup(); }