|
36 | 36 | import org.junit.jupiter.api.DynamicTest;
|
37 | 37 | import org.junit.jupiter.api.Test;
|
38 | 38 | import org.junit.jupiter.api.TestFactory;
|
| 39 | + |
39 | 40 | import org.springframework.core.annotation.AliasFor;
|
40 | 41 | import org.springframework.core.annotation.AnnotationUtils;
|
41 | 42 | import org.springframework.data.annotation.AccessType;
|
|
44 | 45 | import org.springframework.data.annotation.ReadOnlyProperty;
|
45 | 46 | import org.springframework.data.annotation.Reference;
|
46 | 47 | import org.springframework.data.annotation.Transient;
|
47 |
| -import org.springframework.data.convert.PropertyValueConverter; |
48 |
| -import org.springframework.data.convert.ValueConversionContext; |
49 |
| -import org.springframework.data.convert.ValueConverter; |
50 | 48 | import org.springframework.data.mapping.MappingException;
|
51 | 49 | import org.springframework.data.mapping.PersistentProperty;
|
52 | 50 | import org.springframework.data.mapping.context.SampleMappingContext;
|
@@ -341,15 +339,6 @@ void detectsJMoleculesIdentity() {
|
341 | 339 | assertThat(property.isIdProperty()).isTrue();
|
342 | 340 | }
|
343 | 341 |
|
344 |
| - @Test // GH-1484 |
345 |
| - void detectsValueConverter() { |
346 |
| - |
347 |
| - SamplePersistentProperty property = getProperty(WithPropertyConverter.class, "value"); |
348 |
| - |
349 |
| - assertThat(property.hasValueConverter()).isTrue(); |
350 |
| - assertThat(property.getValueConverterType()).isEqualTo(MyPropertyConverter.class); |
351 |
| - } |
352 |
| - |
353 | 342 | @SuppressWarnings("unchecked")
|
354 | 343 | private Map<Class<? extends Annotation>, Annotation> getAnnotationCache(SamplePersistentProperty property) {
|
355 | 344 | return (Map<Class<? extends Annotation>, Annotation>) ReflectionTestUtils.getField(property, "annotationCache");
|
@@ -472,7 +461,8 @@ public String getProperty() {
|
472 | 461 | @Retention(RetentionPolicy.RUNTIME)
|
473 | 462 | @Target(value = { FIELD, METHOD, ANNOTATION_TYPE })
|
474 | 463 | @Id
|
475 |
| - public @interface MyId {} |
| 464 | + public @interface MyId { |
| 465 | + } |
476 | 466 |
|
477 | 467 | static class FieldAccess {
|
478 | 468 | String name;
|
@@ -542,23 +532,4 @@ static class JMolecules {
|
542 | 532 |
|
543 | 533 | interface JMoleculesAggregate extends AggregateRoot<JMoleculesAggregate, Identifier> {}
|
544 | 534 |
|
545 |
| - static class WithPropertyConverter { |
546 |
| - |
547 |
| - @ValueConverter(MyPropertyConverter.class) |
548 |
| - String value; |
549 |
| - } |
550 |
| - |
551 |
| - static class MyPropertyConverter |
552 |
| - implements PropertyValueConverter<Object, Object, ValueConversionContext<SamplePersistentProperty>> { |
553 |
| - |
554 |
| - @Override |
555 |
| - public Object read(Object value, ValueConversionContext context) { |
556 |
| - return null; |
557 |
| - } |
558 |
| - |
559 |
| - @Override |
560 |
| - public Object write(Object value, ValueConversionContext context) { |
561 |
| - return null; |
562 |
| - } |
563 |
| - } |
564 | 535 | }
|
0 commit comments