Wouter Bancken created ARIES-1381:
-------------------------------------

             Summary: ClassCastException when parsing custom version directive 
in an Import-Package header
                 Key: ARIES-1381
                 URL: https://issues.apache.org/jira/browse/ARIES-1381
             Project: Aries
          Issue Type: Bug
          Components: Subsystem
    Affects Versions: subsystem-2.0.2
            Reporter: Wouter Bancken
            Priority: Minor


Example:
Import-Package: 
org.objectweb.asm;version:="5.0.4,5.0.4]",org.objectweb.asm.signature;version:="[5.0.4,5.0.4]",org.objectweb.asm.tree;version:="[5.0.4,5.0.4]"

This Import-Package header will cause a "GenericDirective cannot be cast to 
VersionRangeAttribute" error thrown by the ImportPackageHeader class. 

This is caused by the fact that the custom version directive is interpreted as 
the version attribute by the getVersionRangeAttribute method. 

What should have happened is: 
1. The subsystem install should have succeeded.
2. The version should have been treated as a custom directive.
3. The actual package import versions would assume the default of 
[0.0.0,infinity) since a version attribute was not specified.

Link to mailinglist discussion: 
http://mail-archives.apache.org/mod_mbox/aries-user/201508.mbox/%3CCAL5nZgTwUpc05MY4mWNL3D8-2g13u2it6kYd6JG_ueZNWKJOjA%40mail.gmail.com%3E



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to