{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/7768","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/7768/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/7768/comments","events_url":"https://api.github.com/repos/netty/netty/issues/7768/events","html_url":"https://github.com/netty/netty/issues/7768","id":302062409,"number":7768,"title":"Running tests in java 9 causes jdk.internal.misc.Unsafe exception.","user":{"login":"Bhashinee","id":11239305,"avatar_url":"https://avatars1.githubusercontent.com/u/11239305?v=4","gravatar_id":"","url":"https://api.github.com/users/Bhashinee","html_url":"https://github.com/Bhashinee","followers_url":"https://api.github.com/users/Bhashinee/followers","following_url":"https://api.github.com/users/Bhashinee/following{/other_user}","gists_url":"https://api.github.com/users/Bhashinee/gists{/gist_id}","starred_url":"https://api.github.com/users/Bhashinee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bhashinee/subscriptions","organizations_url":"https://api.github.com/users/Bhashinee/orgs","repos_url":"https://api.github.com/users/Bhashinee/repos","events_url":"https://api.github.com/users/Bhashinee/events{/privacy}","received_events_url":"https://api.github.com/users/Bhashinee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-04T06:46:31Z","updated_at":"2018-03-04T13:24:37Z","closed_at":null,"author_association":"NONE","body":"We have used netty 4.1.19.Final version in our project. We recently moved to java 9. We have a test which uses netty's DefaultChannelGroup.\r\n\r\n`ChannelGroup allChannels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE)`\r\n\r\nWhen running that test case we get the following error,\r\n\r\n```\r\n[io.netty.util.internal.PlatformDependent0] : jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable\r\njava.lang.IllegalAccessException: class io.netty.util.internal.PlatformDependent0$6 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @36ebc363\r\n\tat java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)\r\n\tat java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:589)\r\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:556)\r\n\tat io.netty.util.internal.PlatformDependent0$6.run(PlatformDependent0.java:312)\r\n\tat java.base/java.security.AccessController.doPrivileged(Native Method)\r\n\tat io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:303)\r\n\tat io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:208)\r\n\tat io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:79)\r\n\tat io.netty.util.ConstantPool.<init>(ConstantPool.java:32)\r\n\tat io.netty.util.Signal$1.<init>(Signal.java:27)\r\n\tat io.netty.util.Signal.<clinit>(Signal.java:27)\r\n\tat io.netty.util.concurrent.DefaultPromise.<clinit>(DefaultPromise.java:43)WARNING: An illegal reflective access operation has occurred\r\n\tat io.netty.util.concurrent.GlobalEventExecutor.<init>(GlobalEventExecutor.java:44)\r\n\tat io.netty.util.concurrent.GlobalEventExecutor.<clinit>(GlobalEventExecutor.java:41)\r\n\r\n\r\n```\r\n\r\n### Steps to reproduce\r\n\r\nAdd following line in a main method and run in java 9.\r\n\r\n```\r\n public static void main(String[] args) {\r\n       Object exec = GlobalEventExecutor.INSTANCE;\r\n    }\r\n```\r\n\r\n### Netty version\r\n4.1.19.Final\r\n\r\n### JVM version (e.g. `java -version`)\r\njava version \"9.0.4\"\r\nJava(TM) SE Runtime Environment (build 9.0.4+11)\r\nJava HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)\r\n\r\n### OS version (e.g. `uname -a`)\r\n16.04.1-Ubuntu"},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/370229188","html_url":"https://github.com/netty/netty/issues/7768#issuecomment-370229188","issue_url":"https://api.github.com/repos/netty/netty/issues/7768","id":370229188,"user":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars3.githubusercontent.com/u/439362?v=4","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"created_at":"2018-03-04T13:24:37Z","updated_at":"2018-03-04T13:24:37Z","author_association":"OWNER","body":"Upgrade to latest Netty version as it was fixed there"}}
{"actor":{"display_login":"normanmaurer"}}