code: private List<CmsResource> updateContextDates(
          CmsDbContext dbc,
          List<CmsResource> resourceList,
          CmsResourceFilter filter) {
  
          if (CmsResourceFilter.ALL == filter) {
              // if there is no filter required, then use the simpler method that does not apply the filter
              return new ArrayList<CmsResource>(updateContextDates(dbc, resourceList));
          }
  
          CmsFlexRequestContextInfo info = dbc.getFlexRequestContextInfo();
          List<CmsResource> result = new ArrayList<CmsResource>(resourceList.size());
          for (int i = 0; i < resourceList.size(); i++) {
              CmsResource resource = resourceList.get(i);
              if (filter.isValid(dbc.getRequestContext(), resource)) {
                  result.add(resource);
              }
              // must also include "invalid" resources for the update of context dates
              // since a resource may be invalid because of release / expiration date
              if (info != null) {
                  info.updateFromResource(resource);
              }
          }
          return result;
      }
docs: Returns a List of {@link CmsResource} objects generated when applying the given filter to the given list,
  also updates the current users context dates with each {@link CmsResource} object in the given list,
  also applies the selected resource filter to all resources in the list and returns the remaining resources.<p>
  
  Please see {@link #updateContextDates(CmsDbContext, CmsResource)} for an explanation of what this method does.<p>
  
  @param dbc the current database context
  @param resourceList a list of {@link CmsResource} objects
  @param filter the resource filter to use
  
  @return a List of {@link CmsResource} objects generated when applying the given filter to the given list