[ 
https://issues.apache.org/jira/browse/SLING-11525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17578083#comment-17578083
 ] 

Eric Norman edited comment on SLING-11525 at 8/10/22 5:50 PM:
--------------------------------------------------------------

[~cziegeler] -I don't think that the local RequestParameterImpl is the only 
reason for the narrow version range.  I believe bnd will calculate that narrow 
range for any reference to package that contains a ProviderType, so the other 
references to the RequestParameter interface would cause the narrow version 
range as well even if there was no impl of the interface.-

{color:#de350b}UPDATE: correction of the above statement, I was looking at the 
wrong output jar file.  It does appear that bnd does not do what I stated 
above.  So the solution below does result in a "[2.7,3)" version range for the 
package.{color}

 

Regarding the local impl of RequestParameter, perhaps a better long term 
approach would be to add a newRequestParameter factory method to the 
[Builders|https://github.com/apache/sling-org-apache-sling-api/blob/master/src/main/java/org/apache/sling/api/request/builder/Builders.java]
 class from sling.api so the duplicated RequestParameterImpl class can be 
removed here and use the factory instead.  Any objections to that?


was (Author: enorman):
[~cziegeler] -I don't think that the local RequestParameterImpl is the only 
reason for the narrow version range.  I believe bnd will calculate that narrow 
range for any reference to package that contains a ProviderType, so the other 
references to the RequestParameter interface would cause the narrow version 
range as well even if there was no impl of the interface.-

{color:#de350b}UPDATE: correction of the above statement, I was looking at the 
wrong outputjar file.  It does appears bnd does not do what I stated above.  So 
the solution below does result in a "[2.7,3)" version range for the 
package.{color}

 

Regarding the local impl of RequestParameter, perhaps a better long term 
approach would be to add a newRequestParameter factory method to the 
[Builders|https://github.com/apache/sling-org-apache-sling-api/blob/master/src/main/java/org/apache/sling/api/request/builder/Builders.java]
 class from sling.api so the duplicated RequestParameterImpl class can be 
removed here and use the factory instead.  Any objections to that?

> Update dependency for sling.api v2.26.0 compatibility
> -----------------------------------------------------
>
>                 Key: SLING-11525
>                 URL: https://issues.apache.org/jira/browse/SLING-11525
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Eric Norman
>            Assignee: Eric Norman
>            Priority: Major
>             Fix For: JCR Jackrabbit User Manager 2.2.24
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Update dependency for compatibility with  sling.api v2.26.0
> Resolves this error:
> {code:java}
> [ERROR] [bundle-packages] 
> org.apache.sling:org.apache.sling.jcr.jackrabbit.usermanager:2.2.22: Bundle 
> is importing package org.apache.sling.api.request;version=[2.6,2.7) with 
> start order 20 but no bundle is exporting these for that start order in the 
> required version range.{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to