You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Ales Seifert <A....@mus.cz> on 2002/07/20 15:59:14 UTC

JNDIRealm

Hi,
I'm sorry if i'm posting it to the wrong list,

I found small problem in JNDIRealm and I suggest small change.

in method     protected List getRoles(DirContext context,
                             String username, String dn)

is line

		String role = (String) attr.get();

which is throwing ClassCastException, bacause not every attribute can
be converted to String.

So my suggestion is to use this way:

		String role = attr.get().toString();

which should never thrown ClassCastException bacause every objects are 
subclass of the Object class.

Can somebody make this change into source for next release?

Thanks

Alesak



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>