diff options
Diffstat (limited to 'source/com/c2kernel/lookup/LDAPPropertyManager.java')
| -rw-r--r-- | source/com/c2kernel/lookup/LDAPPropertyManager.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/com/c2kernel/lookup/LDAPPropertyManager.java b/source/com/c2kernel/lookup/LDAPPropertyManager.java index a1fd6af..57ed17d 100644 --- a/source/com/c2kernel/lookup/LDAPPropertyManager.java +++ b/source/com/c2kernel/lookup/LDAPPropertyManager.java @@ -49,13 +49,13 @@ public class LDAPPropertyManager { LDAPEntry entityEntry = LDAPLookupUtils.getEntry(ldap.getConnection(), thisEntity.getFullDN());
ArrayList<String> propbag = new ArrayList<String>();
LDAPAttribute props = entityEntry.getAttribute("cristalprop");
- for (Enumeration e = props.getStringValues(); e.hasMoreElements();) {
+ for (Enumeration<?> e = props.getStringValues(); e.hasMoreElements();) {
String thisProp = (String)e.nextElement();
propbag.add(thisProp.substring(0, thisProp.indexOf(':')));
}
-
+
String[] retArr = new String[props.size()];
- return (String[])propbag.toArray(retArr);
+ return propbag.toArray(retArr);
}
/**
@@ -101,13 +101,13 @@ public class LDAPPropertyManager { LDAPLookupUtils.addAttributeValue(ldap.getConnection(), entityEntry, "cristalprop", prop.getName()+":"+prop.getValue());
}
- private String getPropertyAttr(LDAPEntry myEntry, String propName) throws ObjectNotFoundException {
+ private static String getPropertyAttr(LDAPEntry myEntry, String propName) throws ObjectNotFoundException {
// delete existing props
LDAPAttribute props = myEntry.getAttribute("cristalprop");
if (props == null)
throw new ObjectNotFoundException("Property "+propName+" does not exist", "");
String propPrefix = propName+":";
- for (Enumeration e = props.getStringValues(); e.hasMoreElements();) {
+ for (Enumeration<?> e = props.getStringValues(); e.hasMoreElements();) {
String val = (String)e.nextElement();
if (val.toLowerCase().startsWith(propPrefix.toLowerCase()))
return val.substring(propPrefix.length());
|
