myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-1825) duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds()
Date Mon, 21 Apr 2008 04:37:21 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-1825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590843#action_12590843
] 

Leonardo Uribe commented on MYFACES-1825:
-----------------------------------------

Yes, checking the actual code it seems that does not detect if two components that are instance
of NamingContainer are duplicated on the tree. Feel free to commit this change.

> duplicate ids not detected in JspStateManagerImpl.checkForDuplicateIds() 
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-1825
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1825
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: gaston
>            Assignee: Leonardo Uribe
>             Fix For:  1.1.6-SNAPSHOT, 1.2.3-SNAPSHOT
>
>
> Some duplicate id are not detected in my MyFaces(1.1.5)/Facelets(1.1.12) based application.
> I think there's a bug in MyFaces's detection of duplicate ids in JspStateManagerImpl.checkForDuplicateIds()
: 
> this code seems to be wrong :
>         boolean namingContainer = component instanceof NamingContainer;
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }
> It should be :
>         while (it.hasNext()) {
>             UIComponent kid = (UIComponent) it.next();
>             boolean namingContainer = kid instanceof NamingContainer;
>             if (namingContainer) {
>                 checkForDuplicateIds(context, kid, new HashSet());
>             }
>             else {
>                 checkForDuplicateIds(context, kid, ids);
>             }
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message