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

Dmitry Bessonov dbessono at openjdk.org
Fri Jul 1 14:07:21 UTC 2022


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

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

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

Changes: https://git.openjdk.org/jtharness/pull/32/files
 Webrev: https://webrevs.openjdk.org/?repo=jtharness&pr=32&range=00
  Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903224
  Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jtharness/pull/32.diff
  Fetch: git fetch https://git.openjdk.org/jtharness pull/32/head:pull/32

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


More information about the jtharness-dev mailing list