code: private Set<IPermission> removeInactivePermissions(final IPermission[] perms) {
          Date now = new Date();
  
          Set<IPermission> rslt = new HashSet<>(1);
  
          for (int i = 0; i < perms.length; i++) {
              IPermission p = perms[i];
  
              if ((p.getEffective() == null || !p.getEffective().after(now))
                      && (p.getExpires() == null || p.getExpires().after(now))) {
                  rslt.add(p);
              }
          }
  
          return rslt;
      }
docs: Returns a Set containing those IPermission instances where the present date is neither after
  the permission expiration if present nor before the permission start date if present. Only
  permissions objects that have been filtered by this method should be checked.
  
  @return Potentially empty non-null Set of active permissions.