Whoops, the code is actually as follows...

No sure what's going on with this code...  I'm attempting to extend JNDIRealm so I can 
add a few features I need for my site, I have an interesting issue, however.

If, I try this :

    public Principal authenticate(DirContext context, String username, String 
credentials) throws NamingException {
                Principal authPrincipal = null;
                System.out.println(username);
                authPrincipal = super.authenticate(username, credentials);
                return authPrincipal;
        }

username gets printed, and the system works properly

However, if I try something akin to this

    public Principal authenticate(DirContext context, String username, String 
credentials) throws NamingException {
                Principal authPrincipal = null;
                System.out.println(username.length());
                authPrincipal = super.authenticate(username, credentials);
                return authPrincipal;
        }

It crashes with a null pointer exception.

Eh?


Justin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to