diff options
author | Fraser Tweedale <frase@frase.id.au> | 2015-04-13 00:29:09 -0400 |
---|---|---|
committer | Fraser Tweedale <frase@frase.id.au> | 2015-04-13 20:07:17 -0400 |
commit | d83f6889018870150b9ef0b102c4f4af24bbb95f (patch) | |
tree | e8eb6805c44f33c9e64a12045c58570daf608605 | |
parent | 18b24a990ff9b97cf58aa630af0084975fe4c130 (diff) | |
download | pki-d83f6889018870150b9ef0b102c4f4af24bbb95f.tar.gz pki-d83f6889018870150b9ef0b102c4f4af24bbb95f.tar.xz pki-d83f6889018870150b9ef0b102c4f4af24bbb95f.zip |
Remove unneeded collection from profile subsystems
Caveat: This changes the order in which profiles are listed, but the
previous order doesn't seem very logical and there doesn't appear to
be any contract for a particular order.
3 files changed, 1 insertions, 11 deletions
diff --git a/base/server/cmscore/src/com/netscape/cmscore/profile/AbstractProfileSubsystem.java b/base/server/cmscore/src/com/netscape/cmscore/profile/AbstractProfileSubsystem.java index b7cd503a1..642f60232 100644 --- a/base/server/cmscore/src/com/netscape/cmscore/profile/AbstractProfileSubsystem.java +++ b/base/server/cmscore/src/com/netscape/cmscore/profile/AbstractProfileSubsystem.java @@ -36,7 +36,6 @@ public abstract class AbstractProfileSubsystem implements IProfileSubsystem { protected IConfigStore mConfig = null; @SuppressWarnings("unused") protected ISubsystem mOwner; - protected Vector<String> mProfileIds; protected Hashtable<String, IProfile> mProfiles; protected Hashtable<String, String> mProfileClassIds; @@ -133,7 +132,7 @@ public abstract class AbstractProfileSubsystem implements IProfileSubsystem { * list is of type String. */ public Enumeration<String> getProfileIds() { - return mProfileIds.elements(); + return mProfiles.keys(); } /** diff --git a/base/server/cmscore/src/com/netscape/cmscore/profile/LDAPProfileSubsystem.java b/base/server/cmscore/src/com/netscape/cmscore/profile/LDAPProfileSubsystem.java index 92aa827b1..c7963498d 100644 --- a/base/server/cmscore/src/com/netscape/cmscore/profile/LDAPProfileSubsystem.java +++ b/base/server/cmscore/src/com/netscape/cmscore/profile/LDAPProfileSubsystem.java @@ -73,7 +73,6 @@ public class LDAPProfileSubsystem CMS.debug("LDAPProfileSubsystem: start init"); // (re)init member collections - mProfileIds = new Vector<String>(); mProfiles = new Hashtable<String, IProfile>(); mProfileClassIds = new Hashtable<String, String>(); @@ -163,8 +162,6 @@ public class LDAPProfileSubsystem IProfile profile = (IProfile) Class.forName(className).newInstance(); profile.setId(id); profile.init(this, subStoreConfig); - if (!mProfiles.containsKey(id)) - mProfileIds.addElement(id); mProfiles.put(id, profile); mProfileClassIds.put(id, classid); return profile; @@ -216,7 +213,6 @@ public class LDAPProfileSubsystem * notification that a profile was deleted. */ private void forgetProfile(String id) { - mProfileIds.removeElement(id); mProfiles.remove(id); mProfileClassIds.remove(id); } @@ -250,7 +246,6 @@ public class LDAPProfileSubsystem } private void forgetAllProfiles() { - mProfileIds.clear(); mProfiles.clear(); mProfileClassIds.clear(); } diff --git a/base/server/cmscore/src/com/netscape/cmscore/profile/ProfileSubsystem.java b/base/server/cmscore/src/com/netscape/cmscore/profile/ProfileSubsystem.java index 9a7292f2c..b2b4b30f2 100644 --- a/base/server/cmscore/src/com/netscape/cmscore/profile/ProfileSubsystem.java +++ b/base/server/cmscore/src/com/netscape/cmscore/profile/ProfileSubsystem.java @@ -55,7 +55,6 @@ public class ProfileSubsystem IPluginRegistry registry = (IPluginRegistry) CMS.getSubsystem(CMS.SUBSYSTEM_REGISTRY); - mProfileIds = new Vector<String>(); mProfiles = new Hashtable<String, IProfile>(); mProfileClassIds = new Hashtable<String, String>(); @@ -126,7 +125,6 @@ public class ProfileSubsystem CMS.debug("ProfileSubsystem: initing " + className); profile.setId(id); profile.init(this, subStoreConfig); - mProfileIds.addElement(id); mProfiles.put(id, profile); mProfileClassIds.put(id, classid); if (isNew) @@ -179,7 +177,6 @@ public class ProfileSubsystem if (!file1.delete()) { CMS.debug("ProfileSubsystem: deleteProfile: Cannot delete the configuration file : " + configPath); } - mProfileIds.removeElement(id); mProfiles.remove(id); mProfileClassIds.remove(id); try { @@ -226,7 +223,6 @@ public class ProfileSubsystem * <P> */ public void shutdown() { - mProfileIds.clear(); mProfiles.clear(); mProfileClassIds.clear(); } |