code: public static Device getCurrentDevice(RequestAttributes attributes) {
  		return (Device) attributes.getAttribute(CURRENT_DEVICE_ATTRIBUTE, RequestAttributes.SCOPE_REQUEST);
  	}
docs: Static utility method that extracts the current device from the request attributes map.
  Encapsulates the {@link HttpServletRequest#getAttribute(String)} lookup.
  @param attributes the request attributes
  @return the current device, or null if no device has been resolved for the request