Whilst handling passwords in Java, its my understanding that they should always be handled in char[]'s to allow GC and remove hanging references.
My question is would,
char[] password = String.valueOf(authentication.getCredentials()).toCharArray();
Could the value of authentication.getCredentials() to be interned or not?