Delete unnecessary conditions and modify return statement (#3772)

This commit is contained in:
dudxor4587 2024-11-22 07:14:16 +09:00 committed by GitHub
parent 737af6b50a
commit f3d2b2e65b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -268,10 +268,10 @@ public class Conversions {
if ( sourceType.isPrimitive() && targetType.isPrimitive() ) {
register( sourceType, targetType, new PrimitiveToPrimitiveConversion( sourceType ) );
}
else if ( sourceType.isPrimitive() && !targetType.isPrimitive() ) {
else if ( sourceType.isPrimitive() ) {
register( sourceType, targetType, new PrimitiveToWrapperConversion( sourceType, targetType ) );
}
else if ( !sourceType.isPrimitive() && targetType.isPrimitive() ) {
else if ( targetType.isPrimitive() ) {
register( sourceType, targetType, inverse( new PrimitiveToWrapperConversion( targetType, sourceType ) ) );
}
else {
@ -390,11 +390,7 @@ public class Conversions {
return false;
}
if ( !Objects.equals( targetType, other.targetType ) ) {
return false;
}
return true;
return Objects.equals( targetType, other.targetType );
}
}
}