src/main/java/org/apache/sling/api/resource/ValueMap.java [70:101]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Object value = get(name);
        if (value == null) {
            return null;
        }
        if (type.isAssignableFrom(value.getClass())) {
            return (T)value;
        }
        return ObjectConverter.convert(value,type);
    }

    /**
     * Get a named property and convert it into the given type.
     * This method does not support conversion into a primitive type or an
     * array of a primitive type. It should return the default value in this
     * case.
     * <br><br>
     * <b>Implementation hint</b>: In the past it was allowed to call this with a 2nd parameter being {@code null}. 
     * Therefore all implementations should internally call {@link #get(Object)} when the 2nd parameter
     * has value {@code null}.
     *
     * @param name The name of the property
     * @param <T> The expected type
     * @param defaultValue The default value to use if the named property does
     *            not exist or cannot be converted to the requested type. The
     *            default value is also used to define the type to convert the
     *            value to. Must not be {@code null}. If you want to return {@code null} by default
     *            rather rely on {@link #get(String, Class)}.
     * @return Return named value converted to type T or the default value if
     *         non existing or can't be converted.
     */
    @SuppressWarnings("unchecked")
    @NotNull
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/sling/api/wrappers/CompositeValueMap.java [100:114]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Object value = get(name);
        if (value == null) {
            return null;
        }
        if (type.isAssignableFrom(value.getClass())) {
            return (T)value;
        }
        return ObjectConverter.convert(value,type);
    }

    /**
     * {@inheritDoc}
     */
    @SuppressWarnings("unchecked")
    @NotNull
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



