You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Ryan Lubke (JIRA)" <de...@myfaces.apache.org> on 2007/07/19 01:45:05 UTC

[jira] Created: (MYFACES-1681) UICompone

UICompone
---------

                 Key: MYFACES-1681
                 URL: https://issues.apache.org/jira/browse/MYFACES-1681
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-252
    Affects Versions:  1.2.0
         Environment: SE 1.6.0_02
GlassFish V2 admingui
            Reporter: Ryan Lubke


The Map returned by UIComponent.getAttributes() is too restrictive with respect
to null values.

MyFaces will always throw an NPE for a null value.  Granted, the following is
in the javadocs:

 * Any attempt to add a null key or value must throw a NullPointerException.

However, the following is also in the same section:

 * put() - If the property is writeable, call the setter method to set the corresponding value (unwrapping primitive values in their    
   corresponding wrapper classes). If the property is not writeable, or an attempt is made to set a property of primitive type to null, throw 
   IllegalArgumentException.

Notice the comment about setting a primitive property to null.  This implies that a null value for this case
is legal.  The RI will only throw the NPE against a null value *if* there isn't an associated property.



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


[jira] Commented: (MYFACES-1681) UIComponent.getAttributes() too restrictive

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513839 ] 

Matthias Weßendorf commented on MYFACES-1681:
---------------------------------------------

provided patch / test-case. waiting for TCK...

> UIComponent.getAttributes() too restrictive
> -------------------------------------------
>
>                 Key: MYFACES-1681
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1681
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions:  1.2.0
>         Environment: SE 1.6.0_02
> GlassFish V2 admingui
>            Reporter: Ryan Lubke
>            Assignee: Matthias Weßendorf
>         Attachments: MYFACES-1681.patch
>
>
> The Map returned by UIComponent.getAttributes() is too restrictive with respect
> to null values.
> MyFaces will always throw an NPE for a null value.  Granted, the following is
> in the javadocs:
>  * Any attempt to add a null key or value must throw a NullPointerException.
> However, the following is also in the same section:
>  * put() - If the property is writeable, call the setter method to set the corresponding value (unwrapping primitive values in their    
>    corresponding wrapper classes). If the property is not writeable, or an attempt is made to set a property of primitive type to null, throw 
>    IllegalArgumentException.
> Notice the comment about setting a primitive property to null.  This implies that a null value for this case
> is legal.  The RI will only throw the NPE against a null value *if* there isn't an associated property.

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


[jira] Commented: (MYFACES-1681) UIComponent.getAttributes() too restrictive

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

Martin Marinschek commented on MYFACES-1681:
--------------------------------------------

We did this as the TCK failed, what I remember - it's only a faint memory though.

regards,

Martin

> UIComponent.getAttributes() too restrictive
> -------------------------------------------
>
>                 Key: MYFACES-1681
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1681
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions: 1.1.5,  1.2.0
>         Environment: SE 1.6.0_02
> GlassFish V2 admingui
>            Reporter: Ryan Lubke
>            Assignee: Matthias Weßendorf
>             Fix For:  1.1.6-SNAPSHOT, 1.2.1-SNAPSHOT
>
>         Attachments: MYFACES-1681.patch
>
>
> The Map returned by UIComponent.getAttributes() is too restrictive with respect
> to null values.
> MyFaces will always throw an NPE for a null value.  Granted, the following is
> in the javadocs:
>  * Any attempt to add a null key or value must throw a NullPointerException.
> However, the following is also in the same section:
>  * put() - If the property is writeable, call the setter method to set the corresponding value (unwrapping primitive values in their    
>    corresponding wrapper classes). If the property is not writeable, or an attempt is made to set a property of primitive type to null, throw 
>    IllegalArgumentException.
> Notice the comment about setting a primitive property to null.  This implies that a null value for this case
> is legal.  The RI will only throw the NPE against a null value *if* there isn't an associated property.

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


[jira] Updated: (MYFACES-1681) UIComponent.getAttributes() too restrictive

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

