{"action":"created","issue":{"url":"https://api.github.com/repos/johncarl81/parceler/issues/110","labels_url":"https://api.github.com/repos/johncarl81/parceler/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/johncarl81/parceler/issues/110/comments","events_url":"https://api.github.com/repos/johncarl81/parceler/issues/110/events","html_url":"https://github.com/johncarl81/parceler/issues/110","id":93397197,"number":110,"title":"Parcels.wrap(List<enum>) errors, but works if wrapped in Class","user":{"login":"twig","id":59689,"avatar_url":"https://avatars.githubusercontent.com/u/59689?v=3","gravatar_id":"","url":"https://api.github.com/users/twig","html_url":"https://github.com/twig","followers_url":"https://api.github.com/users/twig/followers","following_url":"https://api.github.com/users/twig/following{/other_user}","gists_url":"https://api.github.com/users/twig/gists{/gist_id}","starred_url":"https://api.github.com/users/twig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twig/subscriptions","organizations_url":"https://api.github.com/users/twig/orgs","repos_url":"https://api.github.com/users/twig/repos","events_url":"https://api.github.com/users/twig/events{/privacy}","received_events_url":"https://api.github.com/users/twig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-07-06T23:02:09Z","updated_at":"2015-07-14T16:34:26Z","closed_at":null,"body":"This took me a while to figure out, but it seems there's a specific case where Enums can/can't work which isn't referenced in the documentation (readme / homepage).\r\n\r\nExample Enum:\r\n\r\n    public enum ItemType {\r\n        Wand,\r\n        // ...\r\n        Claws,\r\n        Polearms;\r\n    \r\n        public String description = \"\";\r\n\r\n        // For Parceler, if used at all.\r\n        private ItemType() {\r\n            this(\"\");\r\n        }\r\n    \r\n        private ItemType(String description) {\r\n            this.description = description;\r\n        }\r\n    }\r\n\r\nFor example, this will raise an exception:\r\n\r\n    List<ItemType> items = new ArrayList<>();\r\n    items.add(ItemType.Hammers);\r\n    items.add(ItemType.Wand);\r\n\r\n    Intent intent = new Intent(getApplicationContext(), ChooseItemsActivity.class);\r\n    intent.putExtra(\"preselected\", Parcels.wrap(items));\r\n    startActivityForResult(intent, ACTIVITY_CHOOSE_ITEMS); // Exception raised here\r\n\r\nStack trace:\r\n\r\n    org.parceler.ParcelerRuntimeException: Unable to find generated Parcelable class for twig.nguyen.d2_runewords.enums.ItemType, verify that your class is configured properly and that the Parcelable class twig.nguyen.d2_runewords.enums.ItemType$$Parcelable is generated by Parceler.\r\n            at org.parceler.Parcels$ParcelCodeRepository.get(Parcels.java:201)\r\n            at org.parceler.Parcels.wrap(Parcels.java:85)\r\n            at org.parceler.Parcels.wrap(Parcels.java:69)\r\n            at org.parceler.NonParcelRepository$ListParcelable$1.itemToParcel(NonParcelRepository.java:280)\r\n            at org.parceler.converter.CollectionParcelConverter.toParcel(CollectionParcelConverter.java:38)\r\n            at org.parceler.converter.CollectionParcelConverter.toParcel(CollectionParcelConverter.java:27)\r\n            at org.parceler.NonParcelRepository$ConverterParcelable.writeToParcel(NonParcelRepository.java:1222)\r\n            at org.parceler.NonParcelRepository$ListParcelable.writeToParcel(NonParcelRepository.java:269)\r\n            at android.os.Parcel.writeParcelable(Parcel.java:1285)\r\n            at android.os.Parcel.writeValue(Parcel.java:1204)\r\n            at android.os.Parcel.writeArrayMapInternal(Parcel.java:618)\r\n            at android.os.Bundle.writeToParcel(Bundle.java:1692)\r\n            at android.os.Parcel.writeBundle(Parcel.java:636)\r\n            at android.content.Intent.writeToParcel(Intent.java:7013)\r\n\r\n\r\nHowever, after adding this wrapper class...\r\n\r\n    @Parcel\r\n    public class ParcelableEnumList<T extends Enum> {\r\n        public List<T> data;\r\n    \r\n        public ParcelableEnumList(List<T> data) {\r\n            this();\r\n            this.data = data;\r\n        }\r\n    \r\n        public ParcelableEnumList() {}\r\n    }\r\n\r\nThe following code works just fine.\r\n\r\n    Intent intent = new Intent(getApplicationContext(), ChooseItemsActivity.class);\r\n    intent.putExtra(\"preselected\", Parcels.wrap(new ParcelableEnumList(items)));\r\n    startActivityForResult(intent, ACTIVITY_CHOOSE_ITEMS);\r\n\r\nI'm not quite sure if this is a bug, because it's partially working so I'd just like to clarify if this is undocumented instruction or unintended use case."},"comment":{"url":"https://api.github.com/repos/johncarl81/parceler/issues/comments/121299011","html_url":"https://github.com/johncarl81/parceler/issues/110#issuecomment-121299011","issue_url":"https://api.github.com/repos/johncarl81/parceler/issues/110","id":121299011,"user":{"login":"johncarl81","id":167081,"avatar_url":"https://avatars.githubusercontent.com/u/167081?v=3","gravatar_id":"","url":"https://api.github.com/users/johncarl81","html_url":"https://github.com/johncarl81","followers_url":"https://api.github.com/users/johncarl81/followers","following_url":"https://api.github.com/users/johncarl81/following{/other_user}","gists_url":"https://api.github.com/users/johncarl81/gists{/gist_id}","starred_url":"https://api.github.com/users/johncarl81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johncarl81/subscriptions","organizations_url":"https://api.github.com/users/johncarl81/orgs","repos_url":"https://api.github.com/users/johncarl81/repos","events_url":"https://api.github.com/users/johncarl81/events{/privacy}","received_events_url":"https://api.github.com/users/johncarl81/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T16:34:26Z","updated_at":"2015-07-14T16:34:26Z","body":"I'm not sure whats going on with jitpack, but you could build and try it out yourself on the enums branch."}}