mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
18.58.2014 9314d4add5ffbc40b21347539a0e503964dae207
opendj-sdk/opendj-config/src/main/java/org/forgerock/opendj/config/ClassPropertyDefinition.java
@@ -157,8 +157,8 @@
        try {
            validateValue(value, options);
        } catch (IllegalPropertyValueException e) {
            throw new IllegalPropertyValueStringException(this, value, e.getCause());
        } catch (PropertyException e) {
            throw PropertyException.illegalPropertyValueException(this, value, e.getCause());
        }
        return value;
@@ -187,7 +187,7 @@
     *            The class representing the requested type.
     * @return Returns the named class cast to a subclass of the specified
     *         class.
     * @throws IllegalPropertyValueException
     * @throws PropertyException
     *             If the named class was invalid, could not be loaded, or did
     *             not implement the required interfaces.
     * @throws ClassCastException
@@ -240,7 +240,7 @@
    private void validateClassName(String className) {
        String nvalue = className.trim();
        if (!nvalue.matches(CLASS_RE)) {
            throw new IllegalPropertyValueException(this, className);
            throw PropertyException.illegalPropertyValueException(this, className);
        }
    }
@@ -253,7 +253,7 @@
        for (String i : instanceOfInterfaces) {
            Class<?> instanceOfClass = loadClassForValidation(className, i, initialize);
            if (!instanceOfClass.isAssignableFrom(theClass)) {
                throw new IllegalPropertyValueException(this, className);
                throw PropertyException.illegalPropertyValueException(this, className);
            }
        }
        return theClass;
@@ -264,10 +264,10 @@
            return loadClass(classToBeLoaded.trim(), initialize);
        } catch (ClassNotFoundException e) {
            // If the class cannot be loaded then it is an invalid value.
            throw new IllegalPropertyValueException(this, componentClassName, e);
            throw PropertyException.illegalPropertyValueException(this, componentClassName, e);
        } catch (LinkageError e) {
            // If the class cannot be initialized then it is an invalid value.
            throw new IllegalPropertyValueException(this, componentClassName, e);
            throw PropertyException.illegalPropertyValueException(this, componentClassName, e);
        }
    }
}