[ofbiz-plugins] branch trunk updated: Improved: Handle remaining checkstyle errors (OFBIZ-12169)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-plugins] branch trunk updated: Improved: Handle remaining checkstyle errors (OFBIZ-12169)

jleroux@apache.org
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-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new dbfa4f0  Improved: Handle remaining checkstyle errors (OFBIZ-12169)
dbfa4f0 is described below

commit dbfa4f0ca0620896a2313d5b784d197bbc25d4d3
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Tue May 4 10:34:58 2021 +0200

    Improved: Handle remaining checkstyle errors (OFBIZ-12169)
   
    This handles the "'(' should be on the previous line?" rule of MethodParamPad
   
    Actually not completely, because there are still some cases that can't be
    handled by changing code, notably when a casting is necessary. I believe there
    is an error in checkstyle code. I'll discuss that in dev ML before sending
    checkstyle team a report.
---
 .../org/apache/ofbiz/htmlreport/AbstractReportThread.java    | 12 ++++++------
 .../main/java/org/apache/ofbiz/htmlreport/HtmlReport.java    |  5 +----
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReportThread.java b/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReportThread.java
index a33521e..46df69c 100644
--- a/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReportThread.java
+++ b/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReportThread.java
@@ -166,8 +166,8 @@ public abstract class AbstractReportThread extends Thread implements InterfaceRe
      */
     protected void initHtmlReport(HttpServletRequest request, HttpServletResponse response) {
 
-        report = HtmlReport.getInstance(request, response);
-        ((HtmlReport) report).setParamThread(getUUID().toString());
+        HtmlReport report = HtmlReport.getInstance(request, response);
+        report.setParamThread(getUUID().toString());
     }
 
     /**
@@ -175,8 +175,8 @@ public abstract class AbstractReportThread extends Thread implements InterfaceRe
      */
     protected void initHtmlReport(HttpServletRequest request, HttpServletResponse response, boolean writeHtml, boolean isTransient) {
 
-        report = HtmlReport.getInstance(request, response, writeHtml, isTransient);
-        ((HtmlReport) report).setParamThread(getUUID().toString());
+        HtmlReport report = HtmlReport.getInstance(request, response, writeHtml, isTransient);
+        report.setParamThread(getUUID().toString());
     }
 
     /**
@@ -189,8 +189,8 @@ public abstract class AbstractReportThread extends Thread implements InterfaceRe
      */
     protected void initHtmlReport(HttpServletRequest request, HttpServletResponse response, boolean writeHtml, boolean isTransient,
                                   String logFileName) {
-        report = HtmlReport.getInstance(request, response, writeHtml, isTransient, logFileName);
-        ((HtmlReport) report).setParamThread(getUUID().toString());
+        HtmlReport report = HtmlReport.getInstance(request, response, writeHtml, isTransient, logFileName);
+        report.setParamThread(getUUID().toString());
     }
 
     /**
diff --git a/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java b/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
index 34b2da4..a5aa404 100644
--- a/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
+++ b/pricat/src/main/java/org/apache/ofbiz/htmlreport/HtmlReport.java
@@ -96,16 +96,13 @@ public class HtmlReport extends AbstractReport {
     /** The thread to display in this report. */
     private String paramThread;
 
-    /** The next thread to display after this report. */
-    private String paramThreadHasNext;
-
     private String paramAction;
 
     private String paramTitle;
 
     private String paramResource;
 
-    /** Flag for refreching workplace .*/
+    /** Flag for refreshing workplace. */
     private String paramRefreshWorkplace;
 
     /** Constant for the "OK" button in the build button methods. */