voyager
voyager copied to clipboard
IDE warning: Serializable object must implement 'readResolve'
I'm using Voyager 1.0.0 and all my screens that extend the Screen
class show the same warning
Serializable object must implement 'readResolve'
I haven't found any other reports of this issue so I'm kinda unsure what to do
adding private fun readResolve(): Any = DetailScreen
removes the warning but I think the issue could be resolve voyager side
How would you fix it from Voyagers side? Not every Screen is a object, and therefor does not need this function. There is also no way to get the singleton instance inside the Screen interface, because it is a interface and not a object.
I have also gotten this warning after some recent AS update. Not directly related to voyager, but I am seeing this warning also for objects that don't even implement serializable. Maybe this is a lint issue?
It's from Intellij inspection JavaIoSerializableObjectMustHaveReadResolve