Suppress false positives by adding the suppression annotation @SuppressWarnings("WithSignatureDiscouraged") to the enclosing element.
@SuppressWarnings("WithSignatureDiscouraged")