Skip to content

Commit

Permalink
fix: Collections.emptyList() is final (#14899)
Browse files Browse the repository at this point in the history
  • Loading branch information
paradiseidler authored Nov 16, 2024
1 parent fcb03ae commit 7df5a89
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static String encodeCookie(HttpCookie cookie) {

public static List<String> parseAccept(String header) {
if (header == null) {
return Collections.emptyList();
return new ArrayList<>();
}
List<Item<String>> mediaTypes = new ArrayList<>();
for (String item : StringUtils.tokenize(header, ',')) {
Expand Down Expand Up @@ -126,7 +126,7 @@ public static float parseQuality(String expr, int index) {
public static List<Locale> parseAcceptLanguage(String header) {
List<Item<Locale>> locales = new ArrayList<>();
if (header == null) {
return Collections.emptyList();
return new ArrayList<>();
}
for (String item : StringUtils.tokenize(header, ',')) {
String[] pair = StringUtils.tokenize(item, ';');
Expand All @@ -138,7 +138,7 @@ public static List<Locale> parseAcceptLanguage(String header) {
public static List<Locale> parseContentLanguage(String header) {
List<Locale> locales = new ArrayList<>();
if (header == null) {
return Collections.emptyList();
return new ArrayList<>();
}
for (String item : StringUtils.tokenize(header, ',')) {
locales.add(parseLocale(item));
Expand Down

0 comments on commit 7df5a89

Please sign in to comment.