Skip to content

Commit 801b722

Browse files
committed
feat: improve streams
1 parent 24cff2b commit 801b722

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: backend/src/main/java/ch/xxx/maps/adapter/config/ForwardServletFilter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
6161
} else {
6262
Iterable<Locale> iterable = () -> myRequest.getLocales().asIterator();
6363
Locale userLocale = StreamSupport.stream(iterable.spliterator(), false)
64-
.filter(myLocale -> SUPPORTED_LOCALES.contains(myLocale)).findFirst().orElse(Locale.ENGLISH);
64+
.filter(SUPPORTED_LOCALES::contains).findFirst().orElse(Locale.ENGLISH);
6565
String forwardPath = String.format("/%s/index.html", userLocale.getLanguage());
6666
// LOG.info(String.format("Forward to: %s", forwardPath));
6767
RequestDispatcher dispatcher = myRequest.getServletContext().getRequestDispatcher(forwardPath);

0 commit comments

Comments
 (0)