Matthias Weßendorf updated MYFACES-1681:
----------------------------------------

    Status: Patch Available  (was: Open)

> UIComponent.getAttributes() too restrictive
> -------------------------------------------
>
>                 Key: MYFACES-1681
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1681
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions:  1.2.0
>         Environment: SE 1.6.0_02
> GlassFish V2 admingui
>            Reporter: Ryan Lubke
>         Attachments: MYFACES-1681.patch
>
>
> The Map returned by UIComponent.getAttributes() is too restrictive with respect
> to null values.
> MyFaces will always throw an NPE for a null value.  Granted, the following is
> in the javadocs:
>  * Any attempt to add a null key or value must throw a NullPointerException.
> However, the following is also in the same section:
>  * put() - If the property is writeable, call the setter method to set the corresponding value (unwrapping primitive values in their    
>    corresponding wrapper classes). If the property is not writeable, or an attempt is made to set a property of primitive type to null, throw 
>    IllegalArgumentException.
> Notice the comment about setting a primitive property to null.  This implies that a null value for this case
> is legal.  The RI will only throw the NPE against a null value *if* there isn't an associated property.

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


[jira] Reopened: (MYFACES-1681) UIComponent.getAttributes() too restrictive

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

Matthias Weßendorf reopened MYFACES-1681:
-----------------------------------------


true for 1.1.x as well

> UIComponent.getAttributes() too restrictive
> -------------------------------------------
>
>                 Key: MYFACES-1681
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1681
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions: 1.1.5,  1.2.0
>         Environment: SE 1.6.0_02
> GlassFish V2 admingui
>            Reporter: Ryan Lubke
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.1-SNAPSHOT
>
>         Attachments: MYFACES-1681.patch
>
>
> The Map returned by UIComponent.getAttributes() is too restrictive with respect
> to null values.
> MyFaces will always throw an NPE for a null value.  Granted, the following is
> in the javadocs:
>  * Any attempt to add a null key or value must throw a NullPointerException.
> However, the following is also in the same section:
>  * put() - If the property is writeable, call the setter method to set the corresponding value (unwrapping primitive values in their    
>    corresponding wrapper classes). If the property is not writeable, or an attempt is made to set a property of primitive type to null, throw 
>    IllegalArgumentException.
> Notice the comment about setting a primitive property to null.  This implies that a null value for this case
> is legal.  The RI will only throw the NPE against a null value *if* there isn't an associated property.

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


[jira] Resolved: (MYFACES-1681) UIComponent.getAttributes() too restrictive

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

Matthias Weßendorf resolved MYFACES-1681.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s:  1.1.6-SNAPSHOT

> UIComponent.getAttributes() too restrictive
> -------------------------------------------
>
>                 Key: MYFACES-1681
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1681
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions: 1.1.5,  1.2.0
>         Environment: SE 1.6.0_02
> GlassFish V2 admingui
>            Reporter: Ryan Lubke
>            Assignee: Matthias Weßendorf
>             Fix For:  1.1.6-SNAPSHOT, 1.2.1-SNAPSHOT
>
>         Attachments: MYFACES-1681.patch
>
>
> The Map returned by UIComponent.getAttributes() is too restrictive with respect
> to null values.
> MyFaces will always throw an NPE for a null value.  Granted, the following is
> in the javadocs:
>  * Any attempt to add a null key or value must throw a NullPointerException.
> However, the following is also in the same section:
>  * put() - If the property is writeable, call the setter method to set the corresponding value (unwrapping primitive values in their    
>    corresponding wrapper classes). If the property is not writeable, or an attempt is made to set a property of primitive type to null, throw 
>    IllegalArgumentException.
> Notice the comment about setting a primitive property to null.  This implies that a null value for this case
> is legal.  The RI will only throw the NPE against a null value *if* there isn't an associated property.

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


[jira] Updated: (MYFACES-1681) UIComponent.getAttributes() too restrictive

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

