File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
hibernate-core/src/main/java/org/hibernate/type/descriptor/java Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments