Fix checkstyle issue due to improper use of spacing

This commit is contained in:
Vlad Mihalcea 2016-05-19 17:08:11 +03:00
parent e6d3ad5013
commit d658295025
1 changed files with 12 additions and 11 deletions

View File

@ -134,20 +134,21 @@ public class JavaTypeDescriptorRegistry {
super(type, createMutabilityPlan(type));
}
@SuppressWarnings("unchecked")
private static <T> MutabilityPlan<T> createMutabilityPlan(final Class<T> type) {
@SuppressWarnings("unchecked")
private static <T> MutabilityPlan<T> createMutabilityPlan(final Class<T> type) {
if ( type.isAnnotationPresent( Immutable.class ) ) {
return ImmutableMutabilityPlan.INSTANCE;
}
// MutableMutabilityPlan is the "safest" option, but we do not necessarily know how to deepCopy etc...
return new MutableMutabilityPlan<T>() {
@Override
protected T deepCopyNotNull(T value) {
throw new HibernateException(
"Not known how to deep copy value of type: [" + type.getName() + "]"
);
}
};
// MutableMutabilityPlan is the "safest" option, but we do not necessarily know how to deepCopy etc...
return new MutableMutabilityPlan<T>() {
@Override
protected T deepCopyNotNull(T value) {
throw new HibernateException(
"Not known how to deep copy value of type: [" + type
.getName() + "]"
);
}
};
}
@Override