You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Ancoron Luciferis (JIRA)" <ji...@apache.org> on 2012/07/12 01:03:34 UTC

[jira] [Created] (FELIX-3593) ClassCastException when using short-cut notation inside array value annotations

Ancoron Luciferis created FELIX-3593:
----------------------------------------

             Summary: ClassCastException when using short-cut notation inside array value annotations
                 Key: FELIX-3593
                 URL: https://issues.apache.org/jira/browse/FELIX-3593
             Project: Felix
          Issue Type: Bug
          Components: SCR Annotations
    Affects Versions: scr annotations 1.6.0
            Reporter: Ancoron Luciferis


When using a short-cut notation for a array-value annotation to specify only a single value the SCR plugin fails to handle it.

Example:
@Properties(@Property(name = "failover", boolValue = true))

Result:
java.lang.ClassCastException: com.thoughtworks.qdox.model.Annotation cannot be cast to java.util.List
        at org.apache.felix.scrplugin.tags.annotation.defaulttag.DefaultAnnotationTagProvider.getTags(DefaultAnnotationTagProvider.java:58)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:159)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:141)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationJavaClassDescription.getTagsByName(AnnotationJavaClassDescription.java:74)
        at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:253)
        at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:192)


--
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] (FELIX-3593) ClassCastException when using short-cut notation inside array value annotations

Posted by "Ancoron Luciferis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ancoron Luciferis updated FELIX-3593:
-------------------------------------

    Attachment: scr-annotations-shortcut.patch

Attached a patch that fixes the problem (at least for the default tags): [^scr-annotations-shortcut.patch]
                
> ClassCastException when using short-cut notation inside array value annotations
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-3593
>                 URL: https://issues.apache.org/jira/browse/FELIX-3593
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr annotations 1.6.0
>            Reporter: Ancoron Luciferis
>              Labels: patch
>         Attachments: scr-annotations-shortcut.patch
>
>
> When using a short-cut notation for a array-value annotation to specify only a single value the SCR plugin fails to handle it.
> Example:
> @Properties(@Property(name = "failover", boolValue = true))
> Result:
> java.lang.ClassCastException: com.thoughtworks.qdox.model.Annotation cannot be cast to java.util.List
>         at org.apache.felix.scrplugin.tags.annotation.defaulttag.DefaultAnnotationTagProvider.getTags(DefaultAnnotationTagProvider.java:58)
>         at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:159)
>         at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:141)
>         at org.apache.felix.scrplugin.tags.annotation.AnnotationJavaClassDescription.getTagsByName(AnnotationJavaClassDescription.java:74)
>         at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:253)
>         at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:192)

--
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] [Closed] (FELIX-3593) ClassCastException when using short-cut notation inside array value annotations

Posted by "Ancoron Luciferis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ancoron Luciferis closed FELIX-3593.
------------------------------------

       Resolution: Fixed
    Fix Version/s: scr annotations 1.7.0

Ah, didn't notice the refactoring work with FELIX-3550.

With the new implementation everything works as expected. Thanx. :-)
                
> ClassCastException when using short-cut notation inside array value annotations
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-3593
>                 URL: https://issues.apache.org/jira/browse/FELIX-3593
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr annotations 1.6.0
>            Reporter: Ancoron Luciferis
>              Labels: patch
>             Fix For: scr annotations 1.7.0
>
>         Attachments: scr-annotations-shortcut.patch
>
>
> When using a short-cut notation for a array-value annotation to specify only a single value the SCR plugin fails to handle it.
> Example:
> @Properties(@Property(name = "failover", boolValue = true))
> Result:
> java.lang.ClassCastException: com.thoughtworks.qdox.model.Annotation cannot be cast to java.util.List
>         at org.apache.felix.scrplugin.tags.annotation.defaulttag.DefaultAnnotationTagProvider.getTags(DefaultAnnotationTagProvider.java:58)
>         at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:159)
>         at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:141)
>         at org.apache.felix.scrplugin.tags.annotation.AnnotationJavaClassDescription.getTagsByName(AnnotationJavaClassDescription.java:74)
>         at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:253)
>         at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:192)

--
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] (FELIX-3593) ClassCastException when using short-cut notation inside array value annotations

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432913#comment-13432913 ] 

Carsten Ziegeler commented on FELIX-3593:
-----------------------------------------

Hi Ancoron, could you please try the latest version from svn?
                
> ClassCastException when using short-cut notation inside array value annotations
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-3593
>                 URL: https://issues.apache.org/jira/browse/FELIX-3593
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Annotations
>    Affects Versions: scr annotations 1.6.0
>            Reporter: Ancoron Luciferis
>              Labels: patch
>         Attachments: scr-annotations-shortcut.patch
>
>
> When using a short-cut notation for a array-value annotation to specify only a single value the SCR plugin fails to handle it.
> Example:
> @Properties(@Property(name = "failover", boolValue = true))
> Result:
> java.lang.ClassCastException: com.thoughtworks.qdox.model.Annotation cannot be cast to java.util.List
>         at org.apache.felix.scrplugin.tags.annotation.defaulttag.DefaultAnnotationTagProvider.getTags(DefaultAnnotationTagProvider.java:58)
>         at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:159)
>         at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:141)
>         at org.apache.felix.scrplugin.tags.annotation.AnnotationJavaClassDescription.getTagsByName(AnnotationJavaClassDescription.java:74)
>         at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:253)
>         at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:192)

--
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