Using a static cache of standard language Locales and MediaTypes speeds up calls to getAcceptableMediaTypes() and getAcceptableLanguages()
- when there is no such header, or
- there is a header but it contains only a wildcard, or
- there is a header which contains only one entry which is one of the standard MediaTypes or language Locales.
This will not change behavior when there is a non-standard language Locale or MediaType, or if there are multiples.
A copy of the modified class is attached - changes are marked with
// Liberty change
flags, as we have made these changes in the overlay we use in WebSphere Liberty.