DATACMNS-77 - Introduced caching inside ClassTypeInformation.
ClassTypeInformation now holds a cache for Class<?> to TypeInformation<?> mappings. It also exposes constants for Object, Collection, Set, List and Map TypeInformations.
This commit is contained in:
@@ -148,6 +148,16 @@ public class ClassTypeInformationUnitTests {
|
||||
assertThat(property.getType(), is(typeCompatibleWith(byte[].class)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-77
|
||||
*/
|
||||
@Test
|
||||
public void returnsSameInstanceForCachedClass() {
|
||||
|
||||
TypeInformation<PropertyGetter> info = ClassTypeInformation.from(PropertyGetter.class);
|
||||
assertThat(ClassTypeInformation.from(PropertyGetter.class), is(sameInstance(info)));
|
||||
}
|
||||
|
||||
static class StringMapContainer extends MapContainer<String> {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user