private ValidationException getExceptionForNullValidator(Type validatedValueType, String path) { if ( descriptor.getConstraintType() == ConstraintDescriptorImpl.ConstraintType.CROSS_PARAMETER ) { return LOG.getValidatorForCrossParameterConstraintMustEitherValidateObjectOrObjectArrayException( descriptor.getAnnotationType() ); } else { String className = validatedValueType.toString(); if ( validatedValueType instanceof Class ) { Class<?> clazz = (Class<?>) validatedValueType; if ( clazz.isArray() ) { className = clazz.getComponentType().toString() + "[]"; } else { className = clazz.getName(); } } return LOG.getNoValidatorFoundForTypeException( descriptor.getAnnotationType(), className, path ); } }
private void throwExceptionForNullValidator(Type validatedValueType, String path) { if ( descriptor.getConstraintType() == ConstraintDescriptorImpl.ConstraintType.CROSS_PARAMETER ) { throw log.getValidatorForCrossParameterConstraintMustEitherValidateObjectOrObjectArrayException( descriptor.getAnnotationType() ); } else { String className = validatedValueType.toString(); if ( validatedValueType instanceof Class ) { Class<?> clazz = (Class<?>) validatedValueType; if ( clazz.isArray() ) { className = clazz.getComponentType().toString() + "[]"; } else { className = clazz.getName(); } } throw log.getNoValidatorFoundForTypeException( descriptor.getAnnotationType(), className, path ); } }