RegexpURLValidator.isValid() calls DomainNameUtil.isValidDomainAddress(values.getHost()) without null checking the host. The host is extracted from URL_REGEX capture group 2, which is null when the input has no authority component (e.g. http:host.com missing //). The regex still matches, so parseUrl() returns a non null ValueHolder with a null host, and DomainNameUtil.isValidDomainAddress(null) throws NPE at line 78.
Version: hibernate-validator-9.1.0.Final
I’m not sure if this is the right place to report this issue. If not, please point me in the right direction. Thanks