for (int i = 0; (i < validatorSearchPath.length) && (validatorClass == null); i++) { validatorClass = this.findValidatorClass(validatorSearchPath[i] + suffix);
if (validatorSearchPath != null) { for (int i = 0; (i < validatorSearchPath.length) && (validatorClass == null); i++) { validatorClass = this.findValidatorClass(validatorSearchPath[i] + suffix); }
    public Validator findValidator(Class domainClass) {        Assert.notNull(domainClass, "domainClass cannot be null");        Class validatorClass = null;        Validator validator = null;        if (validatorMap.containsKey(domainClass)) {            // already known to our Map            validatorClass = (Class) validatorMap.get(domainClass);        } else {            validatorClass = this.findValidatorClass(domainClass.getName()                    + VALIDATOR_SUFFIX);            if (validatorClass == null) {                String suffix = "." + ClassUtils.getShortName(domainClass)                    + VALIDATOR_SUFFIX;                for (int i = 0;                    (i < validatorSearchPath.length)                    && (validatorClass == null); i++) {                    validatorClass = this.findValidatorClass(validatorSearchPath[i]                            + suffix);                }            }            // register the Validator in our Map, to speed up next retrieval            this.registerValidator(domainClass, validatorClass);        }        // Attempt to create an instance of the Validator        try {            validator = (Validator) validatorClass.newInstance();        } catch (ClassCastException cce) {}        catch (InstantiationException ie) {}        catch (IllegalAccessException ile) {}        return validator;    }