You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Paul McMahan (JIRA)" <de...@myfaces.apache.org> on 2007/03/28 04:41:32 UTC

[jira] Created: (MYFACES-1577) PropertyResolver should throw PropertyNotFoundException

PropertyResolver should throw PropertyNotFoundException
-------------------------------------------------------

                 Key: MYFACES-1577
                 URL: https://issues.apache.org/jira/browse/MYFACES-1577
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-252
    Affects Versions: 1.2.0-SNAPSHOT
            Reporter: Paul McMahan


According to the spec several methods in PropertyResolver should throw PropertyNotFoundException in the following circumstances:

getValue(Object base, int index) 
    PropertyNotFoundException - if the index is out of bounds or if base is null

setValue(Object base, int index, Object value)
    PropertyNotFoundException - if the index is out of bounds or if base is null

setValue(Object base, Object property, Object value) 
    PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null


BTW,  MYFACES-1576 already addressed these two cases:
getType(Object base, int index) 
    PropertyNotFoundException - if the index is out of bounds or if base is null
getType(Object base, Object property)
    PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null


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


[jira] Commented: (MYFACES-1577) PropertyResolver should throw PropertyNotFoundException

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486949 ] 

Martin Marinschek commented on MYFACES-1577:
--------------------------------------------

Please revert this anyone - we have to accept a base of null so that:

#{person.address.street} doesn't fail, even if address is null.

I wanted to change this once as well, but it's not spec conform.

regards,

Martin

> PropertyResolver should throw PropertyNotFoundException
> -------------------------------------------------------
>
>                 Key: MYFACES-1577
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1577
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions: 1.2.0-SNAPSHOT
>            Reporter: Paul McMahan
>         Assigned To: Dennis Byrne
>             Fix For: 1.2.0-SNAPSHOT
>
>         Attachments: MYFACES-1577.patch
>
>
> According to the spec several methods in PropertyResolver should throw PropertyNotFoundException in the following circumstances:
> getValue(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, int index, Object value)
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, Object property, Object value) 
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null
> BTW,  MYFACES-1576 already addressed these two cases:
> getType(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> getType(Object base, Object property)
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null

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


[jira] Updated: (MYFACES-1577) PropertyResolver should throw PropertyNotFoundException

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

Paul McMahan updated MYFACES-1577:
----------------------------------

    Status: Patch Available  (was: Reopened)

> PropertyResolver should throw PropertyNotFoundException
> -------------------------------------------------------
>
>                 Key: MYFACES-1577
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1577
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions: 1.2.0-SNAPSHOT
>            Reporter: Paul McMahan
>         Assigned To: Dennis Byrne
>             Fix For: 1.2.0-SNAPSHOT
>
>         Attachments: MYFACES-1577.patch
>
>
> According to the spec several methods in PropertyResolver should throw PropertyNotFoundException in the following circumstances:
> getValue(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, int index, Object value)
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, Object property, Object value) 
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null
> BTW,  MYFACES-1576 already addressed these two cases:
> getType(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> getType(Object base, Object property)
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null

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


[jira] Reopened: (MYFACES-1577) PropertyResolver should throw PropertyNotFoundException

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

Mathias Broekelmann reopened MYFACES-1577:
------------------------------------------


unfortunately the tck fails now.

The TCK expects it this way:
getValue(Object base, int index) should throw NPE or return a null value if base is null
getValue(Object base, int index) should throw IndexOutOfBoundsException if Index is out of bounds or return a null value

> PropertyResolver should throw PropertyNotFoundException
> -------------------------------------------------------
>
>                 Key: MYFACES-1577
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1577
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions: 1.2.0-SNAPSHOT
>            Reporter: Paul McMahan
>         Assigned To: Dennis Byrne
>             Fix For: 1.2.0-SNAPSHOT
>
>         Attachments: MYFACES-1577.patch
>
>
> According to the spec several methods in PropertyResolver should throw PropertyNotFoundException in the following circumstances:
> getValue(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, int index, Object value)
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, Object property, Object value) 
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null
> BTW,  MYFACES-1576 already addressed these two cases:
> getType(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> getType(Object base, Object property)
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null

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


[jira] Updated: (MYFACES-1577) PropertyResolver should throw PropertyNotFoundException

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

Paul McMahan updated MYFACES-1577:
----------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

> PropertyResolver should throw PropertyNotFoundException
> -------------------------------------------------------
>
>                 Key: MYFACES-1577
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1577
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions: 1.2.0-SNAPSHOT
>            Reporter: Paul McMahan
>         Assigned To: Paul McMahan
>             Fix For: 1.2.0-SNAPSHOT
>
>         Attachments: MYFACES-1577-2.patch, MYFACES-1577.patch
>
>
> According to the spec several methods in PropertyResolver should throw PropertyNotFoundException in the following circumstances:
> getValue(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, int index, Object value)
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, Object property, Object value) 
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null
> BTW,  MYFACES-1576 already addressed these two cases:
> getType(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> getType(Object base, Object property)
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null

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


[jira] Commented: (MYFACES-1577) PropertyResolver should throw PropertyNotFoundException

Posted by "Paul McMahan (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486952 ] 

Paul McMahan commented on MYFACES-1577:
---------------------------------------

It was actually the setValue() errors that prompted me to provide the patch.  But while working on the patch I also noticed the discrepancy between getValue() and the spec/javadoc so I adjusted its behavior as well.  As they say, "no good deed goes unpunished" :-)

I believe that the current behavior of getValue() is consistent with the spec/javadoc and that the test cases are in error.  Last week I created GERONIMOTCK-22 and GERONIMOTCK-23 to track challenges for those test cases.  But while that gets sorted out I agree that getValue() should be reverted back to its original form which as I recall threw the exceptions like you described.

> PropertyResolver should throw PropertyNotFoundException
> -------------------------------------------------------
>
>                 Key: MYFACES-1577
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1577
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions: 1.2.0-SNAPSHOT
>            Reporter: Paul McMahan
>         Assigned To: Dennis Byrne
>             Fix For: 1.2.0-SNAPSHOT
>
>         Attachments: MYFACES-1577.patch
>
>
> According to the spec several methods in PropertyResolver should throw PropertyNotFoundException in the following circumstances:
> getValue(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, int index, Object value)
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, Object property, Object value) 
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null
> BTW,  MYFACES-1576 already addressed these two cases:
> getType(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> getType(Object base, Object property)
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null

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


[jira] Updated: (MYFACES-1577) PropertyResolver should throw PropertyNotFoundException

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

Paul McMahan updated MYFACES-1577:
----------------------------------

    Status: Patch Available  (was: Open)

> PropertyResolver should throw PropertyNotFoundException
> -------------------------------------------------------
>
>                 Key: MYFACES-1577
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1577
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions: 1.2.0-SNAPSHOT
>            Reporter: Paul McMahan
>         Attachments: MYFACES-1577.patch
>
>
> According to the spec several methods in PropertyResolver should throw PropertyNotFoundException in the following circumstances:
> getValue(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, int index, Object value)
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> setValue(Object base, Object property, Object value) 
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null
> BTW,  MYFACES-1576 already addressed these two cases:
> getType(Object base, int index) 
>     PropertyNotFoundException - if the index is out of bounds or if base is null
> getType(Object base, Object property)
>     PropertyNotFoundException - if the specified bean base object property does not exist or if base or property is null

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