private boolean hasCspChanged(@NotNull final StringBuilder cspText) {
    boolean result = !cspText.equals(lastCsp);

    // if it has changed remember what it changed to, for next time this method is called.
    if (result) {
      lastCsp.setLength(0);
      lastCsp.append(cspText);
    }

    return result;
  }