Skip to content

Commit b1329d0

Browse files
committed
temporarily put back an @Incubating @deprecated operation
just for this release
1 parent 9ce4619 commit b1329d0

File tree

1 file changed

+13
-0
lines changed
  • hibernate-core/src/main/java/org/hibernate/type/descriptor/java

1 file changed

+13
-0
lines changed

hibernate-core/src/main/java/org/hibernate/type/descriptor/java/JavaType.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ default boolean isWider(JavaType<?> javaType) {
332332

333333
@FunctionalInterface
334334
@Deprecated(forRemoval = true, since = "7.2")
335+
@Incubating
335336
interface CoercionContext {
336337
TypeConfiguration getTypeConfiguration();
337338
}
@@ -367,6 +368,18 @@ default Object coerce(Object value) {
367368
return value;
368369
}
369370

371+
/**
372+
* @deprecated Use {@link #coerce(Object)} instead.
373+
* This operation depends on an unchecked cast.
374+
* Since incubating, it will go away very soon.
375+
*/
376+
@Deprecated(forRemoval = true, since = "7.2")
377+
@Incubating
378+
default <X> X coerce(Object value, CoercionContext context) {
379+
//noinspection unchecked
380+
return (X) coerce( value );
381+
}
382+
370383
/**
371384
* Creates the {@link JavaType} for the given {@link ParameterizedType}
372385
* based on this {@link JavaType} registered for the raw type.

0 commit comments

Comments
 (0)