diff options
| author | Fraser Tweedale <ftweedal@redhat.com> | 2016-12-06 19:39:14 +1000 |
|---|---|---|
| committer | Fraser Tweedale <ftweedal@redhat.com> | 2016-12-07 14:42:26 +1000 |
| commit | ebd755bac7474acc4389a5454dcf6689f219354b (patch) | |
| tree | 1d7ef30978dd66d45fde78f6fd4100e626779d73 /base/server/cms/src/com | |
| parent | 01956aedf62f20713ca191c254a20f0b50d8e7af (diff) | |
Replace duplicate string literals with a constant
Just a small drive-by refactor.
Part of: https://fedorahosted.org/pki/ticket/1359
Diffstat (limited to 'base/server/cms/src/com')
| -rw-r--r-- | base/server/cms/src/com/netscape/cms/profile/constraint/EnrollConstraint.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/base/server/cms/src/com/netscape/cms/profile/constraint/EnrollConstraint.java b/base/server/cms/src/com/netscape/cms/profile/constraint/EnrollConstraint.java index 96b29d669..8f385ea6f 100644 --- a/base/server/cms/src/com/netscape/cms/profile/constraint/EnrollConstraint.java +++ b/base/server/cms/src/com/netscape/cms/profile/constraint/EnrollConstraint.java @@ -45,6 +45,7 @@ import com.netscape.cms.profile.common.EnrollProfile; */ public abstract class EnrollConstraint implements IPolicyConstraint { public static final String CONFIG_NAME = "name"; + public static final String CONFIG_PARAMS = "params"; protected IConfigStore mConfig = null; protected Vector<String> mConfigNames = new Vector<String>(); @@ -80,10 +81,10 @@ public abstract class EnrollConstraint implements IPolicyConstraint { public void setConfig(String name, String value) throws EPropertyException { - if (mConfig.getSubStore("params") == null) { + if (mConfig.getSubStore(CONFIG_PARAMS) == null) { // } else { - mConfig.getSubStore("params").putString(name, value); + mConfig.getSubStore(CONFIG_PARAMS).putString(name, value); } } @@ -105,7 +106,7 @@ public abstract class EnrollConstraint implements IPolicyConstraint { return null; } - IConfigStore params = mConfig.getSubStore("params"); + IConfigStore params = mConfig.getSubStore(CONFIG_PARAMS); if (params == null) { CMS.debug("Error: Missing constraint parameters"); return null; |
