diff --git a/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/headers/HeaderUtil.java b/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/headers/HeaderUtil.java index 15239f7aa1cc5..0324278db92ed 100644 --- a/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/headers/HeaderUtil.java +++ b/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/headers/HeaderUtil.java @@ -32,6 +32,7 @@ */ @SuppressWarnings({ "rawtypes", "unchecked" }) public class HeaderUtil { + private static final List LANGUAGE_WILDCARD = List.of(Locale.ROOT); private static final ClassValue> HEADER_DELEGATE_CACHE = new ClassValue<>() { @Override @@ -293,7 +294,7 @@ public static List getAcceptableMediaTypes(MultivaluedMap getAcceptableLanguages(MultivaluedMap headers) { List accepts = headers.get(HttpHeaders.ACCEPT_LANGUAGE); if (accepts == null || accepts.isEmpty()) - return Collections.emptyList(); + return LANGUAGE_WILDCARD; List languages = new ArrayList(); for (Object obj : accepts) { if (obj instanceof Locale) {