Skip to content

Commit

Permalink
refac: remove type supplier
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Jul 31, 2023
1 parent bfdb3a0 commit e600227
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ public final class GenericParameterMetaData extends DefaultParameterMetaData imp
this.typeSupplier = typeSupplier;
}

public TypeSupplier<?> typeSupplier() {
return typeSupplier;
}

public Class<?> elementType() {
return (Class<?>) ((ParameterizedType) typeSupplier.get()).getActualTypeArguments()[0];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ public void shouldConvertCollectionParameter() {
Assertions.assertTrue(books.converter().isEmpty());
assertEquals(GenericParameterMetaData.class, books.getClass());
GenericParameterMetaData generic = (GenericParameterMetaData) books;
TypeSupplier<?> typeSupplier = generic.typeSupplier();
Assertions.assertNotNull(typeSupplier);

}

@Test
Expand All @@ -129,9 +128,6 @@ public void shouldConvertMapParameter() {
Assertions.assertEquals(MappingType.MAP, map.paramType());
Assertions.assertTrue(map.converter().isEmpty());
assertEquals(GenericParameterMetaData.class, map.getClass());
GenericParameterMetaData generic = (GenericParameterMetaData) map;
TypeSupplier<?> typeSupplier = generic.typeSupplier();
Assertions.assertNotNull(typeSupplier);
}

static class Foo{
Expand Down

0 comments on commit e600227

Please sign in to comment.