[Pki-devel] [PATCH] 0147 Replace duplicate string literals with a constant
Fraser Tweedale
ftweedal at redhat.com
Wed Dec 7 04:44:07 UTC 2016
Does what it says on the tin.
Pushed under trivial rule.
Thanks,
Fraser
-------------- next part --------------
From ebd755bac7474acc4389a5454dcf6689f219354b Mon Sep 17 00:00:00 2001
From: Fraser Tweedale <ftweedal at redhat.com>
Date: Tue, 6 Dec 2016 19:39:14 +1000
Subject: [PATCH] Replace duplicate string literals with a constant
Just a small drive-by refactor.
Part of: https://fedorahosted.org/pki/ticket/1359
---
.../src/com/netscape/cms/profile/constraint/EnrollConstraint.java | 7 ++++---
1 file 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 96b29d669992f36b4b849eac68b2af8695c46ce8..8f385ea6fc9cae331c8c1e2b8f95aab123e6b836 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;
--
2.7.4
More information about the Pki-devel
mailing list