You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2010/02/05 04:18:28 UTC

[jira] Created: (MYFACES-2537) FacesConfigurator.sortRelativeOrderingList() algorithm is broken trying to resolve some examples

FacesConfigurator.sortRelativeOrderingList() algorithm is broken trying to resolve some examples
------------------------------------------------------------------------------------------------

                 Key: MYFACES-2537
                 URL: https://issues.apache.org/jira/browse/MYFACES-2537
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-314
    Affects Versions: 2.0.0-beta
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe


Curtiss Howard put this comment on dev list

FacesConfigurator.sortRelativeOrderingList() is failing on a rather
simple case:

A after B
B before C
C before A

The expected faces-config ordering is B-C-A, but instead
sortRelativeOrderingList() is detecting a circularity.

The algorithm proposed fails because it is not able to process the nodes in the correct order (the algorithm assign a weight equal to all nodes, so it fails when try to order them in a psedo "postorder" form).

It is faster and better try another algorithm. The current one works in all tests done at this moment but this case makes it fail without any possible workaround.

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


[jira] Commented: (MYFACES-2537) FacesConfigurator.sortRelativeOrderingList() algorithm is broken trying to resolve some examples

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829950#action_12829950 ] 

Leonardo Uribe commented on MYFACES-2537:
-----------------------------------------

Thinking more about it, I like the old algorithm version, because it handles better "before others" and "after others" rules. Since it try to resolve nodes from lower to upper complexity, the "others" group are handled better. The alternative could find cases like presented before, so I would like myfaces try first with the previous version and if a cyclic reference is found, try the topological sorting or other alternative to be proposed.


> FacesConfigurator.sortRelativeOrderingList() algorithm is broken trying to resolve some examples
> ------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2537
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2537
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0-beta
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>
> Curtiss Howard put this comment on dev list
> FacesConfigurator.sortRelativeOrderingList() is failing on a rather
> simple case:
> A after B
> B before C
> C before A
> The expected faces-config ordering is B-C-A, but instead
> sortRelativeOrderingList() is detecting a circularity.
> The algorithm proposed fails because it is not able to process the nodes in the correct order (the algorithm assign a weight equal to all nodes, so it fails when try to order them in a psedo "postorder" form).
> It is faster and better try another algorithm. The current one works in all tests done at this moment but this case makes it fail without any possible workaround.

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


[jira] Commented: (MYFACES-2537) FacesConfigurator.sortRelativeOrderingList() algorithm is broken trying to resolve some examples

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829937#action_12829937 ] 

Leonardo Uribe commented on MYFACES-2537:
-----------------------------------------

Committed alternative solution using topological sorting.

> FacesConfigurator.sortRelativeOrderingList() algorithm is broken trying to resolve some examples
> ------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2537
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2537
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0-beta
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>
> Curtiss Howard put this comment on dev list
> FacesConfigurator.sortRelativeOrderingList() is failing on a rather
> simple case:
> A after B
> B before C
> C before A
> The expected faces-config ordering is B-C-A, but instead
> sortRelativeOrderingList() is detecting a circularity.
> The algorithm proposed fails because it is not able to process the nodes in the correct order (the algorithm assign a weight equal to all nodes, so it fails when try to order them in a psedo "postorder" form).
> It is faster and better try another algorithm. The current one works in all tests done at this moment but this case makes it fail without any possible workaround.

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


[jira] Resolved: (MYFACES-2537) FacesConfigurator.sortRelativeOrderingList() algorithm is broken trying to resolve some examples

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-2537.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0-beta-2

Opened MYFACES-2547, so we can close this one

> FacesConfigurator.sortRelativeOrderingList() algorithm is broken trying to resolve some examples
> ------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2537
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2537
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0-beta
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.0-beta-2
>
>         Attachments: MYFACES-2537-FacesConfigurator.patch
>
>
> Curtiss Howard put this comment on dev list
> FacesConfigurator.sortRelativeOrderingList() is failing on a rather
> simple case:
> A after B
> B before C
> C before A
> The expected faces-config ordering is B-C-A, but instead
> sortRelativeOrderingList() is detecting a circularity.
> The algorithm proposed fails because it is not able to process the nodes in the correct order (the algorithm assign a weight equal to all nodes, so it fails when try to order them in a psedo "postorder" form).
> It is faster and better try another algorithm. The current one works in all tests done at this moment but this case makes it fail without any possible workaround.

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


[jira] Commented: (MYFACES-2537) FacesConfigurator.sortRelativeOrderingList() algorithm is broken trying to resolve some examples

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12832219#action_12832219 ] 

Leonardo Uribe commented on MYFACES-2537:
-----------------------------------------

This is another different problem. We should handle it  in other issue if possible.

> FacesConfigurator.sortRelativeOrderingList() algorithm is broken trying to resolve some examples
> ------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2537
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2537
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0-beta
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-2537-FacesConfigurator.patch
>
>
> Curtiss Howard put this comment on dev list
> FacesConfigurator.sortRelativeOrderingList() is failing on a rather
> simple case:
> A after B
> B before C
> C before A
> The expected faces-config ordering is B-C-A, but instead
> sortRelativeOrderingList() is detecting a circularity.
> The algorithm proposed fails because it is not able to process the nodes in the correct order (the algorithm assign a weight equal to all nodes, so it fails when try to order them in a psedo "postorder" form).
> It is faster and better try another algorithm. The current one works in all tests done at this moment but this case makes it fail without any possible workaround.

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