{"action":"opened","issue":{"url":"https://api.github.com/repos/thoughtbot/expandable-recycler-view/issues/20","repository_url":"https://api.github.com/repos/thoughtbot/expandable-recycler-view","labels_url":"https://api.github.com/repos/thoughtbot/expandable-recycler-view/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/expandable-recycler-view/issues/20/comments","events_url":"https://api.github.com/repos/thoughtbot/expandable-recycler-view/issues/20/events","html_url":"https://github.com/thoughtbot/expandable-recycler-view/issues/20","id":186996965,"number":20,"title":"ExpandableGroup didn't have consistent setting for write and read parcelable","user":{"login":"infinitea","id":7779946,"avatar_url":"https://avatars.githubusercontent.com/u/7779946?v=3","gravatar_id":"","url":"https://api.github.com/users/infinitea","html_url":"https://github.com/infinitea","followers_url":"https://api.github.com/users/infinitea/followers","following_url":"https://api.github.com/users/infinitea/following{/other_user}","gists_url":"https://api.github.com/users/infinitea/gists{/gist_id}","starred_url":"https://api.github.com/users/infinitea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinitea/subscriptions","organizations_url":"https://api.github.com/users/infinitea/orgs","repos_url":"https://api.github.com/users/infinitea/repos","events_url":"https://api.github.com/users/infinitea/events{/privacy}","received_events_url":"https://api.github.com/users/infinitea/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-03T08:03:44Z","updated_at":"2016-11-03T08:03:44Z","closed_at":null,"body":"whether the item is null or not, it will all write an int into parcelable, in the read setting, only if the item is not null will call readInt, this will cause error in extended class \r\n\r\n  protected ExpandableGroup(Parcel in) {\r\n    title = in.readString();\r\n    if (in.readByte() == 0x01) {\r\n      **int size = in.readInt();**\r\n      items = new ArrayList<T>(size);\r\n      Class<?> type = (Class<?>) in.readSerializable();\r\n      in.readList(items, type.getClassLoader());\r\n    } else {\r\n      items = null;\r\n    }\r\n  }\r\n\r\n  @Override\r\n  public int describeContents() {\r\n    return 0;\r\n  }\r\n\r\n  @Override\r\n  public void writeToParcel(Parcel dest, int flags) {\r\n    dest.writeString(title);\r\n    if (items == null) {\r\n      dest.writeByte((byte) (0x00));\r\n      **dest.writeInt(0);**\r\n    } else {\r\n      dest.writeByte((byte) (0x01));\r\n      **dest.writeInt(items.size());**\r\n      final Class<?> objectsType = items.get(0).getClass();\r\n      dest.writeSerializable(objectsType);\r\n      dest.writeList(items);\r\n    }\r\n  }"}}
{"actor":{"display_login":"infinitea"}}