[ 
https://issues.apache.org/jira/browse/FELIX-3514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Watson updated FELIX-3514:
---------------------------------

    Attachment: 3514.txt

Updated patch.  The previous patch did not correctly check for uses constraint 
violations for dynamic imports.  There were two issues.  
- First the call to checkPackageSpaceConsistency was not passing "true" to 
indicate this was a dynamic import resolution.  This made the check consistency 
call to return quickly without doing any checks for an already resolved bundle.

- Once I enabled this (by passing "true") I ran into another issue when 
permuting over the solution set based on the Blame objects found.  We are 
wrapping all dynamic imports for already existing dynamic import wires.  These 
wires add their own Blame objects with wrapped requirements.  The issue is we 
try to permute such Blames when in reality they cannot be permuted because the 
existing wires cannot modified.  At runtime this results in an NPE when we 
attempt to permute such blamed requirements because the Candidates object does 
not actually contain the wrapped requirement.  For now I just added some null 
checks because we seem to do that in other places where a call to 
Candidates.getCandidates(Requirement) is called.  But I am not sure if that is 
the correct solution or not.  Richard, what do you recommend here?
                
> Enable support for dynamic import
> ---------------------------------
>
>                 Key: FELIX-3514
>                 URL: https://issues.apache.org/jira/browse/FELIX-3514
>             Project: Felix
>          Issue Type: Bug
>          Components: Resolver
>         Environment: All
>            Reporter: Thomas Watson
>         Attachments: 3514.txt
>
>
> The OSGi R5 Resolver API does not provide a way to (easily) resolve dynamic 
> imports.  This is important if the resolver is to be used at runtime.  The 
> current resolver implementation has a bit of disabled code commented out that 
> could be used to implement this.  I will attach a patch that enables a new 
> method on ResolverImpl to enable dynamic resolution.

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

        

Reply via email to