--- old/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java 2011-07-27 17:24:31.850900200 -0700 +++ new/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java 2011-07-27 17:24:31.199835100 -0700 @@ -203,11 +203,11 @@ * A class for dealing with compound filters ("and" & "or" filters). */ final class CompoundFilter implements StringFilter { - private Vector subFilters; + private Vector subFilters; private boolean polarity; CompoundFilter(boolean polarity) { - subFilters = new Vector(); + subFilters = new Vector<>(); this.polarity = polarity; } @@ -223,7 +223,7 @@ public boolean check(Attributes targetAttrs) throws NamingException { for(int i = 0; i candidates; try { Attribute attr = targetAttrs.get(attrID); @@ -441,13 +441,14 @@ String answer; answer = "(& "; Attribute attr; - for (NamingEnumeration e = attrs.getAll(); e.hasMore(); ) { - attr = (Attribute)e.next(); + for (NamingEnumeration e = attrs.getAll(); + e.hasMore(); ) { + attr = e.next(); if (attr.size() == 0 || (attr.size() == 1 && attr.get() == null)) { // only checking presence of attribute answer += "(" + attr.getID() + "=" + "*)"; } else { - for (NamingEnumeration ve = attr.getAll(); + for (NamingEnumeration ve = attr.getAll(); ve.hasMore(); ) { String val = getEncodedStringRep(ve.next());