private static UserActivityProviderComponent getActivityProviderComponent(Component component) {
    return component instanceof UserActivityProviderComponent
           ? (UserActivityProviderComponent)component
           : UIUtil.getClientProperty(component, UserActivityProviderComponent.class);
  }
private static UserActivityProviderComponent getActivityProviderComponent(Component component)