Polishing for full type information on RepositoryMetadata.
Avoid leaking internals from TypeInformation by exposing a ….toTypeDescriptor() method in TypeInformation directly. This causes the ResolvableType handling to become an implementation detail within ClassTypeInformation and avoid client code to manually deal with both ResolvableType and TypeDescriptor creation. Changed MethodLookups back to use the resolved domain types as the advanced generics resolutions seems not to be needed here and we can avoid Fixes #2518.
This commit is contained in:
@@ -28,7 +28,6 @@ import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import org.mockito.junit.jupiter.MockitoSettings;
|
||||
import org.mockito.quality.Strictness;
|
||||
|
||||
import org.springframework.aop.framework.ProxyFactory;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
@@ -305,7 +304,8 @@ class RepositoriesUnitTests {
|
||||
var domainType = super.getDomainType().getName().concat("Entity");
|
||||
|
||||
try {
|
||||
this.domainType = ClassTypeInformation.from(ClassUtils.forName(domainType, CustomRepositoryMetadata.class.getClassLoader()));
|
||||
this.domainType = ClassTypeInformation
|
||||
.from(ClassUtils.forName(domainType, CustomRepositoryMetadata.class.getClassLoader()));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -313,7 +313,7 @@ class RepositoriesUnitTests {
|
||||
|
||||
@Override
|
||||
public TypeInformation<?> getDomainTypeInformation() {
|
||||
return this.domainType;
|
||||
return domainType == null ? super.getDomainTypeInformation() : domainType;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user