myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hno...@apache.org
Subject [myfaces-tobago] branch tobago-4.x updated: fix checkstyle
Date Wed, 04 Mar 2020 14:04:37 GMT
This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch tobago-4.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/tobago-4.x by this push:
     new 9fa211c  fix checkstyle
9fa211c is described below

commit 9fa211cddbf6e11a78606b945eb4258b4a8140e2
Author: Udo Schnurpfeil <udo.schnurpfeil@irian.eu>
AuthorDate: Wed Mar 4 14:59:47 2020 +0100

    fix checkstyle
---
 .../internal/renderkit/renderer/SheetRenderer.java | 23 ++++++----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
index 0f20820..5f0315c 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SheetRenderer.java
@@ -353,7 +353,7 @@ public class SheetRenderer extends RendererBase {
     }
 
     if (sheet.isLazy()) {
-      encodeHiddenInput(writer,null, sheetId + SUFFIX_LAZY);
+      encodeHiddenInput(writer, null, sheetId + SUFFIX_LAZY);
     }
 
     StringBuilder expandedValue = null;
@@ -391,20 +391,9 @@ public class SheetRenderer extends RendererBase {
               ? sheet.getLastRowIndexOfCurrentPage()
               : -1;
           final boolean unknown = !sheet.hasRowCount();
-          final String key; // plural
-          if (unknown) {
-            if (first == last1) {
-              key = "sheetPagingInfoUndefinedSingleRow";
-            } else {
-              key = "sheetPagingInfoUndefinedRows";
-            }
-          } else {
-            if (first == last1) {
-              key = "sheetPagingInfoSingleRow";
-            } else {
-              key = "sheetPagingInfoRows";
-            }
-          }
+          final String key = unknown
+              ? first == last1 ? "sheetPagingInfoUndefinedSingleRow" : "sheetPagingInfoUndefinedRows"
+              : first == last1 ? "sheetPagingInfoSingleRow" : "sheetPagingInfoRows";
           final String inputMarker = "{#}";
           final Object[] args = {inputMarker, last1 == -1 ? "?" : last1, unknown ? "" : sheet.getRowCount()};
           final MessageFormat detail = new MessageFormat(
@@ -940,7 +929,7 @@ public class SheetRenderer extends RendererBase {
                   column.getClientId(facesContext);
                   final String sorterId = column.getId() + "_" + AbstractUISheet.SORTER_ID;
                   sortCommand = (AbstractUILink) ComponentUtils.createComponent(
-                          facesContext, Tags.link.componentType(), RendererTypes.Link, sorterId);
+                      facesContext, Tags.link.componentType(), RendererTypes.Link, sorterId);
                   sortCommand.setTransient(true);
                   final AjaxBehavior reloadBehavior = createReloadBehavior(sheet);
                   sortCommand.addClientBehavior("click", reloadBehavior);
@@ -1218,7 +1207,7 @@ public class SheetRenderer extends RendererBase {
     AbstractUILink command = (AbstractUILink) facets.get(facet);
     if (command == null) {
       command = (AbstractUILink) ComponentUtils.createComponent(facesContext, Tags.link.componentType(),
-                      RendererTypes.Link, SUFFIX_PAGE_ACTION + id);
+          RendererTypes.Link, SUFFIX_PAGE_ACTION + id);
       command.setRendered(true);
       command.setDisabled(disabled);
       command.setTransient(true);


Mime
View raw message