You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2021/07/07 07:15:00 UTC

[wicket] branch master updated: Minor non-functional cleanup:

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

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
     new 1f95c72  Minor non-functional cleanup:
1f95c72 is described below

commit 1f95c72f00dfb1a57d5f37d5b1e2b78bfbfd31dd
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Wed Jul 7 10:12:36 2021 +0300

    Minor non-functional cleanup:
    
    - fix javadoc
    - simplify construction of a collection from another collection
    - do not specify the generic type when there is no need, it is infered
    - do not call .toString(), it is implicit
    
    (cherry picked from commit a73bf2e18a4409edcd115b5176a0dd336e1cee96)
---
 .../src/main/java/org/apache/wicket/Component.java       |  2 +-
 .../html/repeater/data/table/filter/FilterToolbar.java   | 16 ++++------------
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java b/wicket-core/src/main/java/org/apache/wicket/Component.java
index 5456609..10d33b9 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -3066,7 +3066,7 @@ public abstract class Component
 
 	/**
 	 * Render a placeholder tag when the component is not visible. The tag is of form:
-	 * &lt;componenttag hidden=""" id="markupid"/&gt;. This method will also call
+	 * &lt;componenttag hidden="" id="markupid"/&gt;. This method will also call
 	 * <code>setOutputMarkupId(true)</code>.
 	 * 
 	 * This is useful, for example, in ajax situations where the component starts out invisible and
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.java
index d5e32c0..74d30ef 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.java
@@ -65,28 +65,20 @@ public class FilterToolbar extends AbstractToolbar
 
 		Args.notNull(table, "table");
 		
-		IModel<List<IColumn<T, S>>> model = new IModel<List<IColumn<T,S>>>() {
+		IModel<List<IColumn<T, S>>> model = new IModel<>() {
 			private static final long serialVersionUID = 1L;
 
 			@Override
 			public List<IColumn<T, S>> getObject() {
-				List<IColumn<T, S>> columnsModels = new LinkedList<>();
-
-				for (IColumn<T, S> column : table.getColumns())
-				{
-					columnsModels.add(column);
-				}
-				return columnsModels;
+				return new LinkedList<>(table.getColumns());
 			}
 		};
-		
 
 		// populate the toolbar with components provided by filtered columns
-		ListView<IColumn<T, S>> filters = new ListView<IColumn<T, S>>("filters", model)
+		ListView<IColumn<T, S>> filters = new ListView<>("filters", model)
 		{
 			private static final long serialVersionUID = 1L;
 
-
 			@Override
 			protected void populateItem(ListItem<IColumn<T, S>> item)
 			{
@@ -114,7 +106,7 @@ public class FilterToolbar extends AbstractToolbar
 								filter.getId() +
 								"] required component id [" +
 								getId() +
-								"] generating column [" + col.toString() + "] ");
+								"] generating column [" + col + "] ");
 					}
 				}