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

Matthew Swift
05.45.2014 3bacede53a932eea576d4b814ab20c2e18b5040c
opendj-sdk/opendj-config/src/main/java/org/forgerock/opendj/config/ClassPropertyDefinition.java
@@ -43,9 +43,8 @@
 * <p>
 * Note that in a client/server environment, the client is probably not capable
 * of validating the Java class (e.g. it will not be able to load it nor have
 * access to the interfaces it is supposed to implement). For this reason, it is
 * possible to switch off validation in the client by using the appropriate
 * {@link PropertyDefinitionsOptions}.
 * access to the interfaces it is supposed to implement). For this reason,
 * validation is disabled in client applications.
 */
public final class ClassPropertyDefinition extends PropertyDefinition<String> {
@@ -117,7 +116,7 @@
    // Load a named class.
    private static Class<?> loadClass(String className, boolean initialize) throws ClassNotFoundException {
        return Class.forName(className, initialize, ClassLoaderProvider.getInstance().getClassLoader());
        return Class.forName(className, initialize, ConfigurationFramework.getInstance().getClassLoader());
    }
    // List of interfaces which property values must implement.
@@ -152,11 +151,11 @@
     * {@inheritDoc}
     */
    @Override
    public String decodeValue(String value, PropertyDefinitionsOptions options) {
    public String decodeValue(String value) {
        Reject.ifNull(value);
        try {
            validateValue(value, options);
            validateValue(value);
        } catch (PropertyException e) {
            throw PropertyException.illegalPropertyValueException(this, value, e.getCause());
        }
@@ -219,7 +218,7 @@
     * {@inheritDoc}
     */
    @Override
    public void validateValue(String value, PropertyDefinitionsOptions options) {
    public void validateValue(String value) {
        Reject.ifNull(value);
        // Always make sure the name is a valid class name.
@@ -229,7 +228,7 @@
         * If additional validation is enabled then attempt to load the class
         * and check the interfaces that it implements/extends.
         */
        if (options.allowClassValidation()) {
        if (!ConfigurationFramework.getInstance().isClient()) {
            validateClassInterfaces(value, false);
        }
    }