You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by su...@apache.org on 2020/07/07 11:41:19 UTC
[ofbiz-framework] branch trunk updated: Improved: Removed unused
SuppressWarnings and added proper space after comma and before { in
LoginServices.java. (OFBIZ-11805) Thanks: Pawan Verma Also updated
tasks.checkstyleMain.maxErrors (-5).
This is an automated email from the ASF dual-hosted git repository.
surajk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new c5f9697 Improved: Removed unused SuppressWarnings and added proper space after comma and before { in LoginServices.java. (OFBIZ-11805) Thanks: Pawan Verma Also updated tasks.checkstyleMain.maxErrors (-5).
c5f9697 is described below
commit c5f9697e35e676cf5afa6e14dc3f420030961924
Author: Suraj Khurana <su...@apache.org>
AuthorDate: Tue Jul 7 17:10:11 2020 +0530
Improved: Removed unused SuppressWarnings and added proper space after comma and before { in LoginServices.java.
(OFBIZ-11805)
Thanks: Pawan Verma
Also updated tasks.checkstyleMain.maxErrors (-5).
---
build.gradle | 2 +-
.../java/org/apache/ofbiz/common/login/LoginServices.java | 11 +++++------
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/build.gradle b/build.gradle
index 303645e..39ed53e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -287,7 +287,7 @@ checkstyle {
// the sum of errors found last time it was changed after using the
// ‘checkstyle’ tool present in the framework and in the official
// plugins.
- tasks.checkstyleMain.maxErrors = 26161
+ tasks.checkstyleMain.maxErrors = 26156
// Currently there are a lot of errors so we need to temporarily
// hide them to avoid polluting the terminal output.
showViolations = false
diff --git a/framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java b/framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java
index 6401a0b..5ac8d9d 100644
--- a/framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java
@@ -74,7 +74,6 @@ public class LoginServices {
/** Login service to authenticate username and password
* @return Map of results including (userLogin) GenericValue object
*/
- @SuppressWarnings("checkstyle:LineLength")
public static Map<String, Object> userLogin(DispatchContext ctx, Map<String, ?> context) {
LocalDispatcher dispatcher = ctx.getDispatcher();
Locale locale = (Locale) context.get("locale");
@@ -121,9 +120,9 @@ public class LoginServices {
String errMsg = "";
if (UtilValidate.isEmpty(username)) {
- errMsg = UtilProperties.getMessage(RESOURCE,"loginservices.username_missing", locale);
+ errMsg = UtilProperties.getMessage(RESOURCE, "loginservices.username_missing", locale);
} else if (UtilValidate.isEmpty(password) && UtilValidate.isEmpty(jwtToken)) {
- errMsg = UtilProperties.getMessage(RESOURCE,"loginservices.password_missing", locale);
+ errMsg = UtilProperties.getMessage(RESOURCE, "loginservices.password_missing", locale);
} else {
if ("true".equalsIgnoreCase(EntityUtilProperties.getPropertyValue("security", "username.lowercase", delegator))) {
@@ -278,8 +277,8 @@ public class LoginServices {
Debug.logInfo("[LoginServices.userLogin] : Password Incorrect", MODULE);
// password invalid...
- if (password != null) errMsg = UtilProperties.getMessage(RESOURCE,"loginservices.password_incorrect", locale);
- else if (jwtToken != null) errMsg = UtilProperties.getMessage(RESOURCE,"loginservices.token_incorrect", locale);
+ if (password != null) errMsg = UtilProperties.getMessage(RESOURCE, "loginservices.password_incorrect", locale);
+ else if (jwtToken != null) errMsg = UtilProperties.getMessage(RESOURCE, "loginservices.token_incorrect", locale);
// increment failed login count
Long currentFailedLogins = userLogin.getLong("successiveFailedLogins");
@@ -568,7 +567,7 @@ public class LoginServices {
return null;
}
- public static void createUserLoginPasswordHistory(GenericValue userLogin) throws GenericEntityException{
+ public static void createUserLoginPasswordHistory(GenericValue userLogin) throws GenericEntityException {
int passwordChangeHistoryLimit = 0;
Delegator delegator = userLogin.getDelegator();
String userLoginId = userLogin.getString("userLoginId");