src/main/java/com/amazonaws/hal/client/ConvertingList.java
@Override
    public Object get(int index) {
        Object value = backingList.get(index);

        // When a value is accessed, it's intended type can either be a
        // class or some other type (like a ParameterizedType).
        //
        // If the target type is a class and the value is of that type,
        // we return it.  If the value is not of that type, we convert
        // it and store the converted value (trusting it was converted
        // properly) back to the backing store.
        //
        // If the target type is not a class, it may be ParameterizedType
        // like List<T> or Map<K, V>.  We check if the value is already
        // a converting type and if so, we return it.  If the value is
        // not, we convert it and if it's now a converting type, we store
        // the new value in the backing store.

        if (type instanceof Class) {
            if (!((Class) type).isInstance(value)) {
                value = convert(type, value);

                //noinspection unchecked
                backingList.set(index, value);
            }
        } else {
            if (!(value instanceof ConvertingMap) && !(value instanceof ConvertingList)) {
                value = convert(type, value);

                if (value instanceof ConvertingMap || value instanceof ConvertingList) {
                    //noinspection unchecked
                    backingList.set(index, value);
                }
            }
        }

        return value;
    }
@Override
    public Object get(int index) {
        Object value = backingList.get(index);

        // When a value is accessed, it's intended type can either be a
        // class or some other type (like a ParameterizedType).
        //
        // If the target type is a class and the value is of that type,
        // we return it.  If the value is not of that type, we convert
        // it and store the converted value (trusting it was converted
        // properly) back to the backing store.
        //
        // If the target type is not a class, it may be ParameterizedType
        // like List<T> or Map<K, V>.  We check if the value is already
        // a converting type and if so, we return it.  If the value is
        // not, we convert it and if it's now a converting type, we store
        // the new value in the backing store.

        if (type instanceof Class) {
            if (!((Class) type).isInstance(value)) {
                value = convert(type, value);

                //noinspection unchecked
                backingList.set(index, value);
            }
        } else {
            if (!(value instanceof ConvertingMap) && !(value instanceof ConvertingList)) {
                value = convert(type, value);

                if (value instanceof ConvertingMap || value instanceof ConvertingList) {
                    //noinspection unchecked
                    backingList.set(index, value);
                }
            }
        }

        return value;
    }
@ Override public Object get ( int index ) { Object value = backingList . get ( index ) ; // When a value is accessed, it's intended type can either be a // class or some other type (like a ParameterizedType). // // If the target type is a class and the value is of that type, // we return it.  If the value is not of that type, we convert // it and store the converted value (trusting it was converted // properly) back to the backing store. // // If the target type is not a class, it may be ParameterizedType // like List<T> or Map<K, V>.  We check if the value is already // a converting type and if so, we return it.  If the value is // not, we convert it and if it's now a converting type, we store // the new value in the backing store. if ( type instanceof Class ) { if ( ! ( ( Class ) type ) . isInstance ( value ) ) { value = convert ( type , value ) ; //noinspection unchecked backingList . set ( index , value ) ; } } else { if ( ! ( value instanceof ConvertingMap ) && ! ( value instanceof ConvertingList ) ) { value = convert ( type , value ) ; if ( value instanceof ConvertingMap || value instanceof ConvertingList ) { //noinspection unchecked backingList . set ( index , value ) ; } } } return value ; }
-------------------------------------------------------------
-------------------------------------------------------------