You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ar...@apache.org on 2016/07/05 13:51:33 UTC

svn commit: r1751473 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java

Author: arunpatidar
Date: Tue Jul  5 13:51:33 2016
New Revision: 1751473

URL: http://svn.apache.org/viewvc?rev=1751473&view=rev
Log:
Applied patch from jira issue - OFBIZ-7692 - Enforce noninstantiability to AuthHelper class. Thanks Rahul Singh and Rishi Solanki for your contribution.

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java?rev=1751473&r1=1751472&r2=1751473&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/authentication/AuthHelper.java Tue Jul  5 13:51:33 2016
@@ -35,12 +35,13 @@ import org.ofbiz.service.LocalDispatcher
 /**
  * AuthHelper
  */
-public class AuthHelper {
+public final class AuthHelper {
 
     private static final String module = AuthHelper.class.getName();
-    protected static List<Authenticator> authenticators = new ArrayList<Authenticator>();
-    protected static boolean authenticatorsLoaded = false;
+    private static List<Authenticator> authenticators = new ArrayList<Authenticator>();
+    private static boolean authenticatorsLoaded = false;
 
+    private AuthHelper() {}
 
     public static boolean authenticate(String username, String password, boolean isServiceAuth) throws AuthenticatorException {
         if (!authenticatorsLoaded) throw new AuthenticatorException("Authenticators never loaded; be sure to call AuthHelper.loadAuthenticators()");