1/*2 * Copyright 2001-2004 The Apache Software Foundation.3 *4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 *8 * http://www.apache.org/licenses/LICENSE-2.09 *10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */16package org.apache.ws.scout.registry;
1718import java.security.AccessController;
19import java.security.PrivilegedAction;
2021/**22 * Security Privileged Actions23 *24 * @author <a href="mailto:anil@apache.org">Anil Saldhana</a> 25 */26classSecurityActions27 {
28static String getProperty(final String key, final String defaultValue)
29 {
30return AccessController.doPrivileged(new PrivilegedAction<String>()
31 {
32public String run() {
33return System.getProperty(key, defaultValue);
34 }
35 });
36 }
3738static String getProperty(final String key)
39 {
40return AccessController.doPrivileged(new PrivilegedAction<String>()
41 {
42public String run() {
43return System.getProperty(key);
44 }
45 });
46 }
4748 }