Mark sun.nio.ch as optional
Motivation: If sun.nio.ch is not optional this will cause troubles in the OSGi world. The package is not exposed by default in OSGi, so actually the whole netty framework cannot be used directly. There are workarounds, but workarounds are ugly. Especially since the use of sun.nio.ch is optional. So the requirement on the package should be optional as well. Modifications: Make the import of sun.nio.ch optional. Result: If the package cannot be imported it will behave as if the package sun.nio.ch is not present (like with other JVMs). If the package is exposed in OSGi (e.g. bootclassloader delegation, extension fragment) it will be used.
This commit is contained in:
parent
1a8a2cac13
commit
b88c7d6f9a
2
pom.xml
2
pom.xml
@ -511,7 +511,7 @@
|
||||
<instructions>
|
||||
<Export-Package>${project.groupId}.*</Export-Package>
|
||||
<!-- enforce JVM vendor package as optional -->
|
||||
<Import-Package>sun.misc.*;resolution:=optional,*</Import-Package>
|
||||
<Import-Package>sun.misc.*;resolution:=optional,sun.nio.ch;resolution:=optional,*</Import-Package>
|
||||
<!-- override "internal" private package convention -->
|
||||
<Private-Package>!*</Private-Package>
|
||||
</instructions>
|
||||
|
Loading…
Reference in New Issue
Block a user