equal
deleted
inserted
replaced
117 * setting the default authenticator. |
117 * setting the default authenticator. |
118 * |
118 * |
119 * @see SecurityManager#checkPermission |
119 * @see SecurityManager#checkPermission |
120 * @see java.net.NetPermission |
120 * @see java.net.NetPermission |
121 */ |
121 */ |
122 public synchronized static void setDefault(Authenticator a) { |
122 public static synchronized void setDefault(Authenticator a) { |
123 SecurityManager sm = System.getSecurityManager(); |
123 SecurityManager sm = System.getSecurityManager(); |
124 if (sm != null) { |
124 if (sm != null) { |
125 NetPermission setDefaultPermission |
125 NetPermission setDefaultPermission |
126 = new NetPermission("setDefaultAuthenticator"); |
126 = new NetPermission("setDefaultAuthenticator"); |
127 sm.checkPermission(setDefaultPermission); |
127 sm.checkPermission(setDefaultPermission); |