Skip to content

Commit c0b4cbd

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

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,10 +332,23 @@ default boolean isWider(JavaType<?> javaType) {
332332

333333
@FunctionalInterface
334334
@Deprecated(forRemoval = true, since = "7.2")
335+
@Incubating
335336
interface CoercionContext {
336337
TypeConfiguration getTypeConfiguration();
337338
}
338339

340+
/**
341+
* @deprecated Use {@link #coerce(Object)} instead.
342+
* This operation depends on an unchecked cast.
343+
* Since incubating, it will go away very soon.
344+
*/
345+
@Deprecated(forRemoval = true, since = "7.2")
346+
@Incubating
347+
default <X> T coerce(X value, CoercionContext context) {
348+
//noinspection unchecked
349+
return (T) coerce( value );
350+
}
351+
339352
/**
340353
* Coerce the given value to this type, if possible.
341354
* <p>

0 commit comments

Comments
 (0)