RFR: 8248001: javadoc generates invalid HTML pages whose ftp:// links are broken

Anthony Vanelverdinghe github.com+15714253+anthonyvdotbe at openjdk.java.net
Sat Aug 21 08:04:22 UTC 2021


On Fri, 20 Aug 2021 11:56:08 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> That said a stricter regexp (unless I'm mistaken) could be: `^[a-zA-Z][a-zA-Z0-9+-.]*:.+$`
>> [ from RFC 2396:     scheme        = alpha *( alpha | digit | "+" | "-" | "." ) ]
>
> My only concerns were correctness and code reuse. Using an API doesn't require one to read through RFC.

I'd argue for simply adding `ftp:` as an additional condition (unless there's other interesting URI schemes I'm not thinking of?). If a regex is to be used, I agree it should be much stricter (and defined in a constant, so that the `Pattern` doesn't need to be compiled on each invocation?).

-------------

PR: https://git.openjdk.java.net/jdk/pull/5198


More information about the javadoc-dev mailing list