You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2018/08/23 13:51:09 UTC

[myfaces-tobago] branch master updated: checkstyle

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5095606  checkstyle
5095606 is described below

commit 5095606e6982e9747ffd9cdaa379bf6304a6f0e1
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Aug 23 15:50:58 2018 +0200

    checkstyle
---
 .../myfaces/tobago/internal/component/AbstractUIForm.java      |  1 +
 .../java/org/apache/myfaces/tobago/util/ComponentUtils.java    | 10 ++++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIForm.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIForm.java
index e9e59e4..8aea4e0 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIForm.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIForm.java
@@ -29,5 +29,6 @@ public abstract class AbstractUIForm extends AbstractUIFormBase {
   /**
    * @deprecated since 4.0.0.
    */
+  @Deprecated
   public abstract boolean isInline();
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
index 9965a6b..7635e9c 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
@@ -91,9 +91,12 @@ public final class ComponentUtils {
   private ComponentUtils() {
   }
 
+  /**
+   * @deprecated since 3.0.1
+   */
+  @Deprecated
   public static boolean hasErrorMessages(final FacesContext context) {
-    for (final Iterator iter = context.getMessages(); iter.hasNext(); ) {
-      final FacesMessage message = (FacesMessage) iter.next();
+    for (final FacesMessage message : (Iterable<FacesMessage>) context::getMessages) {
       if (FacesMessage.SEVERITY_ERROR.compareTo(message.getSeverity()) <= 0) {
         return true;
       }
@@ -755,8 +758,7 @@ public final class ComponentUtils {
     if (container instanceof UIComponent) {
       final String clientId = ((UIComponent) container).getClientId(facesContext);
       FacesMessage.Severity max = null;
-      for (final Iterator ids = facesContext.getClientIdsWithMessages(); ids.hasNext(); ) {
-        final String id = (String) ids.next();
+      for (final String id : (Iterable<String>) facesContext::getClientIdsWithMessages) {
         if (id != null && id.startsWith(clientId)) {
           final Iterator messages = facesContext.getMessages(id);
           while (messages.hasNext()) {