Skip to content

Commit

Permalink
Add "add-opens" for java.io for Java 9+
Browse files Browse the repository at this point in the history
Suppresses the following warnings when using Basic UI on Java 9+

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.gson.internal.bind.ReflectiveTypeAdapterFactory (file:/openhab/userdata/cache/org.eclipse.osgi/20/0/bundleFile) to field java.io.ByteArrayOutputStream.buf
WARNING: Please consider reporting this to the maintainers of com.google.gson.internal.bind.ReflectiveTypeAdapterFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Related to openhab#768

Signed-off-by: Wouter Born <[email protected]>
  • Loading branch information
wborn committed Nov 11, 2019
1 parent 91d00dc commit 5494c00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions distributions/openhab/src/main/resources/bin/karaf
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ run() {
--add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.naming/javax.naming.spi=ALL-UNNAMED \
--add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED \
--add-opens java.base/java.io=ALL-UNNAMED \
--add-opens java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens java.base/java.text=ALL-UNNAMED \
--add-opens java.desktop/java.awt.font=ALL-UNNAMED \
Expand Down
1 change: 1 addition & 0 deletions distributions/openhab/src/main/resources/bin/karaf.bat
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ if "%KARAF_PROFILER%" == "" goto :RUN
--add-opens java.base/java.util=ALL-UNNAMED ^
--add-opens java.naming/javax.naming.spi=ALL-UNNAMED ^
--add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED ^
--add-opens java.base/java.io=ALL-UNNAMED ^
--add-opens java.base/java.lang.reflect=ALL-UNNAMED ^
--add-opens java.base/java.text=ALL-UNNAMED ^
--add-opens java.desktop/java.awt.font=ALL-UNNAMED ^
Expand Down

0 comments on commit 5494c00

Please sign in to comment.