Make import to internal sun classes and the annotations optional #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
the sun.* classes are internal depending on the jvm settings especially the 'sun.nio.ch', this currently makes the lib unusable in its provided form without special configuration.
As the sun.nio.ch is actually optional (it is only used after instanceof checks) it could be marked optional import in the manifest so it is sued whenever the jvm provides the package and otherwise will not be used at all.
Also the annotations import is actually optional as the code does not reference it anywhere except as an annotation on methods/classes so the absence will just make the annotations invisible on runtime if not provided.
Beside that, it is actually a split package and therefore needs to mention the bundle it wants to import the package from.
This changes all sun.* packages to optional as well as the javax.annotation package and additionally mentions the bundle it wants to import the annotations from.
The (shortened) resulting manifest looks like this: