Fix | SonarQube changes
SonarQube changes
@@ -2561,13 +2561,14 @@ public class SQLServerBulkCopy implements java.lang.AutoCloseable, java.io.Seria
// this should not really happen, since ClassCastException should only happen when colValue is not null.
// just do one more checking here to make sure
throwInvalidArgument("colValue");
- }
+ } else {
MessageFormat form = new MessageFormat(SQLServerException.getErrString("R_errorConvertingValue"));
Object[] msgArgs = {colValue.getClass().getSimpleName(), JDBCType.of(bulkJdbcType)};
throw new SQLServerException(form.format(msgArgs), SQLState.DATA_EXCEPTION_NOT_SPECIFIC,
DriverError.NOT_SET, ex);
}
}
+ }
/**
* Writes sql_variant data based on the baseType for bulkcopy
