HHH-7447 ValueHolder used in NaturalIdCacheKey is not Serializable

This commit is contained in:
Strong Liu 2012-07-12 22:53:07 +08:00
parent 9324c7ab1e
commit 1d2877838b
2 changed files with 3 additions and 4 deletions

View File

@ -44,7 +44,7 @@ public class NaturalIdCacheKey implements Serializable {
private final String entityName;
private final String tenantId;
private final int hashCode;
private final ValueHolder<String> toString;
private final transient ValueHolder<String> toString;
/**
* Construct a new key for a caching natural identifier resolutions into the second level cache.

View File

@ -22,7 +22,6 @@
* Boston, MA 02110-1301 USA
*/
package org.hibernate.internal.util;
import java.io.Serializable;
/**
* Represents a "final" value that is initialized either {@link #ValueHolder(Object) up front} or once at some point
@ -30,14 +29,14 @@ import java.io.Serializable;
*
* @author Steve Ebersole
*/
public class ValueHolder<T> implements Serializable {
public class ValueHolder<T> {
/**
* The snippet that generates the initialization value.
*
* @param <T>
*/
public static interface DeferredInitializer<T> extends Serializable {
public static interface DeferredInitializer<T> {
/**
* Build the initialization value.
* <p/>