private int convertToInt(Object o, int defaultValue) {
        if (o.getClass() == Integer.class) {
            return (Integer) o;
        } else if (o.getClass() == Long.class) {
            long value = (Long) o;
            if (value <= Integer.MAX_VALUE && value >= Integer.MIN_VALUE) {
                return (int) value;
            } else {
                LOG.warn("Configuration value {} overflows/underflows the integer type.", value);
                return defaultValue;
            }
        } else {
            try {
                return Integer.parseInt(o.toString());
            } catch (NumberFormatException e) {
                LOG.warn("Configuration cannot evaluate value {} as an integer number", o);
                return defaultValue;
            }
        }
    }
Removes given config option from the configuration.

@param configOption config option to remove
@param <T> Type of the config option
@return true is config has been removed, false otherwise
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/configuration/Configuration.java