src/share/classes/com/sun/jndi/toolkit/dir/ContainmentFilter.java

Print this page

        

*** 54,76 **** 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(); while (m.hasMore()) { if (superset == null) { return false; // contains nothing } ! Attribute target = (Attribute) 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(); while (vals.hasMore()) { if (!fromSuper.contains(vals.next())) { return false; } } --- 54,76 ---- public static boolean contains(Attributes superset, Attributes subset) throws NamingException { if (subset == null) return true; // an empty set is always a subset ! NamingEnumeration<? extends Attribute> m = subset.getAll(); while (m.hasMore()) { if (superset == null) { return false; // contains nothing } ! 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(); while (vals.hasMore()) { if (!fromSuper.contains(vals.next())) { return false; } }