Skip to content

Commit 318e4e6

Browse files
committed
remove unused method marked for removal
Signed-off-by: Gavin King <[email protected]>
1 parent 5975d02 commit 318e4e6

File tree

2 files changed

+1
-35
lines changed

2 files changed

+1
-35
lines changed

hibernate-core/src/main/java/org/hibernate/engine/internal/Versioning.java

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
package org.hibernate.engine.internal;
88

9-
import org.hibernate.Remove;
109
import org.hibernate.engine.spi.SharedSessionContractImplementor;
1110
import org.hibernate.internal.CoreMessageLogger;
1211
import org.hibernate.metamodel.mapping.EntityVersionMapping;
@@ -86,44 +85,13 @@ public static boolean seedVersion(
8685
}
8786
}
8887

89-
/**
90-
* Create an initial optimistic locking value according the {@link VersionJavaType}
91-
* contract for the version property <em>if required</em> and inject it into the
92-
* snapshot state.
93-
*
94-
* @param fields The current snapshot state
95-
* @param versionProperty The index of the version property
96-
* @param versionMapping The version mapping
97-
* @param session The originating session
98-
* @return True if we injected a new version value into the fields array; false
99-
* otherwise.
100-
*
101-
* @deprecated Use {@link #seedVersion(Object, Object[], EntityPersister, SharedSessionContractImplementor)}
102-
*/
103-
@Deprecated(since = "6.2") @Remove
104-
public static boolean seedVersion(
105-
Object[] fields,
106-
int versionProperty,
107-
EntityVersionMapping versionMapping,
108-
SharedSessionContractImplementor session) {
109-
final Object initialVersion = fields[versionProperty];
110-
if ( isNullInitialVersion( initialVersion ) ) {
111-
fields[versionProperty] = seed( versionMapping, session );
112-
return true;
113-
}
114-
else {
115-
LOG.tracev( "Using initial version: {0}", initialVersion );
116-
return false;
117-
}
118-
}
119-
12088
/**
12189
* Determines if the value of the assigned version property should be considered
12290
* a "null" value, that is, if it is literally {@code null}, or if it is a negative
12391
* integer.
12492
*
12593
* @param initialVersion The value initially assigned to a version property
126-
* @return {@code} if the value shoudl be considered null for this purpose
94+
* @return {@code} if the value should be considered null for this purpose
12795
*/
12896
public static boolean isNullInitialVersion(Object initialVersion) {
12997
return initialVersion == null

hibernate-core/src/main/java/org/hibernate/sql/exec/internal/VersionTypeSeedParameterSpecification.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
import java.sql.SQLException;
1111

1212
import org.hibernate.metamodel.mapping.EntityVersionMapping;
13-
import org.hibernate.metamodel.mapping.JdbcMapping;
1413
import org.hibernate.sql.exec.spi.ExecutionContext;
1514
import org.hibernate.sql.exec.spi.JdbcParameterBindings;
16-
import org.hibernate.type.descriptor.java.VersionJavaType;
1715

1816
/**
1917
* Parameter bind specification used for optimistic lock version seeding (from insert statements).

0 commit comments

Comments
 (0)