Is it possible to have final transient fields that are set to any non-default value after serialization in Java? My usecase is a cache variable — that\'s why i
The general solution to problems like this is to use a "serial proxy" (see Effective Java 2nd Ed). If you need to retrofit this to an existing serialisable class without breaking serial compatibility, then you will need to do some hacking.