voyager icon indicating copy to clipboard operation
voyager copied to clipboard

IDE warning: Serializable object must implement 'readResolve'

Open zt64 opened this issue 6 months ago • 4 comments

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

zt64 avatar Jan 21 '24 07:01 zt64

adding private fun readResolve(): Any = DetailScreen removes the warning but I think the issue could be resolve voyager side

akardas16 avatar Mar 17 '24 00:03 akardas16

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.

Syer10 avatar Mar 17 '24 01:03 Syer10

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?

itsandreramon avatar Apr 19 '24 09:04 itsandreramon

It's from Intellij inspection JavaIoSerializableObjectMustHaveReadResolve

zt64 avatar Apr 20 '24 01:04 zt64