return null;
}
+ @SuppressWarnings("unchecked")
protected void changePassword(char[] oldPassword, char[] newPassword) {
Subject subject = Subject.getSubject(AccessController.getContext());
String name = subject.getPrincipals(X500Principal.class).iterator()
try {
userTransaction.begin();
User user = (User) userAdmin.getRole(dn.toString());
- if (user.hasCredential(null, oldPassword)) {
+ if (user.hasCredential(null, oldPassword))
user.getCredentials().put(null, newPassword);
- }
userTransaction.commit();
} catch (Exception e) {
try {