/**
* Checks if direct password the updatedUser's password
* <p>
- * @param clear-textPassword Clear-text (direct) password
+ * @param clearTextPassword Clear-text (direct) password
* @param updatedUser Updated user instance from database
* <p>
* @return Whether the password matches
*/
- public static boolean ifPasswordMatches (final String clear-textPassword, final User updatedUser) {
+ public static boolean ifPasswordMatches (final String clearTextPassword, final User updatedUser) {
// Validate parameters
- if (null == clear-textPassword) {
+ if (null == clearTextPassword) {
// Throw NPE
- throw new NullPointerException("clear-textPassword is null"); //NOI18N
- } else if (clear-textPassword.isEmpty()) {
+ throw new NullPointerException("clearTextPassword is null"); //NOI18N
+ } else if (clearTextPassword.isEmpty()) {
// NPE for user in container
- throw new NullPointerException("clear-textPassword is empty."); //NOI18N
+ throw new NullPointerException("clearTextPassword is empty."); //NOI18N
} else if (null == updatedUser) {
// And again NPE ...
throw new NullPointerException("updatedUser is null"); //NOI18N
}
// First encrypt password
- String encryptedPassword = Crypt.crypt(clear-textPassword, updatedUser.getUserEncryptedPassword());
+ String encryptedPassword = Crypt.crypt(clearTextPassword, updatedUser.getUserEncryptedPassword());
// Is it matching?
return encryptedPassword.equals(updatedUser.getUserEncryptedPassword());