{"action":"opened","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/2854","repository_url":"https://api.github.com/repos/realm/realm-java","labels_url":"https://api.github.com/repos/realm/realm-java/issues/2854/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/2854/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/2854/events","html_url":"https://github.com/realm/realm-java/issues/2854","id":156129615,"number":2854,"title":"Consider removing all empty deprecated methods to stop compilation. ","user":{"login":"diegomontoya","id":417764,"avatar_url":"https://avatars.githubusercontent.com/u/417764?v=3","gravatar_id":"","url":"https://api.github.com/users/diegomontoya","html_url":"https://github.com/diegomontoya","followers_url":"https://api.github.com/users/diegomontoya/followers","following_url":"https://api.github.com/users/diegomontoya/following{/other_user}","gists_url":"https://api.github.com/users/diegomontoya/gists{/gist_id}","starred_url":"https://api.github.com/users/diegomontoya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegomontoya/subscriptions","organizations_url":"https://api.github.com/users/diegomontoya/orgs","repos_url":"https://api.github.com/users/diegomontoya/repos","events_url":"https://api.github.com/users/diegomontoya/events{/privacy}","received_events_url":"https://api.github.com/users/diegomontoya/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-22T01:18:02Z","updated_at":"2016-05-22T01:18:02Z","closed_at":null,"body":"There have been lots of method renaming and reorganization between 0.87 and the current 0.91.0 release. However, the use of \"deprecation\" here I think is a mistake. It would be better to actually remove these empty/exception throwing methods all together. Depending on semantics of \"deprecation\". there is nothing wrong technically but also not very dev friendly. \r\n\r\n1) The deprecated methods triggers run-time exceptions, not compile time. \r\n2) There are ways to trigger compile time exceptions by changing deprecated api detection to error level but in android builds, there are real needs of using deprecated android apis so this is not a solution. \r\n3) Deprecation in lots of software means \"pending api death in future revision\" but \"workable\" state. Here, it just crashes. If a method is removed, why keep it? Personally speaking, I would rather have it stop in compilation stage so I can fix it rather than using code analysis to hunt down the deprecated usage which is much more time consuming. \r\n\r\n```java\r\n    /** @deprecated */\r\n    @Deprecated\r\n    public void clear() {\r\n        throw new UnsupportedOperationException(\"This method is not supported by RealmResults.\");\r\n    }\r\n```"}}
{"actor":{"display_login":"diegomontoya"}}