spotless changes

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-10-31 13:21:01 +01:00
parent ddc2b36bbe
commit 08f25cf8d9
8 changed files with 38 additions and 32 deletions

View File

@ -100,11 +100,12 @@ public class BigDecimalJavaType extends AbstractClassJavaType<BigDecimal> {
@Override
public boolean isWider(JavaType<?> javaType) {
return switch ( javaType.getTypeName() ) {
case "byte", "java.lang.Byte",
"short", "java.lang.Short",
"int", "java.lang.Integer",
"long", "java.lang.Long",
"java.math.BigInteger" -> true;
case
"byte", "java.lang.Byte",
"short", "java.lang.Short",
"int", "java.lang.Integer",
"long", "java.lang.Long",
"java.math.BigInteger" -> true;
default -> false;
};
}

View File

@ -98,10 +98,11 @@ public class BigIntegerJavaType extends AbstractClassJavaType<BigInteger> {
@Override
public boolean isWider(JavaType<?> javaType) {
return switch ( javaType.getTypeName() ) {
case "byte", "java.lang.Byte",
"short", "java.lang.Short",
"int", "java.lang.Integer",
"long", "java.lang.Long" -> true;
case
"byte", "java.lang.Byte",
"short", "java.lang.Short",
"int", "java.lang.Integer",
"long", "java.lang.Long" -> true;
default -> false;
};
}

View File

@ -4,7 +4,6 @@
*/
package org.hibernate.type.descriptor.java;
import org.hibernate.HibernateException;
import org.hibernate.dialect.Dialect;
import org.hibernate.type.descriptor.WrapperOptions;
import org.hibernate.type.descriptor.java.spi.PrimitiveJavaType;

View File

@ -104,13 +104,14 @@ public class DoubleJavaType extends AbstractClassJavaType<Double> implements
@Override
public boolean isWider(JavaType<?> javaType) {
return switch ( javaType.getTypeName() ) {
case "byte", "java.lang.Byte",
"short", "java.lang.Short",
"int", "java.lang.Integer",
"long", "java.lang.Long",
"float", "java.lang.Float",
"java.math.BigInteger",
"java.math.BigDecimal" -> true;
case
"byte", "java.lang.Byte",
"short", "java.lang.Short",
"int", "java.lang.Integer",
"long", "java.lang.Long",
"float", "java.lang.Float",
"java.math.BigInteger",
"java.math.BigDecimal" -> true;
default -> false;
};
}

View File

@ -103,12 +103,13 @@ public class FloatJavaType extends AbstractClassJavaType<Float> implements Primi
@Override
public boolean isWider(JavaType<?> javaType) {
return switch ( javaType.getTypeName() ) {
case "byte", "java.lang.Byte",
"short", "java.lang.Short",
"int", "java.lang.Integer",
"long", "java.lang.Long",
"java.math.BigInteger",
"java.math.BigDecimal" -> true;
case
"byte", "java.lang.Byte",
"short", "java.lang.Short",
"int", "java.lang.Integer",
"long", "java.lang.Long",
"java.math.BigInteger",
"java.math.BigDecimal" -> true;
default -> false;
};
}

View File

@ -100,8 +100,9 @@ public class IntegerJavaType extends AbstractClassJavaType<Integer>
@Override
public boolean isWider(JavaType<?> javaType) {
return switch ( javaType.getTypeName() ) {
case "byte", "java.lang.Byte",
"short", "java.lang.Short" -> true;
case
"byte", "java.lang.Byte",
"short", "java.lang.Short" -> true;
default -> false;
};
}

View File

@ -100,9 +100,10 @@ public class LongJavaType extends AbstractClassJavaType<Long>
@Override
public boolean isWider(JavaType<?> javaType) {
return switch ( javaType.getTypeName() ) {
case "byte", "java.lang.Byte",
"short", "java.lang.Short",
"int", "java.lang.Integer" -> true;
case
"byte", "java.lang.Byte",
"short", "java.lang.Short",
"int", "java.lang.Integer" -> true;
default -> false;
};
}

View File

@ -122,10 +122,11 @@ public class StringJavaType extends AbstractClassJavaType<String> {
@Override
public boolean isWider(JavaType<?> javaType) {
return switch ( javaType.getTypeName() ) {
case "char",
"char[]",
"java.lang.Character",
"java.lang.Character[]" -> true;
case
"char",
"char[]",
"java.lang.Character",
"java.lang.Character[]" -> true;
default -> false;
};
}