You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "James Phillpotts (Created) (JIRA)" <ji...@apache.org> on 2012/01/12 13:09:39 UTC

[jira] [Created] (CXF-4027) Aegis BeanType does not ignore super type of java.lang.Enum

Aegis BeanType does not ignore super type of java.lang.Enum
-----------------------------------------------------------

                 Key: CXF-4027
                 URL: https://issues.apache.org/jira/browse/CXF-4027
             Project: CXF
          Issue Type: Bug
          Components: Aegis Databinding
    Affects Versions: 2.5.1
            Reporter: James Phillpotts


When using aegis combined with a mapping file on an enum type, aegis ends up trying to create a type for java.lang.Enum, and falls over with an NPE in the process.

It seems to me that when getting the super type in BeanType.getSuperType(), there are some other classes that should be excluded (line 584), java.lang.Enum and java.io.Serializable (the latter may be the super type if the current type is an interface that extends it).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4027) Aegis BeanType does not ignore super type of java.lang.Enum

Posted by "Benson Margulies (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185651#comment-13185651 ] 

Benson Margulies commented on CXF-4027:
---------------------------------------

Yes, that makes sense.
                
> Aegis BeanType does not ignore super type of java.lang.Enum
> -----------------------------------------------------------
>
>                 Key: CXF-4027
>                 URL: https://issues.apache.org/jira/browse/CXF-4027
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.5.1
>            Reporter: James Phillpotts
>
> When using aegis combined with a mapping file on an enum type, aegis ends up trying to create a type for java.lang.Enum, and falls over with an NPE in the process.
> It seems to me that when getting the super type in BeanType.getSuperType(), there are some other classes that should be excluded (line 584), java.lang.Enum and java.io.Serializable (the latter may be the super type if the current type is an interface that extends it).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-4027) Aegis BeanType does not ignore super type of java.lang.Enum

Posted by "James Phillpotts (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Phillpotts updated CXF-4027:
----------------------------------

    Attachment: CXF-4027.patch

Patch attached.
                
> Aegis BeanType does not ignore super type of java.lang.Enum
> -----------------------------------------------------------
>
>                 Key: CXF-4027
>                 URL: https://issues.apache.org/jira/browse/CXF-4027
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.5.1
>            Reporter: James Phillpotts
>         Attachments: CXF-4027.patch
>
>
> When using aegis combined with a mapping file on an enum type, aegis ends up trying to create a type for java.lang.Enum, and falls over with an NPE in the process.
> It seems to me that when getting the super type in BeanType.getSuperType(), there are some other classes that should be excluded (line 584), java.lang.Enum and java.io.Serializable (the latter may be the super type if the current type is an interface that extends it).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4027) Aegis BeanType does not ignore super type of java.lang.Enum

Posted by "James Phillpotts (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185641#comment-13185641 ] 

James Phillpotts commented on CXF-4027:
---------------------------------------

Yeah, I wasn't happy about full packages. How about doing Enum, Serializable and Cloneable? The former as the superclass for enum classes, the latter two because they're often used and likely to be extended by many interfaces.

The particular problem I'm facing with Serializable is that we have all our interfaces extending it (so that resultant implementations are serializable), so we get a namespace, http://io.java with a single type, tns:Serializable, in it, because of the first if statement in BeanType.getSuperType().
                
> Aegis BeanType does not ignore super type of java.lang.Enum
> -----------------------------------------------------------
>
>                 Key: CXF-4027
>                 URL: https://issues.apache.org/jira/browse/CXF-4027
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.5.1
>            Reporter: James Phillpotts
>
> When using aegis combined with a mapping file on an enum type, aegis ends up trying to create a type for java.lang.Enum, and falls over with an NPE in the process.
> It seems to me that when getting the super type in BeanType.getSuperType(), there are some other classes that should be excluded (line 584), java.lang.Enum and java.io.Serializable (the latter may be the super type if the current type is an interface that extends it).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-4027) Aegis BeanType does not ignore super type of java.lang.Enum

Posted by "Daniel Kulp (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CXF-4027:
-----------------------------

    Fix Version/s: 2.3.9
    
