{"action":"opened","issue":{"url":"https://api.github.com/repos/kamikat/moshi-jsonapi/issues/13","repository_url":"https://api.github.com/repos/kamikat/moshi-jsonapi","labels_url":"https://api.github.com/repos/kamikat/moshi-jsonapi/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/kamikat/moshi-jsonapi/issues/13/comments","events_url":"https://api.github.com/repos/kamikat/moshi-jsonapi/issues/13/events","html_url":"https://github.com/kamikat/moshi-jsonapi/issues/13","id":175415941,"number":13,"title":"Cannot set public final static  field long io.zinda.domain.jsonapi.UserJson.serialVersionUID","user":{"login":"lukesleeman","id":902252,"avatar_url":"https://avatars.githubusercontent.com/u/902252?v=3","gravatar_id":"","url":"https://api.github.com/users/lukesleeman","html_url":"https://github.com/lukesleeman","followers_url":"https://api.github.com/users/lukesleeman/followers","following_url":"https://api.github.com/users/lukesleeman/following{/other_user}","gists_url":"https://api.github.com/users/lukesleeman/gists{/gist_id}","starred_url":"https://api.github.com/users/lukesleeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukesleeman/subscriptions","organizations_url":"https://api.github.com/users/lukesleeman/orgs","repos_url":"https://api.github.com/users/lukesleeman/repos","events_url":"https://api.github.com/users/lukesleeman/events{/privacy}","received_events_url":"https://api.github.com/users/lukesleeman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-07T05:28:49Z","updated_at":"2016-09-07T05:28:49Z","closed_at":null,"body":"I'm trying to de-serialise from json created by moshi-jsonapi and I am getting an exception:\r\n\r\n```\r\nCaused by: java.lang.IllegalAccessException: Cannot set public final static  field long io.zinda.domain.jsonapi.UserJson.serialVersionUID of class java.lang.Class<io.zinda.domain.jsonapi.UserJson>\r\n                      at java.lang.reflect.Field.set(Native Method)\r\n                      at moe.banana.jsonapi2.Resource$Binding.set(Resource.java:309)\r\n                      at moe.banana.jsonapi2.Resource$Adapter.fromJson(Resource.java:171) \r\n                      at moe.banana.jsonapi2.Resource$Adapter.fromJson(Resource.java:80) \r\n                      at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:33) \r\n                      at moe.banana.jsonapi2.ResourceAdapterFactory.polymorphicFromJson(ResourceAdapterFactory.java:117) \r\n                      at moe.banana.jsonapi2.ResourceAdapterFactory.access$300(ResourceAdapterFactory.java:13) \r\n                      at moe.banana.jsonapi2.ResourceAdapterFactory$Adapter.fromJson(ResourceAdapterFactory.java:162) \r\n                      at moe.banana.jsonapi2.ResourceAdapterFactory$Adapter.fromJson(ResourceAdapterFactory.java:129) \r\n                      at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:33) \r\n                      at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:37) \r\n```\r\n\r\nIt looks like the Resource.Adaper should be ignoreing static fields, but it should not.  Starting around line 96 of Resource.java we have:\r\n\r\n```\r\nif (Modifier.isTransient(modifiers)) {\r\n    continue;\r\n}\r\n```\r\n\r\nIt should probably read:\r\n```\r\nif (Modifier.isTransient(modifiers) || Modifier.isStatic(modifiers)) {\r\n    continue;\r\n}\r\n```"}}
{"actor":{"display_login":"lukesleeman"}}