diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-04-05 15:08:18 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-04-09 10:22:03 -0500 |
commit | 3f24e55923fc986af4c6a08b2b8d45704a905627 (patch) | |
tree | 716415853b5676b801f6707634305b59b9af8603 /base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java | |
parent | 7c7b9d023cd466c1771068badc020dab36beb553 (diff) | |
download | pki-3f24e55923fc986af4c6a08b2b8d45704a905627.tar.gz pki-3f24e55923fc986af4c6a08b2b8d45704a905627.tar.xz pki-3f24e55923fc986af4c6a08b2b8d45704a905627.zip |
Removed unnecessary type casts.
Unnecessary type casts have been removed using Eclipse Quick Fix.
Ticket #134
Diffstat (limited to 'base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java')
-rw-r--r-- | base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java b/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java index 2c5caf2bd..4be580cbc 100644 --- a/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java +++ b/base/common/src/com/netscape/cmscore/ldap/LdapSimpleExpression.java @@ -122,9 +122,9 @@ public class LdapSimpleExpression implements ILdapExpression { try { // Try exact case first. - givenVal = (String) sc.get(mVar); + givenVal = sc.get(mVar); } catch (Exception e) { - givenVal = (String) null; + givenVal = null; } // It is kind of a problem here if all letters are in @@ -132,17 +132,17 @@ public class LdapSimpleExpression implements ILdapExpression { // of directory attributes. if (givenVal == null) { try { - givenVal = (String) sc.get(mVar.toLowerCase()); + givenVal = sc.get(mVar.toLowerCase()); } catch (Exception e) { - givenVal = (String) null; + givenVal = null; } } if (givenVal == null) { try { - givenVal = (String) sc.get(mVar.toUpperCase()); + givenVal = sc.get(mVar.toUpperCase()); } catch (Exception e) { - givenVal = (String) null; + givenVal = null; } } @@ -170,7 +170,7 @@ public class LdapSimpleExpression implements ILdapExpression { private boolean matchVector(Vector<Object> value) throws ELdapException { boolean result = false; - Enumeration<Object> e = (Enumeration<Object>) value.elements(); + Enumeration<Object> e = value.elements(); for (; e.hasMoreElements();) { result = matchValue(e.nextElement()); |