This is an automated email from the ASF dual-hosted git repository.

mthl pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 03b69b30a510bb92dfb01a478de3a2ad1083ec70
Author: Mathieu Lirzin <mathieu.lir...@nereide.fr>
AuthorDate: Fri Nov 8 18:08:42 2019 +0100

    Fixed: Fix linting issues
    (OFBIZ-11265)
---
 build.gradle                                                          | 2 +-
 .../base/src/test/java/org/apache/ofbiz/base/util/UtilCodecTests.java | 3 ++-
 .../service/src/main/java/org/apache/ofbiz/service/ModelService.java  | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/build.gradle b/build.gradle
index a4d9466..0395b8c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -309,7 +309,7 @@ checkstyle {
     // the sum of errors that were present before introducing the
     // ‘checkstyle’ tool present in the framework and in the official
     // plugins.
-    tasks.checkstyleMain.maxErrors = 37780
+    tasks.checkstyleMain.maxErrors = 37776
     // 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/base/src/test/java/org/apache/ofbiz/base/util/UtilCodecTests.java 
b/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilCodecTests.java
index 06c366d..f5d3f97 100644
--- 
a/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilCodecTests.java
+++ 
b/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilCodecTests.java
@@ -99,7 +99,8 @@ public class UtilCodecTests {
     public void testCheckStringForHtmlSafe() {
         String xssVector = "<script>alert('XSS vector');</script>";
         List<String> errorList = new ArrayList<>();
-        String canonicalizedXssVector = 
UtilCodec.checkStringForHtmlSafe("fieldName", xssVector, errorList,new 
Locale("test"), true);
+        String canonicalizedXssVector = 
UtilCodec.checkStringForHtmlSafe("fieldName", xssVector, errorList,
+                new Locale("test"), true);
         assertEquals("<script>alert('XSS vector');</script>", 
canonicalizedXssVector);
         assertEquals(1, errorList.size());
         assertEquals("In field [fieldName] by our input policy, your input has 
not been accepted for security reason. "
diff --git 
a/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java 
b/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
index b44c07f..82d3b3b 100644
--- a/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
@@ -614,8 +614,8 @@ public class ModelService extends AbstractMap<String, 
Object> implements Seriali
                     if ("none".equals(modelParam.allowHtml)) {
                         
UtilCodec.checkStringForHtmlStrictNone(modelParam.name, value, 
errorMessageList, (Locale) context.get("locale"));
                     } else if ("safe".equals(modelParam.allowHtml)) {
-                        UtilCodec.checkStringForHtmlSafe(modelParam.name, 
value, errorMessageList, 
-                                (Locale) context.get("locale"), 
+                        UtilCodec.checkStringForHtmlSafe(modelParam.name, 
value, errorMessageList,
+                                (Locale) context.get("locale"),
                                 
EntityUtilProperties.getPropertyAsBoolean("owasp", "sanitizer.enable", true));
                     }
                 }

Reply via email to