Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Specify optional dependency on sun.misc.Unsafe #1999

Closed
Closed
Show file tree
Hide file tree
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
Expand Up @@ -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:\
Expand Down
3 changes: 3 additions & 0 deletions gson/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}