@Test public void testNullValidator() { final QName name = new QName("notfound"); Validator<?> validator = _registry.getValidator(name); Assert.assertTrue(validator == null); }
@Override public Validator<?> getValidator(QName name) { Validator<?> validator = _validators.get(name); if (validator == null) { validator = _fallbackValidators.get(name); if (validator == null && QNameUtil.isJavaMessageType(name)) { validator = getJavaFallbackValidator(name); if (validator != null && _log.isDebugEnabled()) { _log.debug("Selecting fallback validator: name '" + validator.getName() + "'. Type: " + validator.getClass().getName()); } else if (_log.isDebugEnabled()) { _log.debug("No compatible validator registered: name '" + name + "'"); } } } else if (_log.isDebugEnabled()) { _log.debug("Selecting validator: name '" + validator.getName() + "'. Type: " + validator.getClass().getName()); } return validator == NULL_VALIDATOR ? null : validator; }
BaseValidatorRegistry implements ValidatorRegistry { @Override public Validator<?> getValidator(QName name) { Validator<?> validator = _validators.get(name); if (validator == null) { validator = _fallbackValidators.get(name); if (validator == null && QNameUtil.isJavaMessageType(name)) { validator = getJavaFallbackValidator(name); if (validator != null && _log.isDebugEnabled()) { _log.debug("Selecting fallback validator: name '" + validator.getName() + "'. Type: " + validator.getClass().getName()); } else if (_log.isDebugEnabled()) { _log.debug("No compatible validator registered: name '" + name + "'"); } } } else if (_log.isDebugEnabled()) { _log.debug("Selecting validator: name '" + validator.getName() + "'. Type: " + validator.getClass().getName()); } return validator == NULL_VALIDATOR ? null : validator; } }
BaseValidatorRegistry implements ValidatorRegistry { @Override public Validator<?> getValidator(QName name) { Validator<?> validator = _validators.get(name); if (validator == null) { validator = _fallbackValidators.get(name); if (validator == null && QNameUtil.isJavaMessageType(name)) { validator = getJavaFallbackValidator(name); if (validator != null && _log.isDebugEnabled()) { _log.debug("Selecting fallback validator: name '" + validator.getName() + "'. Type: " + validator.getClass().getName()); } else if (_log.isDebugEnabled()) { _log.debug("No compatible validator registered: name '" + name + "'"); } } } else if (_log.isDebugEnabled()) { _log.debug("Selecting validator: name '" + validator.getName() + "'. Type: " + validator.getClass().getName()); } return validator == NULL_VALIDATOR ? null : validator; } BaseValidatorRegistry();  BaseValidatorRegistry(Set<Validator<?>> validators); }
BaseValidatorRegistry implements ValidatorRegistry { @Override public Validator<?> getValidator(QName name) { Validator<?> validator = _validators.get(name); if (validator == null) { validator = _fallbackValidators.get(name); if (validator == null && QNameUtil.isJavaMessageType(name)) { validator = getJavaFallbackValidator(name); if (validator != null && _log.isDebugEnabled()) { _log.debug("Selecting fallback validator: name '" + validator.getName() + "'. Type: " + validator.getClass().getName()); } else if (_log.isDebugEnabled()) { _log.debug("No compatible validator registered: name '" + name + "'"); } } } else if (_log.isDebugEnabled()) { _log.debug("Selecting validator: name '" + validator.getName() + "'. Type: " + validator.getClass().getName()); } return validator == NULL_VALIDATOR ? null : validator; } BaseValidatorRegistry();  BaseValidatorRegistry(Set<Validator<?>> validators); @Override BaseValidatorRegistry addValidator(Validator<?> validator); @Override ValidatorRegistry addValidator(Validator<?> validator, QName name); @Override Validator<?> getValidator(QName name); @Override boolean hasValidator(QName name); @Override boolean removeValidator(Validator<?> validator); void setEventPublisher(EventPublisher eventPublisher); }
BaseValidatorRegistry implements ValidatorRegistry { @Override public Validator<?> getValidator(QName name) { Validator<?> validator = _validators.get(name); if (validator == null) { validator = _fallbackValidators.get(name); if (validator == null && QNameUtil.isJavaMessageType(name)) { validator = getJavaFallbackValidator(name); if (validator != null && _log.isDebugEnabled()) { _log.debug("Selecting fallback validator: name '" + validator.getName() + "'. Type: " + validator.getClass().getName()); } else if (_log.isDebugEnabled()) { _log.debug("No compatible validator registered: name '" + name + "'"); } } } else if (_log.isDebugEnabled()) { _log.debug("Selecting validator: name '" + validator.getName() + "'. Type: " + validator.getClass().getName()); } return validator == NULL_VALIDATOR ? null : validator; } BaseValidatorRegistry();  BaseValidatorRegistry(Set<Validator<?>> validators); @Override BaseValidatorRegistry addValidator(Validator<?> validator); @Override ValidatorRegistry addValidator(Validator<?> validator, QName name); @Override Validator<?> getValidator(QName name); @Override boolean hasValidator(QName name); @Override boolean removeValidator(Validator<?> validator); void setEventPublisher(EventPublisher eventPublisher);  }