Skip to content

Commit 716ddc4

Browse files
committed
Deprecate classes supporting H2 1.x.
Support for the 1.x branch of H2 will be dropped with the next major release. See #1243
1 parent 0c48981 commit 716ddc4

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/dialect/H2TimestampWithTimeZoneToOffsetDateTimeConverter.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@
2323
import org.springframework.data.convert.ReadingConverter;
2424

2525
/**
26-
* Converter converting from an H2 internal representation of a timestamp with time zone to an OffsetDateTime.
27-
*
28-
* Only required for H2 versions < 2.0
26+
* Converter converting from an H2 internal representation of a timestamp with time zone to an OffsetDateTime. Only
27+
* required for H2 versions < 2.0
2928
*
3029
* @author Jens Schauder
3130
* @since 2.7
31+
* @deprecated This is only used for H2 1.x support which will be dropped with the next major release. Use H2Dialect
32+
* instead.
3233
*/
34+
@Deprecated
3335
@ReadingConverter
3436
public enum H2TimestampWithTimeZoneToOffsetDateTimeConverter
3537
implements Converter<TimestampWithTimeZone, OffsetDateTime> {

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/dialect/JdbcH2Dialect.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828
* @author Jens Schauder
2929
* @author Christoph Strobl
3030
* @since 2.3
31+
* @deprecated This is only used for H2 1.x support which will be dropped with the next major release. Use H2Dialect
32+
* instead.
3133
*/
34+
@Deprecated
3235
public class JdbcH2Dialect extends H2Dialect {
3336

3437
public static JdbcH2Dialect INSTANCE = new JdbcH2Dialect();
@@ -56,7 +59,7 @@ static boolean isH2belowVersion2() {
5659

5760
JdbcH2Dialect.class.getClassLoader().loadClass("org.h2.api.TimestampWithTimeZone");
5861
return true;
59-
} catch (ClassNotFoundException e) {
62+
} catch (ClassNotFoundException e) {
6063
return false;
6164
}
6265
}

0 commit comments

Comments
 (0)