ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jler...@apache.org
Subject svn commit: r1422099 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
Date Fri, 14 Dec 2012 21:26:49 GMT
Author: jleroux
Date: Fri Dec 14 21:26:46 2012
New Revision: 1422099

URL: http://svn.apache.org/viewvc?rev=1422099&view=rev
Log:
Removes the instance of the static utility class 

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java?rev=1422099&r1=1422098&r2=1422099&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java Fri Dec 14
21:26:46 2012
@@ -515,8 +515,7 @@ public class LoginServices {
             }
         }
 
-        LoginServices loginServices = new LoginServices();  
-        loginServices.checkNewPassword(null, null, currentPassword, currentPasswordVerify,
passwordHint, errorMessageList, true, locale);
+        checkNewPassword(null, null, currentPassword, currentPasswordVerify, passwordHint,
errorMessageList, true, locale);
 
         GenericValue userLoginToCreate = delegator.makeValue("UserLogin", UtilMisc.toMap("userLoginId",
userLoginId));
         userLoginToCreate.set("externalAuthId", externalAuthId);
@@ -655,8 +654,7 @@ public class LoginServices {
 
         List<String> errorMessageList = FastList.newInstance();
         if (newPassword != null) {
-            LoginServices loginServices = new LoginServices();  
-            loginServices.checkNewPassword(userLoginToUpdate, currentPassword, newPassword,
newPasswordVerify,
+            checkNewPassword(userLoginToUpdate, currentPassword, newPassword, newPasswordVerify,
                 passwordHint, errorMessageList, adminUser, locale);
         }
 
@@ -887,7 +885,7 @@ public class LoginServices {
         return result;
     }
 
-    public void checkNewPassword(GenericValue userLogin, String currentPassword, String newPassword,
String newPasswordVerify, String passwordHint, List<String> errorMessageList, boolean
ignoreCurrentPassword, Locale locale) {
+    public static void checkNewPassword(GenericValue userLogin, String currentPassword, String
newPassword, String newPasswordVerify, String passwordHint, List<String> errorMessageList,
boolean ignoreCurrentPassword, Locale locale) {
         boolean useEncryption = "true".equals(UtilProperties.getPropertyValue("security.properties",
"password.encrypt"));
 
         String errMsg = null;



Mime
View raw message