- private synchronized String[] loadDynamicAuthenticationClasses() {
- String[] authenticationObjects = WebApplicationContextUtils.getWebApplicationContext(getServletContext())
- .getEnvironment().getProperty(AUTHENTICATION_CLASS).split(",");
- Arrays.stream(authenticationObjects).forEach(className -> className.trim());
- return authenticationObjects;
+ private synchronized List<String> loadDynamicAuthenticationClasses() {
+ return Arrays.stream(WebApplicationContextUtils.getWebApplicationContext(getServletContext())
+ .getEnvironment().getProperty(AUTHENTICATION_CLASS).split(",")).map(className -> className.trim())
+ .collect(Collectors.toList());