{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3102","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3102/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3102/comments","events_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3102/events","html_url":"https://github.com/ReactiveX/RxJava/issues/3102","id":96865276,"number":3102,"title":"UNSAFE used in multiple places without checking UnsafeAccess#isUnsafeAvailable","user":{"login":"yogurtearl","id":1195562,"avatar_url":"https://avatars.githubusercontent.com/u/1195562?v=3","gravatar_id":"","url":"https://api.github.com/users/yogurtearl","html_url":"https://github.com/yogurtearl","followers_url":"https://api.github.com/users/yogurtearl/followers","following_url":"https://api.github.com/users/yogurtearl/following{/other_user}","gists_url":"https://api.github.com/users/yogurtearl/gists{/gist_id}","starred_url":"https://api.github.com/users/yogurtearl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yogurtearl/subscriptions","organizations_url":"https://api.github.com/users/yogurtearl/orgs","repos_url":"https://api.github.com/users/yogurtearl/repos","events_url":"https://api.github.com/users/yogurtearl/events{/privacy}","received_events_url":"https://api.github.com/users/yogurtearl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-23T17:41:01Z","updated_at":"2015-07-23T17:44:37Z","closed_at":null,"body":"According to: \r\nhttps://github.com/ReactiveX/RxJava/blob/v1.0.13/src/main/java/rx/internal/util/unsafe/UnsafeAccess.java\r\n\r\n```\r\n/**\r\n * All use of this class MUST first check that UnsafeAccess.isUnsafeAvailable() == true\r\n * otherwise NPEs will happen in environments without \"suc.misc.Unsafe\" such as Android.\r\n */\r\n```\r\n\r\nbut there are a number of places where UNSAFE is accessed, but isUnsafeAvailable is not checked.\r\nThis means RxJava won't work if sun.misc.Unsafe is not available. \r\n\r\n( Although, it does seem to work fine on Android, because Android does have sun.misc.Unsafe )\r\n\r\nExamples of places with no isUnsafeAvailable check:\r\n\r\nConcurrentCircularArrayQueue\r\nSpmcArrayQueueConsumerField\r\nConcurrentSequencedCircularArrayQueue\r\nSpscArrayQueue\r\netc...\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ReactiveX/RxJava/issues/comments/124178335","html_url":"https://github.com/ReactiveX/RxJava/issues/3102#issuecomment-124178335","issue_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3102","id":124178335,"user":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars.githubusercontent.com/u/66577?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T17:44:37Z","updated_at":"2015-07-23T17:44:37Z","body":"Also, as has been made painfully public with annoyingly sensational blog articles over the last few weeks, Unsafe will be unaccessible on Java 9."}}