Dear,

I'm getting the following exception when trying to install a subsystem:
GenericDirective cannot be cast to VersionRangeAttribute

This exception is thrown when trying to parse the following
Import-Package header:

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

The exception is thrown at line 155 of the ImportPackageHeader class:
return (VersionRangeAttribute)myParameters.get(Constants.VERSION_ATTRIBUTE);

The reason for the wrong class is that the ParameterFactory class
cannot handle the ':=' in the specification of the version. It only
works for a single '=' without a colon:
if (symbol.equals("=")) {
   return AttributeFactory.createAttribute(name, value);
}

Should I log a bug for this behaviour?

Best regards,
Wouter Bancken

Reply via email to