Commit 6f3a3283 by Jeroen Frijters Committed by Michael Koch

2005-04-26 Jeroen Frijters <jeroen@frijters.net>

	* gnu/java/security/action/GetSecurityPropertyAction.java
	(GetSecurityPropertyAction): Implement PrivilegedAction instead
	of extending GetPropertyAction.
	(name): New field.
	(value): Likewise.
	(setParamters): New methods.
	(GetSecurityPropertyAction): Use new setParameters methods.

From-SVN: r98765
parent a79f940a
2005-04-26 Jeroen Frijters <jeroen@frijters.net>
* gnu/java/security/action/GetSecurityPropertyAction.java
(GetSecurityPropertyAction): Implement PrivilegedAction instead
of extending GetPropertyAction.
(name): New field.
(value): Likewise.
(setParamters): New methods.
(GetSecurityPropertyAction): Use new setParameters methods.
2005-04-26 Jeroen Frijters <jeroen@frijters.net>
* java/security/Security.java,
java/security/cert/X509CRLSelector.java,
java/security/cert/X509CertSelector.java:
......
......@@ -50,25 +50,42 @@ import java.security.Security;
* String passwd = AccessController.doPrivileged(action);
* </code>
*/
public class GetSecurityPropertyAction extends GetPropertyAction
public class GetSecurityPropertyAction implements PrivilegedAction
{
private String name;
private String value;
public GetSecurityPropertyAction()
{
}
public GetSecurityPropertyAction (String propName)
public GetSecurityPropertyAction(String propName)
{
super (propName);
setParameters(propName);
}
public GetSecurityPropertyAction(String propName, String defaultValue)
{
super (propName, defaultValue);
setParameters(propName, defaultValue);
}
public GetSecurityPropertyAction setParameters(String propName)
{
this.name = propName;
this.value = null;
return this;
}
public GetSecurityPropertyAction setParameters(String propName, String defaultValue)
{
this.name = propName;
this.value = defaultValue;
return this;
}
public Object run()
{
String val = Security.getProperty (name);
String val = Security.getProperty(name);
if (val == null)
val = value;
return val;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment