src/share/classes/com/sun/jndi/toolkit/dir/ContainmentFilter.java
Print this page
@@ -54,23 +54,23 @@
public static boolean contains(Attributes superset, Attributes subset)
throws NamingException {
if (subset == null)
return true; // an empty set is always a subset
- NamingEnumeration m = subset.getAll();
+ NamingEnumeration<? extends Attribute> m = subset.getAll();
while (m.hasMore()) {
if (superset == null) {
return false; // contains nothing
}
- Attribute target = (Attribute) m.next();
+ Attribute target = m.next();
Attribute fromSuper = superset.get(target.getID());
if (fromSuper == null) {
return false;
} else {
// check whether attribute values match
if (target.size() > 0) {
- NamingEnumeration vals = target.getAll();
+ NamingEnumeration<?> vals = target.getAll();
while (vals.hasMore()) {
if (!fromSuper.contains(vals.next())) {
return false;
}
}