Skip to content

Specify optional dependency on sun.misc.Unsafe #1999

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gson/bnd.bnd
Original file line number Diff line number Diff line change
@@ -6,6 +6,10 @@ Bundle-ContactAddress: ${project.parent.url}
Bundle-RequiredExecutionEnvironment: JavaSE-1.6, JavaSE-1.7, JavaSE-1.8
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))"

# Optional dependency for JDK's sun.misc.Unsafe
# https://bnd.bndtools.org/chapters/920-faq.html#remove-unwanted-imports-
Import-Package: sun.misc;resolution:=optional, *

-removeheaders: Private-Package

-exportcontents:\
3 changes: 3 additions & 0 deletions gson/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -10,4 +10,7 @@

// Optional dependency on java.sql
requires static java.sql;

// Optional dependency on jdk.unsupported for JDK's sun.misc.Unsafe
requires static jdk.unsupported;
}