Help determing NamingEnumeration type/cast
It appears I've got a cast problem. Everything was fine using Eclipse Europa, but now Eclipse Ganymede is throwing out warnings for casts. The following is a snapshot of the problem code.
List<String> appAttrs = new ArrayList<String>();
Hashtable<String, String> env = new Hashtable<String, String>();
DirContext dirContext = new InitialDirContext(env);
Attributes attrs = dirContext.getAttributes(rdn);
NamingEnumeration Values = attrs.get(appAttr).getAll();
The above NamingEnumeration is giving the following warning:
NamingEnumeration is a raw type. References to generic type NamingEnumeration<T> should be parameterized CASAuthN.java CASLDAPAuthN/src/com/authn line 117 Java Problem
It wants a cast but I can't figure out which it wants. I've got this in another spot:
NamingEnumeration<SearchResult> results = dirContext.search(baseDN,andFilter.encode(),search Controls);
that works there. But for NamingEnumeration Values SearchResult won't work as the cast, this indirectly references dirContext for Attributes attrs, and I can't cast Attributes so I need to figure out what the correct cast is for NamingEnumeration Values in this case.
This is the type/cast I think it needs, well at least what the yellow info thingy on the left is telling me: NamingEnumeration<capture#1-of ?> at least that's what the warning is telling me the problem is, but I don't know the correct match.