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 2011/06/23 14:39:06 UTC

svn commit: r1138854 - /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java

Author: lofwyr
Date: Thu Jun 23 12:39:05 2011
New Revision: 1138854

URL: http://svn.apache.org/viewvc?rev=1138854&view=rev
Log:
TOBAGO-1005: NullPointerException in AbstractUITabGroup by switch tab having FacesMessage with no id

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java?rev=1138854&r1=1138853&r2=1138854&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java Thu Jun 23 12:39:05 2011
@@ -925,14 +925,14 @@ public class ComponentUtils {
     return false;
   }
 
-  public static FacesMessage.Severity getMaximumSeverityOfChildrenMessages(FacesContext facesContext,
-      NamingContainer container) {
+  public static FacesMessage.Severity getMaximumSeverityOfChildrenMessages(
+      FacesContext facesContext, NamingContainer container) {
     if (container instanceof UIComponent) {
       String clientId = ((UIComponent) container).getClientId(facesContext);
       FacesMessage.Severity max = null;
       for (Iterator ids = facesContext.getClientIdsWithMessages(); ids.hasNext();) {
         String id = (String) ids.next();
-        if (id.startsWith(clientId)) {
+        if (id != null && id.startsWith(clientId)) {
           final Iterator messages = facesContext.getMessages(id);
           while (messages.hasNext()) {
             FacesMessage message = (FacesMessage) messages.next();