Matthias Weßendorf updated MYFACES-1681:
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.1-SNAPSHOT
           Status: Resolved  (was: Patch Available)

Hey Ryan,

thanks for pointing this out.
This is 100% same code as in MyFaces 1.1.x.
So should we address this in JSF 1.1 as well ?

> UIComponent.getAttributes() too restrictive
> -------------------------------------------
>
>                 Key: MYFACES-1681
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1681
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions:  1.2.0
>         Environment: SE 1.6.0_02
> GlassFish V2 admingui
>            Reporter: Ryan Lubke
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.1-SNAPSHOT
>
>         Attachments: MYFACES-1681.patch
>
>
> The Map returned by UIComponent.getAttributes() is too restrictive with respect
> to null values.
> MyFaces will always throw an NPE for a null value.  Granted, the following is
> in the javadocs:
>  * Any attempt to add a null key or value must throw a NullPointerException.
> However, the following is also in the same section:
>  * put() - If the property is writeable, call the setter method to set the corresponding value (unwrapping primitive values in their    
>    corresponding wrapper classes). If the property is not writeable, or an attempt is made to set a property of primitive type to null, throw 
>    IllegalArgumentException.
> Notice the comment about setting a primitive property to null.  This implies that a null value for this case
> is legal.  The RI will only throw the NPE against a null value *if* there isn't an associated property.

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


[jira] Commented: (MYFACES-1681) UIComponent.getAttributes() too restrictive

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

Ryan Lubke commented on MYFACES-1681:
-------------------------------------

Right now both implementations pass the TCK, but this is only because of how the test was written.
I'm pretty sure if this change is made, the TCK will continue to pass.



> UIComponent.getAttributes() too restrictive
> -------------------------------------------
>
>                 Key: MYFACES-1681
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1681
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions: 1.1.5,  1.2.0
>         Environment: SE 1.6.0_02
> GlassFish V2 admingui
>            Reporter: Ryan Lubke
>            Assignee: Matthias Weßendorf
>             Fix For:  1.1.6-SNAPSHOT, 1.2.1-SNAPSHOT
>
>         Attachments: MYFACES-1681.patch
>
>
> The Map returned by UIComponent.getAttributes() is too restrictive with respect
> to null values.
> MyFaces will always throw an NPE for a null value.  Granted, the following is
> in the javadocs:
>  * Any attempt to add a null key or value must throw a NullPointerException.
> However, the following is also in the same section:
>  * put() - If the property is writeable, call the setter method to set the corresponding value (unwrapping primitive values in their    
>    corresponding wrapper classes). If the property is not writeable, or an attempt is made to set a property of primitive type to null, throw 
>    IllegalArgumentException.
> Notice the comment about setting a primitive property to null.  This implies that a null value for this case
> is legal.  The RI will only throw the NPE against a null value *if* there isn't an associated property.

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


[jira] Commented: (MYFACES-1681) UICompone

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

Ryan Lubke commented on MYFACES-1681:
-------------------------------------

Also, I plan on logging a request against the spec to clarifiy the javadocs.

> UICompone
> ---------
>
>                 Key: MYFACES-1681
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1681
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-252
>    Affects Versions:  1.2.0
>         Environment: SE 1.6.0_02
> GlassFish V2 admingui
>            Reporter: Ryan Lubke
>
> The Map returned by UIComponent.getAttributes() is too restrictive with respect
> to null values.
> MyFaces will always throw an NPE for a null value.  Granted, the following is
> in the javadocs:
>  * Any attempt to add a null key or value must throw a NullPointerException.
> However, the following is also in the same section:
>  * put() - If the property is writeable, call the setter method to set the corresponding value (unwrapping primitive values in their    
>    corresponding wrapper classes). If the property is not writeable, or an attempt is made to set a property of primitive type to null, throw 
>    IllegalArgumentException.
> Notice the comment about setting a primitive property to null.  This implies that a null value for this case
> is legal.  The RI will only throw the NPE against a null value *if* there isn't an associated property.

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