You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2021/05/30 19:30:00 UTC

[jira] [Commented] (IO-734) The OSGi manifest now contains sun.* packages in the Import-Package instruction

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

Gary D. Gregory commented on IO-734:
------------------------------------

PRs welcome on GitHub.

> The OSGi manifest now contains sun.* packages in the Import-Package instruction
> -------------------------------------------------------------------------------
>
>                 Key: IO-734
>                 URL: https://issues.apache.org/jira/browse/IO-734
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Eric Norman
>            Priority: Major
>
> After attempting to upgrade to commons-io:2.9.0 for apache sling I see that there are now required imports for some sun.* packages in the OSGi manifest.  These references appear to be coming from a new BufferedFileChannelInputStream class in version 2.9.0.
> This results in an error for OSGi environments where those packages are not exposed anywhere.
> Specifically this error:
>  
> {noformat}
> commons-io:commons-io:2.9.0: is importing package(s) [sun.nio.ch, sun.misc] in start level 5 but no bundle is exporting these for that start level. 
> {noformat}
> It would be best if commons-io was not using sun.* packages, but if you must reference those then perhaps those imported packages could be marked optional in the manifest so the commons-io OSGi bundle will not fail to activate when those are not available?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)