deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/TypedResolverImpl.java
/**
     * If a converter was provided for this builder, it takes precedence over the built-in converters.
     */
If a converter was provided for this builder, it takes precedence over the built-in converters.
If a converter was provided for this builder it takes precedence over the built - in converters .
private T convert(String value)
    {
        if (value == null)
        {
            return null;
        }
        Object result = null;
        if (this.converter != null)
        {
            try
            {
                result = converter.convert(value);
            }
            catch (Exception e)
            {
                throw ExceptionUtils.throwAsRuntimeException(e);
            }
        }
        else if (String.class.equals(configEntryType))
        {
            result = value;
        }
        else if (Class.class.equals(configEntryType))
        {
            result = ClassUtils.tryToLoadClassForName(value);
        }
        else if (Boolean.class.equals(configEntryType))
        {
            Boolean isTrue = "TRUE".equalsIgnoreCase(value);
            isTrue |= "1".equalsIgnoreCase(value);
            isTrue |= "YES".equalsIgnoreCase(value);
            isTrue |= "Y".equalsIgnoreCase(value);
            isTrue |= "JA".equalsIgnoreCase(value);
            isTrue |= "J".equalsIgnoreCase(value);
            isTrue |= "OUI".equalsIgnoreCase(value);
            result = isTrue;
        }
        else if (Integer.class.equals(configEntryType))
        {
            result = Integer.parseInt(value);
        }
        else if (Long.class.equals(configEntryType))
        {
            result = Long.parseLong(value);
        }
        else if (Float.class.equals(configEntryType))
        {
            result = Float.parseFloat(value);
        }
        else if (Double.class.equals(configEntryType))
        {
            result = Double.parseDouble(value);
        }
        return (T) result;
    }
private T convert ( String value ) { if ( value == null ) { return null ; } Object result = null ; if ( this . converter != null ) { try { result = converter . convert ( value ) ; } catch ( Exception e ) { throw ExceptionUtils . throwAsRuntimeException ( e ) ; } } else if ( String . class . equals ( configEntryType ) ) { result = value ; } else if ( Class . class . equals ( configEntryType ) ) { result = ClassUtils . tryToLoadClassForName ( value ) ; } else if ( Boolean . class . equals ( configEntryType ) ) { Boolean isTrue = "TRUE" . equalsIgnoreCase ( value ) ; isTrue |= "1" . equalsIgnoreCase ( value ) ; isTrue |= "YES" . equalsIgnoreCase ( value ) ; isTrue |= "Y" . equalsIgnoreCase ( value ) ; isTrue |= "JA" . equalsIgnoreCase ( value ) ; isTrue |= "J" . equalsIgnoreCase ( value ) ; isTrue |= "OUI" . equalsIgnoreCase ( value ) ; result = isTrue ; } else if ( Integer . class . equals ( configEntryType ) ) { result = Integer . parseInt ( value ) ; } else if ( Long . class . equals ( configEntryType ) ) { result = Long . parseLong ( value ) ; } else if ( Float . class . equals ( configEntryType ) ) { result = Float . parseFloat ( value ) ; } else if ( Double . class . equals ( configEntryType ) ) { result = Double . parseDouble ( value ) ; } return ( T ) result ; }
If a converter was provided for this builder, it takes precedence over the built-in converters.
If a converter was provided for this builder it takes precedence over the built - in converters .