diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCustomConversionIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCustomConversionIntegrationTests.java index 2f9c30c423..fdcfd27bc2 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCustomConversionIntegrationTests.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCustomConversionIntegrationTests.java @@ -39,7 +39,6 @@ import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory; import org.springframework.data.jdbc.testing.TestConfiguration; import org.springframework.data.repository.CrudRepository; -import org.springframework.lang.Nullable; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.rules.SpringClassRule; import org.springframework.test.context.junit4.rules.SpringMethodRule; @@ -93,9 +92,9 @@ JdbcCustomConversions jdbcCustomConversions() { * * @Override * @Nullable - * public BigDecimal convert(@Nullable String source) { + * public BigDecimal convert(String source) { * - * return source == null ? null : new BigDecimal(source); + * return source == new BigDecimal(source); * } * } * @@ -130,9 +129,9 @@ enum StringToBigDecimalConverter implements Converter { INSTANCE; @Override - public JdbcValue convert(@Nullable String source) { + public JdbcValue convert(String source) { - Object value = source == null ? null : new BigDecimal(source); + Object value = new BigDecimal(source); return JdbcValue.of(value, JDBCType.DECIMAL); } @@ -144,11 +143,7 @@ enum BigDecimalToString implements Converter { INSTANCE; @Override - public String convert(@Nullable BigDecimal source) { - - if (source == null) { - return null; - } + public String convert(BigDecimal source) { return source.toString(); }