types/src/main/java/com/google/common/html/types/SafeHtmlBuilder.java
private static void checkLinkDependentAttributes(
      @Nullable String relValue, AttributeContract hrefValueContract) {

    if (hrefValueContract.equals(AttributeContract.SAFE_URL)
        && relValue != null
        && !LINK_HREF_SAFE_URL_REL_WHITELIST.contains(relValue.toLowerCase(Locale.ENGLISH))) {
      throw new IllegalArgumentException(
          "SafeUrl values for the href attribute are not allowed on <link rel="
              + relValue
              + ">. Did you intend to use a TrustedResourceUrl?");
    }
  }
private static void checkLinkDependentAttributes(
      @Nullable String relValue, AttributeContract hrefValueContract) {

    if (hrefValueContract.equals(AttributeContract.SAFE_URL)
        && relValue != null
        && !LINK_HREF_SAFE_URL_REL_WHITELIST.contains(relValue.toLowerCase(Locale.ENGLISH))) {
      throw new IllegalArgumentException(
          "SafeUrl values for the href attribute are not allowed on <link rel="
              + relValue
              + ">. Did you intend to use a TrustedResourceUrl?");
    }
  }
Checks that this combination of rel value and href contract is safe.

@param relValue is the value of rel or null if rel isn't present.
@throws IllegalArgumentException if this value and contract combination is not allowed.