Software Development, Programming, Self Improvement, Java, Spring Boot.
determineRoles(Set<String> strRoles) throws RoleNotFoundException { Set<Role> roles = new HashSet<>(); if (strRoles == null) { roles.add(roleFactory.getInstance("user")); } else { for (String role : strRoles) { roles.add(roleFactory.getInstance(role)); } } return roles; } }