From dbessono at openjdk.org Fri Jul 1 14:07:21 2022 From: dbessono at openjdk.org (Dmitry Bessonov) Date: Fri, 1 Jul 2022 14:07:21 GMT Subject: RFR: 7903224: InitialUrlFilter::isInitialUrlMatch should do early detection of incorrect initial URL passed Message-ID: 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 From jjg at openjdk.org Sat Jul 2 14:29:52 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Sat, 2 Jul 2022 14:29:52 GMT Subject: RFR: 7903224: InitialUrlFilter::isInitialUrlMatch should do early detection of incorrect initial URL passed In-Reply-To: References: Message-ID: On Fri, 1 Jul 2022 14:01:07 GMT, Dmitry Bessonov 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 From dbessono at openjdk.org Sat Jul 2 14:33:53 2022 From: dbessono at openjdk.org (Dmitry Bessonov) Date: Sat, 2 Jul 2022 14:33:53 GMT Subject: Integrated: 7903224: InitialUrlFilter::isInitialUrlMatch should do early detection of incorrect initial URL passed In-Reply-To: References: Message-ID: On Fri, 1 Jul 2022 14:01:07 GMT, Dmitry Bessonov 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 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 From dbessono at openjdk.org Sat Jul 2 16:25:28 2022 From: dbessono at openjdk.org (Dmitry Bessonov) Date: Sat, 2 Jul 2022 16:25:28 GMT Subject: RFR: 7903229: ParameterFilter - check initFiles for any File with an empty path Message-ID: ParameterFilter.java : method `update` could check check initFiles (which is result of `stringsToFiles()` call) for any File with an empty path ------------- Commit messages: - 7903229: ParameterFilter - check initFiles for any File with an empty path Changes: https://git.openjdk.org/jtharness/pull/33/files Webrev: https://webrevs.openjdk.org/?repo=jtharness&pr=33&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903229 Stats: 8 lines in 1 file changed: 8 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jtharness/pull/33.diff Fetch: git fetch https://git.openjdk.org/jtharness pull/33/head:pull/33 PR: https://git.openjdk.org/jtharness/pull/33