You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2020/12/11 10:29:12 UTC

[myfaces-tobago] branch TOBAGO-1999_Select2 updated: checkstyle

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

weber pushed a commit to branch TOBAGO-1999_Select2
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/TOBAGO-1999_Select2 by this push:
     new 13267be  checkstyle
13267be is described below

commit 13267be03f3203d1f513d102f9aa0ca94c5a33e4
Author: Volker Weber <v....@inexso.de>
AuthorDate: Fri Dec 11 11:29:05 2020 +0100

    checkstyle
---
 .../myfaces/tobago/facelets/SelectManyBoxRule.java | 19 ++++++++++++++
 .../extension/SelectManyBoxExtensionHandler.java   |  1 -
 .../component/AbstractUISelectManyBox.java         | 24 +++++++++++++-----
 .../internal/component/AbstractUISuggest.java      |  1 -
 .../internal/component/UISelect2Component.java     | 19 ++++++++++++++
 .../internal/taglib/declaration/Select2.java       | 20 ++++++++++++++-
 .../internal/util/UISelect2ComponentUtil.java      | 19 ++++++++++++++
 .../apache/myfaces/tobago/model/SubmittedItem.java | 19 ++++++++++++++
 .../tobago/model/UICustomItemContainer.java        | 29 +++++++++++++++++++---
 .../tobago/example/demo/Select2Controller.java     | 19 ++++++++++++++
 .../standard/standard/tag/SuggestRenderer.java     |  8 ------
 .../renderkit/html/util/HtmlRendererUtils.java     |  3 ---
 12 files changed, 158 insertions(+), 23 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/SelectManyBoxRule.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/SelectManyBoxRule.java
index c1e1427..5f38c37 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/SelectManyBoxRule.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/SelectManyBoxRule.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 package org.apache.myfaces.tobago.facelets;
 
 import org.apache.myfaces.tobago.internal.component.AbstractUISelectManyBox;
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/extension/SelectManyBoxExtensionHandler.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/extension/SelectManyBoxExtensionHandler.java
index 3338b95..e779ed4 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/extension/SelectManyBoxExtensionHandler.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/extension/SelectManyBoxExtensionHandler.java
@@ -21,7 +21,6 @@ package org.apache.myfaces.tobago.facelets.extension;
 
 import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.component.UISelectManyBox;
-import org.apache.myfaces.tobago.component.UISelectManyListbox;
 
 import javax.faces.view.facelets.ComponentConfig;
 
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBox.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBox.java
index d365469..993b326 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBox.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBox.java
@@ -1,7 +1,21 @@
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by Fernflower decompiler)
-//
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 package org.apache.myfaces.tobago.internal.component;
 
@@ -12,8 +26,6 @@ import org.apache.myfaces.tobago.util.ComponentUtils;
 import javax.faces.component.StateHelper;
 import javax.faces.context.FacesContext;
 import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
 
 public abstract class AbstractUISelectManyBox extends AbstractUISelectMany implements UISelect2Component {
 
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISuggest.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISuggest.java
index 2197709..aee995f 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISuggest.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISuggest.java
@@ -24,7 +24,6 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.myfaces.tobago.component.InputSuggest2;
 import org.apache.myfaces.tobago.component.SupportsMarkup;
-import org.apache.myfaces.tobago.component.UISelectItems;
 import org.apache.myfaces.tobago.component.UISelectManyBox;
 import org.apache.myfaces.tobago.component.UISelectOneChoice;
 import org.apache.myfaces.tobago.model.AutoSuggestItem;
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/UISelect2Component.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/UISelect2Component.java
index fc7291a..ca66eb9 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/UISelect2Component.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/UISelect2Component.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 package org.apache.myfaces.tobago.internal.component;
 
 import javax.faces.component.StateHelper;
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/Select2.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/Select2.java
index e682f5d..45e9597 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/Select2.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/Select2.java
@@ -1,8 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 package org.apache.myfaces.tobago.internal.taglib.declaration;
 
 import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
-import org.apache.myfaces.tobago.internal.component.AbstractUISuggest;
 
 public interface Select2 {
 
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/UISelect2ComponentUtil.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/UISelect2ComponentUtil.java
index 8e69752..8289bc7 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/UISelect2ComponentUtil.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/UISelect2ComponentUtil.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 package org.apache.myfaces.tobago.internal.util;
 
 import org.slf4j.Logger;
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/model/SubmittedItem.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/model/SubmittedItem.java
index 8a51cca..acf17f8 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/model/SubmittedItem.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/model/SubmittedItem.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 package org.apache.myfaces.tobago.model;
 
 import org.apache.myfaces.tobago.context.Markup;
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/model/UICustomItemContainer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/model/UICustomItemContainer.java
index 813d193..0dcb98b 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/model/UICustomItemContainer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/model/UICustomItemContainer.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 package org.apache.myfaces.tobago.model;
 
 import javax.faces.component.UISelectItems;
@@ -14,8 +33,12 @@ public class UICustomItemContainer extends UISelectItems {
 
   @Override
   public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
     return true;
   }
 
@@ -24,4 +47,4 @@ public class UICustomItemContainer extends UISelectItems {
     return getClass().hashCode();
   }
 
-}
\ No newline at end of file
+}
diff --git a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Select2Controller.java b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Select2Controller.java
index 5217923..ac4202e 100644
--- a/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Select2Controller.java
+++ b/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Select2Controller.java
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 package org.apache.myfaces.tobago.example.demo;
 
 import org.apache.commons.lang.StringUtils;
diff --git a/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java b/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java
index b588db1..0e731cd 100644
--- a/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java
+++ b/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java
@@ -23,8 +23,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.myfaces.tobago.component.UIIn;
-import org.apache.myfaces.tobago.component.UISelectManyBox;
-import org.apache.myfaces.tobago.component.UISelectOneChoice;
 import org.apache.myfaces.tobago.component.UISuggest;
 import org.apache.myfaces.tobago.context.ResourceManagerUtils;
 import org.apache.myfaces.tobago.model.AutoSuggestItem;
@@ -35,18 +33,12 @@ import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.HtmlInputTypes;
-import org.apache.myfaces.tobago.renderkit.html.JsonUtils;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
-import javax.el.MethodExpression;
 import javax.faces.component.UIComponent;
-import javax.faces.component.UIInput;
 import javax.faces.context.FacesContext;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
 
 public class SuggestRenderer extends InputRendererBase {
 
diff --git a/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java b/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java
index fab6cfa..5df776d 100644
--- a/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java
+++ b/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java
@@ -30,9 +30,6 @@ import org.apache.myfaces.tobago.component.UISheet;
 import org.apache.myfaces.tobago.context.Markup;
 import org.apache.myfaces.tobago.context.ResourceManagerUtils;
 import org.apache.myfaces.tobago.internal.component.AbstractUICommand;
-import org.apache.myfaces.tobago.internal.component.AbstractUISelectMany;
-import org.apache.myfaces.tobago.internal.component.AbstractUISelectManyBox;
-import org.apache.myfaces.tobago.internal.component.UISelect2Component;
 import org.apache.myfaces.tobago.internal.util.Deprecation;
 import org.apache.myfaces.tobago.internal.util.FacesContextUtils;
 import org.apache.myfaces.tobago.internal.util.StringUtils;