ValueHolder used in NaturalIdCacheKey is not Serializable

Description

this issue causes it is impossible to use natural id cache with 2LC

Activity

Show:

Donnchadh Ó DonnabháinJuly 12, 2012 at 8:05 PM

Would it be better to make the DeferredInitializer implementation and ValueHolder Serializable with ValueHolder having private T value;?

Donnchadh Ó DonnabháinJuly 12, 2012 at 8:01 PM

Won't this throw a NullPointer exception after deserialization?

public class NaturalIdCacheKey implements Serializable { ... private final transient ValueHolder<String> toString; ... public String toString() { return toString.getValue(); }
Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created July 12, 2012 at 4:37 PM
Updated April 22, 2015 at 6:40 PM
Resolved July 12, 2012 at 4:50 PM

Flag notifications