From: Jeroen Frijters Date: Tue, 26 Apr 2005 07:11:10 +0000 (+0000) Subject: 2005-04-26 Jeroen Frijters X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f3a3283f29f4c0286f485f3f21fd424884c527e;p=platform%2Fupstream%2Fgcc.git 2005-04-26 Jeroen Frijters * 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 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index ec44dd3..ddabdc9 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,15 @@ 2005-04-26 Jeroen Frijters + * 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 + * java/security/Security.java, java/security/cert/X509CRLSelector.java, java/security/cert/X509CertSelector.java: diff --git a/libjava/gnu/java/security/action/GetSecurityPropertyAction.java b/libjava/gnu/java/security/action/GetSecurityPropertyAction.java index 01aab81..b61e9c8 100644 --- a/libjava/gnu/java/security/action/GetSecurityPropertyAction.java +++ b/libjava/gnu/java/security/action/GetSecurityPropertyAction.java @@ -50,25 +50,42 @@ import java.security.Security; * String passwd = AccessController.doPrivileged(action); * */ -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;