import re


def is_groovy_errors(warning_text: str) -> bool:
    """detect https://issues.apache.org/jira/browse/GROOVY-8339 error messages"""
    return (
        not warning_text.startswith("WARNING: An illegal reflective access operation has occurred")
        and not warning_text.startswith("WARNING: Illegal reflective access by")
        and not warning_text.startswith("WARNING: Please consider reporting")
        and not warning_text.startswith("WARNING: All illegal access operations")
        and not warning_text.startswith("WARNING: Use --illegal-access=warn")
        and not re.match("^\\s*$", warning_text)
    )