web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource.java
protected Collection<String> getUserRoles(HttpServletRequest request) {
		ArrayList<String> j2eeUserRolesList = new ArrayList<>();

		for (String role : j2eeMappableRoles) {
			if (request.isUserInRole(role)) {
				j2eeUserRolesList.add(role);
			}
		}

		return j2eeUserRolesList;
	}
protected Collection<String> getUserRoles(HttpServletRequest request) {
		ArrayList<String> j2eeUserRolesList = new ArrayList<>();

		for (String role : j2eeMappableRoles) {
			if (request.isUserInRole(role)) {
				j2eeUserRolesList.add(role);
			}
		}

		return j2eeUserRolesList;
	}
Obtains the list of user roles based on the current user's JEE roles. The
{@link javax.servlet.http.HttpServletRequest#isUserInRole(String)} method is called
for each of the values in the {@code j2eeMappableRoles} set to determine if that
role should be assigned to the user.

@param request the request which should be used to extract the user's roles.
@return The subset of {@code j2eeMappableRoles} which applies to the current user
making the request.