}
}
if (provider.getDefaultDescriptor() != null)
{
final ValidationDescriptor providerDescriptor = provider.getDefaultDescriptor();
final ValidationDescriptor descriptor = Descriptors.create(ValidationDescriptor.class);
String defaultProvider = providerDescriptor.getDefaultProvider();
if (defaultProvider != null && !defaultProvider.isEmpty())
{
descriptor.setDefaultProvider(defaultProvider);
}
if (messageInterpolator != null)
{
descriptor.setMessageInterpolator(messageInterpolator);
}
if (traversableResolver != null)
{
descriptor.setTraversableResolver(traversableResolver);
}
if (constraintValidatorFactory != null)
{
descriptor.setConstraintValidatorFactory(constraintValidatorFactory);
}
project.getFacet(ValidationFacet.class).saveConfig(descriptor);
}