> Aegis BeanType does not ignore super type of java.lang.Enum
> -----------------------------------------------------------
>
>                 Key: CXF-4027
>                 URL: https://issues.apache.org/jira/browse/CXF-4027
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.5.1
>            Reporter: James Phillpotts
>            Assignee: Daniel Kulp
>             Fix For: 2.3.9, 2.4.6, 2.5.2
>
>         Attachments: CXF-4027.patch
>
>
> When using aegis combined with a mapping file on an enum type, aegis ends up trying to create a type for java.lang.Enum, and falls over with an NPE in the process.
> It seems to me that when getting the super type in BeanType.getSuperType(), there are some other classes that should be excluded (line 584), java.lang.Enum and java.io.Serializable (the latter may be the super type if the current type is an interface that extends it).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4027) Aegis BeanType does not ignore super type of java.lang.Enum

Posted by "Benson Margulies (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13184975#comment-13184975 ] 

Benson Margulies commented on CXF-4027:
---------------------------------------

Please consider yourself encouraged to submit a patch. If you need help, let me know. If you're not so inclined, someone will get around to this presently.

                
> Aegis BeanType does not ignore super type of java.lang.Enum
> -----------------------------------------------------------
>
>                 Key: CXF-4027
>                 URL: https://issues.apache.org/jira/browse/CXF-4027
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.5.1
>            Reporter: James Phillpotts
>
> When using aegis combined with a mapping file on an enum type, aegis ends up trying to create a type for java.lang.Enum, and falls over with an NPE in the process.
> It seems to me that when getting the super type in BeanType.getSuperType(), there are some other classes that should be excluded (line 584), java.lang.Enum and java.io.Serializable (the latter may be the super type if the current type is an interface that extends it).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4027) Aegis BeanType does not ignore super type of java.lang.Enum

Posted by "James Phillpotts (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13184980#comment-13184980 ] 

James Phillpotts commented on CXF-4027:
---------------------------------------

Hi Benson,

I thought about it :)

The reason I didn't was I started to wonder whether in fact all super types that are in either package java.lang or java.io should be excluded? I thought I'd better leave that sort of decision to someone that knows a bit more.
                
> Aegis BeanType does not ignore super type of java.lang.Enum
> -----------------------------------------------------------
>
>                 Key: CXF-4027
>                 URL: https://issues.apache.org/jira/browse/CXF-4027
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.5.1
>            Reporter: James Phillpotts
>
> When using aegis combined with a mapping file on an enum type, aegis ends up trying to create a type for java.lang.Enum, and falls over with an NPE in the process.
> It seems to me that when getting the super type in BeanType.getSuperType(), there are some other classes that should be excluded (line 584), java.lang.Enum and java.io.Serializable (the latter may be the super type if the current type is an interface that extends it).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-4027) Aegis BeanType does not ignore super type of java.lang.Enum

Posted by "Daniel Kulp (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-4027.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.5.2
                   2.4.6
         Assignee: Daniel Kulp

Patch applied
                
> Aegis BeanType does not ignore super type of java.lang.Enum
> -----------------------------------------------------------
>
>                 Key: CXF-4027
>                 URL: https://issues.apache.org/jira/browse/CXF-4027
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.5.1
>            Reporter: James Phillpotts
>            Assignee: Daniel Kulp
>             Fix For: 2.4.6, 2.5.2
>
>         Attachments: CXF-4027.patch
>
>
> When using aegis combined with a mapping file on an enum type, aegis ends up trying to create a type for java.lang.Enum, and falls over with an NPE in the process.
> It seems to me that when getting the super type in BeanType.getSuperType(), there are some other classes that should be excluded (line 584), java.lang.Enum and java.io.Serializable (the latter may be the super type if the current type is an interface that extends it).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4027) Aegis BeanType does not ignore super type of java.lang.Enum

Posted by "Benson Margulies (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185629#comment-13185629 ] 

Benson Margulies commented on CXF-4027:
---------------------------------------

I'd just do enum. I think that the full packages contain a mixture of good things and bad things in this regard.
                
> Aegis BeanType does not ignore super type of java.lang.Enum
> -----------------------------------------------------------
>
>                 Key: CXF-4027
>                 URL: https://issues.apache.org/jira/browse/CXF-4027
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.5.1
>            Reporter: James Phillpotts
>
> When using aegis combined with a mapping file on an enum type, aegis ends up trying to create a type for java.lang.Enum, and falls over with an NPE in the process.
> It seems to me that when getting the super type in BeanType.getSuperType(), there are some other classes that should be excluded (line 584), java.lang.Enum and java.io.Serializable (the latter may be the super type if the current type is an interface that extends it).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira