bval-jsr/src/main/java/org/apache/bval/jsr/ApacheValidatorFactory.java [293:309]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            @SuppressWarnings("unchecked")
            final T result = (T) this;
            return result;
        }

        // FIXME 2011-03-27 jw:
        // This code is unsecure.
        // It should allow only a fixed set of classes.
        // Can't fix this because don't know which classes this method should support.

        if (!(type.isInterface() || Modifier.isAbstract(type.getModifiers()))) {
            return newInstance(type);
        }
        try {
            final Class<?> cls = Reflection.toClass(type.getName() + "Impl");
            if (type.isAssignableFrom(cls)) {
                @SuppressWarnings("unchecked")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



bval-jsr/src/main/java/org/apache/bval/jsr/ValidatorImpl.java [106:116]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            @SuppressWarnings("unchecked")
            final T result = (T) this;
            return result;
        }
        if (!(type.isInterface() || Modifier.isAbstract(type.getModifiers()))) {
            return newInstance(type);
        }
        try {
            final Class<?> cls = Reflection.toClass(type.getName() + "Impl");
            if (type.isAssignableFrom(cls)) {
                @SuppressWarnings("unchecked")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



