From 318e4e6c5dbe1d3532069849acea499da57bfdd8 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Wed, 28 Aug 2024 12:23:43 +0200 Subject: [PATCH] remove unused method marked for removal Signed-off-by: Gavin King --- .../hibernate/engine/internal/Versioning.java | 34 +------------------ ...VersionTypeSeedParameterSpecification.java | 2 -- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/Versioning.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/Versioning.java index af0b396bd9..1e2e887164 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/Versioning.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/Versioning.java @@ -6,7 +6,6 @@ */ package org.hibernate.engine.internal; -import org.hibernate.Remove; import org.hibernate.engine.spi.SharedSessionContractImplementor; import org.hibernate.internal.CoreMessageLogger; import org.hibernate.metamodel.mapping.EntityVersionMapping; @@ -86,44 +85,13 @@ public final class Versioning { } } - /** - * Create an initial optimistic locking value according the {@link VersionJavaType} - * contract for the version property if required and inject it into the - * snapshot state. - * - * @param fields The current snapshot state - * @param versionProperty The index of the version property - * @param versionMapping The version mapping - * @param session The originating session - * @return True if we injected a new version value into the fields array; false - * otherwise. - * - * @deprecated Use {@link #seedVersion(Object, Object[], EntityPersister, SharedSessionContractImplementor)} - */ - @Deprecated(since = "6.2") @Remove - public static boolean seedVersion( - Object[] fields, - int versionProperty, - EntityVersionMapping versionMapping, - SharedSessionContractImplementor session) { - final Object initialVersion = fields[versionProperty]; - if ( isNullInitialVersion( initialVersion ) ) { - fields[versionProperty] = seed( versionMapping, session ); - return true; - } - else { - LOG.tracev( "Using initial version: {0}", initialVersion ); - return false; - } - } - /** * Determines if the value of the assigned version property should be considered * a "null" value, that is, if it is literally {@code null}, or if it is a negative * integer. * * @param initialVersion The value initially assigned to a version property - * @return {@code} if the value shoudl be considered null for this purpose + * @return {@code} if the value should be considered null for this purpose */ public static boolean isNullInitialVersion(Object initialVersion) { return initialVersion == null diff --git a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/VersionTypeSeedParameterSpecification.java b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/VersionTypeSeedParameterSpecification.java index 6331e8ca33..510cc39d6e 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/VersionTypeSeedParameterSpecification.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/exec/internal/VersionTypeSeedParameterSpecification.java @@ -10,10 +10,8 @@ import java.sql.PreparedStatement; import java.sql.SQLException; import org.hibernate.metamodel.mapping.EntityVersionMapping; -import org.hibernate.metamodel.mapping.JdbcMapping; import org.hibernate.sql.exec.spi.ExecutionContext; import org.hibernate.sql.exec.spi.JdbcParameterBindings; -import org.hibernate.type.descriptor.java.VersionJavaType; /** * Parameter bind specification used for optimistic lock version seeding (from insert statements).