summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java')
-rw-r--r--pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java28
1 files changed, 13 insertions, 15 deletions
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java
index 670728e59..104b29a08 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/SubjectInfoAccessExtDefault.java
@@ -231,19 +231,17 @@ public class SubjectInfoAccessExtDefault extends EnrollExtDefault {
for (int i = 0; i < size; i++) {
NameValuePairs nvps = v.elementAt(i);
- Enumeration<String> names = nvps.getNames();
- while (names.hasMoreElements()) {
- String name1 = names.nextElement();
+ for (String name1 : nvps.keySet()) {
if (name1.equals(AD_METHOD)) {
- method = nvps.getValue(name1);
+ method = nvps.get(name1);
} else if (name1.equals(AD_LOCATION_TYPE)) {
- locationType = nvps.getValue(name1);
+ locationType = nvps.get(name1);
} else if (name1.equals(AD_LOCATION)) {
- location = nvps.getValue(name1);
+ location = nvps.get(name1);
} else if (name1.equals(AD_ENABLE)) {
- enable = nvps.getValue(name1);
+ enable = nvps.get(name1);
}
}
@@ -347,18 +345,18 @@ public class SubjectInfoAccessExtDefault extends EnrollExtDefault {
des = ext.getAccessDescription(i);
}
if (des == null) {
- np.add(AD_METHOD, "");
- np.add(AD_LOCATION_TYPE, "");
- np.add(AD_LOCATION, "");
- np.add(AD_ENABLE, "false");
+ np.put(AD_METHOD, "");
+ np.put(AD_LOCATION_TYPE, "");
+ np.put(AD_LOCATION, "");
+ np.put(AD_ENABLE, "false");
} else {
ObjectIdentifier methodOid = des.getMethod();
GeneralName gn = des.getLocation();
- np.add(AD_METHOD, methodOid.toString());
- np.add(AD_LOCATION_TYPE, getGeneralNameType(gn));
- np.add(AD_LOCATION, getGeneralNameValue(gn));
- np.add(AD_ENABLE, "true");
+ np.put(AD_METHOD, methodOid.toString());
+ np.put(AD_LOCATION_TYPE, getGeneralNameType(gn));
+ np.put(AD_LOCATION, getGeneralNameValue(gn));
+ np.put(AD_ENABLE, "true");
}
recs.addElement(np);
}