Skip to content

Commit

Permalink
Hibernate validator interprets Locale.ROOT as array of all
Browse files Browse the repository at this point in the history
  • Loading branch information
Karm committed Nov 22, 2023
1 parent b5e3748 commit ed2a896
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.function.Supplier;

Expand Down Expand Up @@ -75,10 +76,11 @@ public void created(BeanContainer container) {
configuration.localeResolver(localeResolver);
}

configuration
.builtinConstraints(detectedBuiltinConstraints)
configuration.builtinConstraints(detectedBuiltinConstraints)
.initializeBeanMetaData(classesToBeValidated)
.locales(localesBuildTimeConfig.locales)
// Locales, Locale ROOT means all locales in this setting.
.locales(localesBuildTimeConfig.locales.contains(Locale.ROOT) ? Set.of(Locale.getAvailableLocales())
: localesBuildTimeConfig.locales)
.defaultLocale(localesBuildTimeConfig.defaultLocale)
.beanMetaDataClassNormalizer(new ArcProxyBeanMetaDataClassNormalizer());

Expand Down

0 comments on commit ed2a896

Please sign in to comment.