CDATA (final String str) { // Overrides Text.setText() because this needs to check that CDATA rules // are enforced. We could have a separate Verifier check for CDATA // beyond Text and call that alone before super.setText(). if (str == null || str.isEmpty()) { value = EMPTY_STRING; return this; } final String reason = Verifier.checkCDATASection(str); if (reason != null) { throw new IllegalDataException(str, "CDATA section", reason); } value = str; return this; }