Skip to content

Commit 048d427

Browse files
committed
fix an out-of-data comment
see #10104 by @jonenst
1 parent 6fb622c commit 048d427

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

hibernate-core/src/main/java/org/hibernate/type/descriptor/jdbc/TimestampUtcAsInstantJdbcType.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ protected void doBind(
8585
WrapperOptions wrapperOptions) throws SQLException {
8686
final Instant instant = javaType.unwrap( value, Instant.class, wrapperOptions );
8787
try {
88-
// supposed to be supported in JDBC 4.2
88+
// supported by some databases (not required by JDBC)
8989
st.setObject( index, instant, Types.TIMESTAMP_WITH_TIMEZONE );
9090
}
9191
catch (SQLException|AbstractMethodError e) {
@@ -103,7 +103,7 @@ protected void doBind(
103103
throws SQLException {
104104
final Instant instant = javaType.unwrap( value, Instant.class, wrapperOptions );
105105
try {
106-
// supposed to be supported in JDBC 4.2
106+
// supported by some databases (not required by JDBC)
107107
st.setObject( name, instant, Types.TIMESTAMP_WITH_TIMEZONE );
108108
}
109109
catch (SQLException|AbstractMethodError e) {
@@ -120,7 +120,7 @@ public <X> ValueExtractor<X> getExtractor(final JavaType<X> javaType) {
120120
@Override
121121
protected X doExtract(ResultSet rs, int position, WrapperOptions wrapperOptions) throws SQLException {
122122
try {
123-
// supposed to be supported in JDBC 4.2
123+
// supported by some databases (not required by JDBC)
124124
return javaType.wrap( rs.getObject( position, Instant.class ), wrapperOptions );
125125
}
126126
catch (SQLException|AbstractMethodError e) {
@@ -132,7 +132,7 @@ protected X doExtract(ResultSet rs, int position, WrapperOptions wrapperOptions)
132132
@Override
133133
protected X doExtract(CallableStatement statement, int position, WrapperOptions wrapperOptions) throws SQLException {
134134
try {
135-
// supposed to be supported in JDBC 4.2
135+
// supported by some databases (not required by JDBC)
136136
return javaType.wrap( statement.getObject( position, Instant.class ), wrapperOptions );
137137
}
138138
catch (SQLException|AbstractMethodError e) {
@@ -144,7 +144,7 @@ protected X doExtract(CallableStatement statement, int position, WrapperOptions
144144
@Override
145145
protected X doExtract(CallableStatement statement, String name, WrapperOptions wrapperOptions) throws SQLException {
146146
try {
147-
// supposed to be supported in JDBC 4.2
147+
// supported by some databases (not required by JDBC)
148148
return javaType.wrap( statement.getObject( name, Instant.class ), wrapperOptions );
149149
}
150150
catch (SQLException|AbstractMethodError e) {

0 commit comments

Comments
 (0)