minor cleanups in Dialect

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-06-13 22:12:08 +02:00
parent 505e64b19a
commit 6f58c5e2f6
1 changed files with 5 additions and 8 deletions

View File

@ -67,8 +67,6 @@ import org.hibernate.dialect.function.InsertSubstringOverlayEmulation;
import org.hibernate.dialect.function.LocatePositionEmulation; import org.hibernate.dialect.function.LocatePositionEmulation;
import org.hibernate.dialect.function.LpadRpadPadEmulation; import org.hibernate.dialect.function.LpadRpadPadEmulation;
import org.hibernate.dialect.function.SqlFunction; import org.hibernate.dialect.function.SqlFunction;
import org.hibernate.dialect.function.TimestampaddFunction;
import org.hibernate.dialect.function.TimestampdiffFunction;
import org.hibernate.dialect.function.TrimFunction; import org.hibernate.dialect.function.TrimFunction;
import org.hibernate.dialect.identity.IdentityColumnSupport; import org.hibernate.dialect.identity.IdentityColumnSupport;
import org.hibernate.dialect.identity.IdentityColumnSupportImpl; import org.hibernate.dialect.identity.IdentityColumnSupportImpl;
@ -284,7 +282,7 @@ import static org.hibernate.type.descriptor.converter.internal.EnumHelper.getEnu
* passed to the constructor, and by the {@link #getVersion()} property. * passed to the constructor, and by the {@link #getVersion()} property.
* <p> * <p>
* Programs using Hibernate should migrate away from the use of versioned * Programs using Hibernate should migrate away from the use of versioned
* dialect classes like, for example, {@link MySQL8Dialect}. These * dialect classes like, for example, {@code MySQL8Dialect}. These
* classes are now deprecated and will be removed in a future release. * classes are now deprecated and will be removed in a future release.
* <p> * <p>
* A custom {@code Dialect} may be specified using the configuration * A custom {@code Dialect} may be specified using the configuration
@ -850,12 +848,11 @@ public abstract class Dialect implements ConversionContext, TypeContributor, Fun
*/ */
@Deprecated(forRemoval = true) @Deprecated(forRemoval = true)
public String getCheckCondition(String columnName, long[] values) { public String getCheckCondition(String columnName, long[] values) {
Long objValues [] = new Long[ values.length ]; Long[] boxedValues = new Long[values.length];
int i = 0; for ( int i = 0; i<values.length; i++ ) {
for( long temp : values){ boxedValues[i] = values[i];
objValues[ i++ ] = temp;
} }
return getCheckCondition(columnName, objValues); return getCheckCondition( columnName, boxedValues );
} }
/** /**