RFR: 7903224: InitialUrlFilter::isInitialUrlMatch should do early detection of incorrect initial URL passed

Jonathan Gibbons jjg at openjdk.org
Sat Jul 2 14:29:52 UTC 2022


On Fri, 1 Jul 2022 14:01:07 GMT, Dmitry Bessonov <dbessono at openjdk.org> wrote:

> Method of InitialUrlFilter class
> 
>     public static boolean isInitialUrlMatch(String toCheck, String compareTo) {
> 
> contains
> 
> 
>    compareTo.charAt(compareTo.length() - 1)
> 
> 
> 
> This would lead to StringIndexOutOfBounds in case if `compareTo` is empty.
> 
> It would be better to check correctness of passed `compareTo` arg earlier

Marked as reviewed by jjg (Lead).

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

PR: https://git.openjdk.org/jtharness/pull/32


More information about the jtharness-dev mailing list