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

jleroux 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 49cae3c  Improved: Handle remaining checkstyle errors (OFBIZ-12169)
49cae3c is described below

commit 49cae3c73aae2b68a08c4071b6744f3522997232
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Sun Oct 17 15:45:55 2021 +0200

    Improved: Handle remaining checkstyle errors (OFBIZ-12169)
    
    Adds getter and setter to ScreenRenderer class
    Adds unused hashCode method to ControllerRequestArtifactInfo class
    Makes final UomWorker and ContactHelper classes
    
    Only 10 checkstyle issues now
---
 .../apache/ofbiz/party/contact/ContactHelper.java    |  2 +-
 build.gradle                                         |  2 +-
 .../java/org/apache/ofbiz/common/uom/UomWorker.java  |  2 +-
 .../artifactinfo/ControllerRequestArtifactInfo.java  |  5 +++++
 .../apache/ofbiz/widget/renderer/ScreenRenderer.java | 20 +++++++++++++++++---
 5 files changed, 25 insertions(+), 6 deletions(-)

diff --git 
a/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactHelper.java
 
b/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactHelper.java
index 20a0fe3..2830e30 100644
--- 
a/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactHelper.java
+++ 
b/applications/party/src/main/java/org/apache/ofbiz/party/contact/ContactHelper.java
@@ -32,7 +32,7 @@ import org.apache.ofbiz.entity.util.EntityUtil;
 /**
  * Accessors for Contact Mechanisms
  */
-public class ContactHelper {
+public final class ContactHelper {
 
     private static final String MODULE = ContactHelper.class.getName();
 
diff --git a/build.gradle b/build.gradle
index 34e21e9..a48cb3d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -350,7 +350,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 = 39
+    tasks.checkstyleMain.maxErrors = 10
     // Currently there are still 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/uom/UomWorker.java 
b/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java
index 1e4e357..3e07f96 100644
--- a/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/uom/UomWorker.java
@@ -34,7 +34,7 @@ import com.ibm.icu.util.Calendar;
 /**
  * UomWorker
  */
-public class UomWorker {
+public final class UomWorker {
 
     private static final String MODULE = UomWorker.class.getName();
 
diff --git 
a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java
 
b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java
index ccbf414..a699f12 100644
--- 
a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java
+++ 
b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java
@@ -170,6 +170,11 @@ public class ControllerRequestArtifactInfo extends 
ArtifactInfoBase {
         }
     }
 
+    @Override
+    public int hashCode() {
+        return toString().hashCode();
+    }
+
     /** Get the Services that are called by this Request */
     public ServiceArtifactInfo getServiceCalledByRequestEvent() {
         return serviceCalledByRequestEvent;
diff --git 
a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java
 
b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java
index ef93004..24174f7 100644
--- 
a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java
+++ 
b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java
@@ -27,8 +27,8 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 import java.util.Stack;
-
 import java.util.UUID;
+
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -60,8 +60,8 @@ import org.apache.ofbiz.widget.cache.GenericWidgetOutput;
 import org.apache.ofbiz.widget.cache.ScreenCache;
 import org.apache.ofbiz.widget.cache.WidgetContextCacheKey;
 import org.apache.ofbiz.widget.model.ModelScreen;
-import org.apache.ofbiz.widget.model.ScriptLinkHelper;
 import org.apache.ofbiz.widget.model.ScreenFactory;
+import org.apache.ofbiz.widget.model.ScriptLinkHelper;
 import org.apache.ofbiz.widget.model.ThemeFactory;
 import org.xml.sax.SAXException;
 
@@ -386,7 +386,21 @@ public class ScreenRenderer {
      * This allow inherent refreshment of the parent screen, when using 
callback feature
      * */
     public static class ScreenStack {
-        LinkedList<Map<String, Object>> visitedScreens;
+        private LinkedList<Map<String, Object>> visitedScreens;
+
+        /**
+         * @return the visitedScreens
+         */
+        public LinkedList<Map<String, Object>> getVisitedScreens() {
+            return visitedScreens;
+        }
+
+        /**
+         * @param visitedScreens the visitedScreens to set
+         */
+        public void setVisitedScreens(LinkedList<Map<String, Object>> 
visitedScreens) {
+            this.visitedScreens = visitedScreens;
+        }
 
         public ScreenStack() {
             visitedScreens = new LinkedList<>();

Reply via email to