{"action":"created","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/14","labels_url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/14/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/14/events","html_url":"https://github.com/FasterXML/jackson-module-kotlin/issues/14","id":107404206,"number":14,"title":"Serialization Stopped working after update to M13( && jackson 2.6.2). ","user":{"login":"MrBIMC","id":1346479,"avatar_url":"https://avatars.githubusercontent.com/u/1346479?v=3","gravatar_id":"","url":"https://api.github.com/users/MrBIMC","html_url":"https://github.com/MrBIMC","followers_url":"https://api.github.com/users/MrBIMC/followers","following_url":"https://api.github.com/users/MrBIMC/following{/other_user}","gists_url":"https://api.github.com/users/MrBIMC/gists{/gist_id}","starred_url":"https://api.github.com/users/MrBIMC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrBIMC/subscriptions","organizations_url":"https://api.github.com/users/MrBIMC/orgs","repos_url":"https://api.github.com/users/MrBIMC/repos","events_url":"https://api.github.com/users/MrBIMC/events{/privacy}","received_events_url":"https://api.github.com/users/MrBIMC/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-20T16:52:28Z","updated_at":"2015-09-20T21:41:29Z","closed_at":null,"body":"I have 2 data-classes, one nests another one:\r\n\r\n```\r\n    data class WidgetShortcut(var appAction: String = \"com.google.android.googlequicksearchbox.VoiceSearchActivity\",\r\n                          var appPackage: String = \"com.google.android.googlequicksearchbox\",\r\n                          var icon: Int = R.drawable.icn_microphone,\r\n                          var launchType: LaunchType = LaunchType.ACTIVITY,\r\n                          var label: String = \"Voice Search\")\r\n\r\n    data class WidgetData(var primaryColor: Int = Color.WHITE,\r\n                          var secondaryColor: Int = Color.DKGRAY,\r\n                          var autoTheme: Boolean = true,\r\n                          var autoThemeReversed: Boolean = false,\r\n                          var colorfulLogo: Boolean = false,\r\n                          var searchAsOverlay: Boolean = true,\r\n                          var shortcuts: ArrayList<WidgetShortcut> = arrayListOf(WidgetShortcut()))\r\n```\r\nand here's how I serialize\\deserialize them:\r\n\r\n```\r\n    fun getJsonString(data: WidgetData) = jacksonObjectMapper().writeValueAsString(data)\r\n\r\n    fun restoreJsonString(string: String) = jacksonObjectMapper().readValue(string, WidgetData::class.java)\r\n```\r\n\r\nIt worked fine in M12 && 2.5 jackson-kotlin-module but after update to new version data can't be serialized anymore. I get such logcat:\r\n```\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime: FATAL EXCEPTION: main\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime: Process: com.pavelsikun.customizablesearchwidget, PID: 8256\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:115)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:  Caused by: java.lang.reflect.InvocationTargetException\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) \r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:115) \r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:  Caused by: com.fasterxml.jackson.databind.JsonMappingException: Invalid index 0, size is 0 (through reference chain: com.pavelsikun.customizablesearchwidget.util.WidgetData[\"shortcuts\"])\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:199)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:683)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:130)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3554)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:2925)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.pavelsikun.customizablesearchwidget.util.DataManager.saveWidgetData(DataManager.kt:67)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.pavelsikun.customizablesearchwidget.activity.WidgetConfigurationActivity$onOptionsItemSelected$1.invoke(WidgetConfigurationActivity.kt:48)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.pavelsikun.customizablesearchwidget.activity.WidgetConfigurationActivity.onOptionsItemSelected(WidgetConfigurationActivity.kt:59)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.app.Activity.onMenuItemSelected(Activity.java:3694)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:325)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:147)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.internal.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:100)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.internal.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:100)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.internal.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:73)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.widget.Toolbar$1.onMenuItemClick(Toolbar.java:180)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:761)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:811)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:153)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:958)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:948)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.widget.ActionMenuView.invokeItem(ActionMenuView.java:619)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.support.v7.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:139)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.view.View.performClick(View.java:4797)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.view.View$PerformClick.run(View.java:19899)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:739)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:95)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:135)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5374)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method) \r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372) \r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) \r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) \r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:115) \r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:  Caused by: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at java.util.ArrayList.get(ArrayList.java:308)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.fasterxml.jackson.module.kotlin.KotlinNamesAnnotationIntrospector.findKotlinParameterName(KotlinModule.kt:97)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.fasterxml.jackson.module.kotlin.KotlinNamesAnnotationIntrospector.findImplicitPropertyName(KotlinModule.kt:59)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair.findImplicitPropertyName(AnnotationIntrospectorPair.java:467)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime:     at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addCreatorParam(POJOPropertiesCollector.java:436)\r\n09-20 19:50:18.390 8256-8256/com.pavelsikun.customizablesearchwidget E/AndroidRuntime: \tat com.fasterxml.jackson.databin\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/comments/141837617","html_url":"https://github.com/FasterXML/jackson-module-kotlin/issues/14#issuecomment-141837617","issue_url":"https://api.github.com/repos/FasterXML/jackson-module-kotlin/issues/14","id":141837617,"user":{"login":"apatrida","id":182340,"avatar_url":"https://avatars.githubusercontent.com/u/182340?v=3","gravatar_id":"","url":"https://api.github.com/users/apatrida","html_url":"https://github.com/apatrida","followers_url":"https://api.github.com/users/apatrida/followers","following_url":"https://api.github.com/users/apatrida/following{/other_user}","gists_url":"https://api.github.com/users/apatrida/gists{/gist_id}","starred_url":"https://api.github.com/users/apatrida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apatrida/subscriptions","organizations_url":"https://api.github.com/users/apatrida/orgs","repos_url":"https://api.github.com/users/apatrida/repos","events_url":"https://api.github.com/users/apatrida/events{/privacy}","received_events_url":"https://api.github.com/users/apatrida/received_events","type":"User","site_admin":false},"created_at":"2015-09-20T21:41:29Z","updated_at":"2015-09-20T21:41:29Z","body":"Looking at it..."}}