related to issue 41757: minor fixes
authorAsier Lostalé <asier.lostale@openbravo.com>
Wed, 09 Oct 2019 11:02:13 +0200
changeset 36619 9765dea5db5c
parent 36618 2e7550a9ae5e
child 36620 4c494b46c371
related to issue 41757: minor fixes

* Fixed some typos
* Use java.lang.IllegalStateException instead of org.jboss.weld.exceptions.IllegalStateException
src-core/src/org/openbravo/utils/FormatUtilities.java
src/org/openbravo/authentication/hashing/HashingAlgorithm.java
src/org/openbravo/authentication/hashing/PasswordHash.java
src/org/openbravo/authentication/hashing/SHA1.java
src/org/openbravo/authentication/hashing/SHA512Salt.java
--- a/src-core/src/org/openbravo/utils/FormatUtilities.java	Wed Oct 09 10:16:50 2019 +0200
+++ b/src-core/src/org/openbravo/utils/FormatUtilities.java	Wed Oct 09 11:02:13 2019 +0200
@@ -72,7 +72,7 @@
   }
 
   /**
-   * Hashes text using SHA-1 algorithm. This method is deprecate in favor of PasswordHash which
+   * Hashes text using SHA-1 algorithm. This method is deprecated in favor of PasswordHash which
    * supports more modern algorithms.
    *
    * @deprecated Use PasswordHash instead (since = "3.0PR20Q1", forRemoval = true)
--- a/src/org/openbravo/authentication/hashing/HashingAlgorithm.java	Wed Oct 09 10:16:50 2019 +0200
+++ b/src/org/openbravo/authentication/hashing/HashingAlgorithm.java	Wed Oct 09 11:02:13 2019 +0200
@@ -49,7 +49,7 @@
   protected abstract int getAlgorithmVersion();
 
   /** Checks whether a plain text password matches with a hashed password */
-  protected abstract boolean check(String plainTextPassowed, String hashedPassword);
+  protected abstract boolean check(String plainTextPassword, String hashedPassword);
 
   /** Returns the low level algorithm used to perform the hashing. */
   protected abstract MessageDigest getHashingBaseAlgorithm();
--- a/src/org/openbravo/authentication/hashing/PasswordHash.java	Wed Oct 09 10:16:50 2019 +0200
+++ b/src/org/openbravo/authentication/hashing/PasswordHash.java	Wed Oct 09 11:02:13 2019 +0200
@@ -26,7 +26,6 @@
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
-import org.jboss.weld.exceptions.IllegalStateException;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.ad.access.User;
@@ -38,7 +37,7 @@
  * @since 3.0PR20Q1
  */
 public class PasswordHash {
-  public static final Logger log = LogManager.getLogger();
+  private static final Logger log = LogManager.getLogger();
   private static final int DEFAULT_CURRENT_ALGORITHM_VERSION = 1;
 
   private static final Map<Integer, HashingAlgorithm> ALGORITHMS;
--- a/src/org/openbravo/authentication/hashing/SHA1.java	Wed Oct 09 10:16:50 2019 +0200
+++ b/src/org/openbravo/authentication/hashing/SHA1.java	Wed Oct 09 11:02:13 2019 +0200
@@ -22,8 +22,6 @@
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 
-import org.jboss.weld.exceptions.IllegalStateException;
-
 /**
  * Passwords are hashed with SHA-1 algorithm represented as a {@code String} encoded in base 64.
  * <p>
--- a/src/org/openbravo/authentication/hashing/SHA512Salt.java	Wed Oct 09 10:16:50 2019 +0200
+++ b/src/org/openbravo/authentication/hashing/SHA512Salt.java	Wed Oct 09 11:02:13 2019 +0200
@@ -25,8 +25,6 @@
 import java.util.Base64;
 import java.util.Random;
 
-import org.jboss.weld.exceptions.IllegalStateException;
-
 /**
  * Passwords are hashed using SHA-512 algorithm with a random salt of 16 bytes represented as a
  * {@code String} encoded in base 64.