diff --git a/src/main/java/org/springframework/data/auditing/MappingAuditableBeanWrapperFactory.java b/src/main/java/org/springframework/data/auditing/MappingAuditableBeanWrapperFactory.java index d1f65acc4..c31ead47c 100644 --- a/src/main/java/org/springframework/data/auditing/MappingAuditableBeanWrapperFactory.java +++ b/src/main/java/org/springframework/data/auditing/MappingAuditableBeanWrapperFactory.java @@ -29,7 +29,6 @@ import org.springframework.data.mapping.PersistentProperty; import org.springframework.data.mapping.PersistentPropertyAccessor; import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.PersistentEntities; -import org.springframework.data.mapping.model.BeanWrapper; import org.springframework.util.Assert; /** @@ -130,8 +129,8 @@ public class MappingAuditableBeanWrapperFactory extends DefaultAuditableBeanWrap } /** - * {@link AuditableBeanWrapper} using {@link MappingAuditingMetadata} and a {@link BeanWrapper} to set values on - * auditing properties. + * {@link AuditableBeanWrapper} using {@link MappingAuditingMetadata} and a {@link PersistentPropertyAccessor} to set + * values on auditing properties. * * @author Oliver Gierke * @since 1.8 @@ -142,7 +141,7 @@ public class MappingAuditableBeanWrapperFactory extends DefaultAuditableBeanWrap private final MappingAuditingMetadata metadata; /** - * Creates a new {@link MappingMetadataAuditableBeanWrapper} for the given taregt and + * Creates a new {@link MappingMetadataAuditableBeanWrapper} for the given target and * {@link MappingAuditingMetadata}. * * @param target must not be {@literal null}. diff --git a/src/main/java/org/springframework/data/mapping/model/BeanWrapper.java b/src/main/java/org/springframework/data/mapping/model/BeanWrapper.java index 6ffebd438..a37345df6 100644 --- a/src/main/java/org/springframework/data/mapping/model/BeanWrapper.java +++ b/src/main/java/org/springframework/data/mapping/model/BeanWrapper.java @@ -18,7 +18,6 @@ package org.springframework.data.mapping.model; import java.lang.reflect.Field; import java.lang.reflect.Method; -import org.springframework.core.convert.ConversionService; import org.springframework.data.mapping.PersistentProperty; import org.springframework.data.mapping.PersistentPropertyAccessor; import org.springframework.util.Assert; @@ -29,24 +28,10 @@ import org.springframework.util.ReflectionUtils; * * @author Oliver Gierke */ -public class BeanWrapper implements PersistentPropertyAccessor { +class BeanWrapper implements PersistentPropertyAccessor { private final T bean; - /** - * Creates a new {@link BeanWrapper} for the given bean and {@link ConversionService}.TODO: remove! - * - * @param bean must not be {@literal null}. - * @param conversionService can be {@literal null}. - * @return - * @deprecated use {@link org.springframework.data.mapping.PersistentEntity#getPropertyAccessor(Object)} instead. Will - * be removed in 1.10 RC1. - */ - @Deprecated - public static BeanWrapper create(T bean, ConversionService conversionService) { - return new BeanWrapper(bean); - } - /** * Creates a new {@link BeanWrapper} for the given bean. * @@ -130,8 +115,8 @@ public class BeanWrapper implements PersistentPropertyAccessor { return null; } catch (IllegalStateException e) { - throw new MappingException(String.format("Could not read property %s of %s!", property.toString(), - bean.toString()), e); + throw new MappingException( + String.format("Could not read property %s of %s!", property.toString(), bean.toString()), e); } }