You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matt Benson (JIRA)" <de...@myfaces.apache.org> on 2011/05/20 18:38:47 UTC

[jira] [Created] (MYFACESTEST-52) ValueExpression mocks cannot return types for null references

ValueExpression mocks cannot return types for null references
-------------------------------------------------------------

                 Key: MYFACESTEST-52
                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-52
             Project: MyFaces Test
          Issue Type: Improvement
          Components: Mock Objects
            Reporter: Matt Benson


For example, MyFaces cannot deduce the proper converter for a given UIComponent if the target of its 'value' binding is null.  Delegating to ELResolver.getType() fixes this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (MYFACESTEST-52) ValueExpression mocks cannot return types for null references

Posted by "Rudy De Busscher (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACESTEST-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040145#comment-13040145 ] 

Rudy De Busscher commented on MYFACESTEST-52:
---------------------------------------------

Isn't it easier to just return the expectedType passed in as constructor parameter?

> ValueExpression mocks cannot return types for null references
> -------------------------------------------------------------
>
>                 Key: MYFACESTEST-52
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-52
>             Project: MyFaces Test
>          Issue Type: Improvement
>          Components: Mock Objects
>            Reporter: Matt Benson
>         Attachments: MYFACESTEST-52.patch.txt
>
>
> For example, MyFaces cannot deduce the proper converter for a given UIComponent if the target of its 'value' binding is null.  Delegating to ELResolver.getType() fixes this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (MYFACESTEST-52) ValueExpression mocks cannot return types for null references

Posted by "Matt Benson (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACESTEST-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036917#comment-13036917 ] 

Matt Benson edited comment on MYFACESTEST-52 at 5/20/11 4:39 PM:
-----------------------------------------------------------------

(includes changes from MYFACESTEST-51.patch.txt)

      was (Author: mbenson):
    (includes changes from MYFACES-51.patch.txt)
  
> ValueExpression mocks cannot return types for null references
> -------------------------------------------------------------
>
>                 Key: MYFACESTEST-52
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-52
>             Project: MyFaces Test
>          Issue Type: Improvement
>          Components: Mock Objects
>            Reporter: Matt Benson
>         Attachments: MYFACESTEST-52.patch.txt
>
>
> For example, MyFaces cannot deduce the proper converter for a given UIComponent if the target of its 'value' binding is null.  Delegating to ELResolver.getType() fixes this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (MYFACESTEST-52) ValueExpression mocks cannot return types for null references

Posted by "Rudy De Busscher (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACESTEST-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rudy De Busscher updated MYFACESTEST-52:
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.4-SNAPSHOT
         Assignee: Rudy De Busscher
           Status: Resolved  (was: Patch Available)

Modified the submitted patch code so that the proposed code is only run when getValue() returns null.  Otherwise, there are scenarios where a concrete result (like String.class) is lost (return of Object.class).  See org.apache.myfaces.test.el.MockValueExpressionTest#testGetType

> ValueExpression mocks cannot return types for null references
> -------------------------------------------------------------
>
>                 Key: MYFACESTEST-52
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-52
>             Project: MyFaces Test
>          Issue Type: Improvement
>          Components: Mock Objects
>            Reporter: Matt Benson
>            Assignee: Rudy De Busscher
>             Fix For: 1.0.4-SNAPSHOT
>
>         Attachments: MYFACESTEST-52.patch.txt
>
>
> For example, MyFaces cannot deduce the proper converter for a given UIComponent if the target of its 'value' binding is null.  Delegating to ELResolver.getType() fixes this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (MYFACESTEST-52) ValueExpression mocks cannot return types for null references

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

Matt Benson updated MYFACESTEST-52:
-----------------------------------

    Status: Patch Available  (was: Open)

> ValueExpression mocks cannot return types for null references
> -------------------------------------------------------------
>
>                 Key: MYFACESTEST-52
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-52
>             Project: MyFaces Test
>          Issue Type: Improvement
>          Components: Mock Objects
>            Reporter: Matt Benson
>
> For example, MyFaces cannot deduce the proper converter for a given UIComponent if the target of its 'value' binding is null.  Delegating to ELResolver.getType() fixes this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (MYFACESTEST-52) ValueExpression mocks cannot return types for null references

Posted by "Matt Benson (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACESTEST-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040267#comment-13040267 ] 

Matt Benson commented on MYFACESTEST-52:
----------------------------------------

Easier, yes.  Fully correct, no.  Once again, this touches on the concept of "when does the mock framework become a full-fledged implementation of unified EL?" but I don't think we've reached that point yet.  With both of us fully aware that I am working against extval's tests, when I return expectedType from MockValueExpression.getValue() I still can't pass all the tests while using the built-in MockApplicationFactory.

> ValueExpression mocks cannot return types for null references
> -------------------------------------------------------------
>
>                 Key: MYFACESTEST-52
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-52
>             Project: MyFaces Test
>          Issue Type: Improvement
>          Components: Mock Objects
>            Reporter: Matt Benson
>         Attachments: MYFACESTEST-52.patch.txt
>
>
> For example, MyFaces cannot deduce the proper converter for a given UIComponent if the target of its 'value' binding is null.  Delegating to ELResolver.getType() fixes this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (MYFACESTEST-52) ValueExpression mocks cannot return types for null references

Posted by "Matt Benson (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACESTEST-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036917#comment-13036917 ] 

Matt Benson edited comment on MYFACESTEST-52 at 5/20/11 4:40 PM:
-----------------------------------------------------------------

(includes changes from MYFACESTEST-51 patch)

      was (Author: mbenson):
    (includes changes from MYFACESTEST-51.patch.txt)
  
> ValueExpression mocks cannot return types for null references
> -------------------------------------------------------------
>
>                 Key: MYFACESTEST-52
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-52
>             Project: MyFaces Test
>          Issue Type: Improvement
>          Components: Mock Objects
>            Reporter: Matt Benson
>         Attachments: MYFACESTEST-52.patch.txt
>
>
> For example, MyFaces cannot deduce the proper converter for a given UIComponent if the target of its 'value' binding is null.  Delegating to ELResolver.getType() fixes this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira