code: public static void checkIfNoneMatch(final String method, final String ifNoneMatch, final EntityTag etag) {
          if (ifNoneMatch == null) {
              return;
          }
  
          final Set<String> items = stream(ifNoneMatch.split(",")).map(String::trim).collect(toSet());
          if (isGetOrHead(method)) {
              if ("*".equals(ifNoneMatch) || items.stream().map(EntityTag::valueOf)
                      .anyMatch(e -> e.equals(etag) || e.equals(new EntityTag(etag.getValue(), !etag.isWeak())))) {
                  throw new RedirectionException(notModified().build());
              }
          } else {
              if ("*".equals(ifNoneMatch) || items.stream().map(EntityTag::valueOf).anyMatch(isEqual(etag))) {
                  throw new ClientErrorException(status(PRECONDITION_FAILED).build());
              }
          }
       }
docs: Check for a conditional operation.
  @param method the HTTP method
  @param ifNoneMatch the If-None-Match header
  @param etag the resource etag