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

Dmitry Bessonov dbessono at openjdk.org
Sat Jul 2 14:33:53 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

This pull request has now been integrated.

Changeset: 45fd82a8
Author:    Dmitry Bessonov <dbessono at openjdk.org>
URL:       https://git.openjdk.org/jtharness/commit/45fd82a80d0bf77773699dafda4dc75d48f585df
Stats:     5 lines in 1 file changed: 5 ins; 0 del; 0 mod

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

Reviewed-by: jjg

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

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


More information about the jtharness-dev mailing list