On Fri, 20 Aug 2021 13:32:24 GMT, Pavel Rappo <pra...@openjdk.org> wrote:
>> Ian Graves has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Couple of fixes > > test/jdk/java/util/regex/NegativeArraySize.java line 29: > >> 27: * @summary Pattern.compile() can throw confusing >> NegativeArraySizeException >> 28: * @requires os.maxMemory >= 5g >> 29: * @run testng/othervm -Xms5G -Xmx5G NegativeArraySize > > I note that the order of the arguments has changed. Will that work as > expected? Had it worked as expected before? The new order is consistent with other tests. I had difficulty getting it to run in the original configuration. Perhaps jtreg is more sensitive on order with the testng runner. > test/jdk/java/util/regex/RegExTest.java line 121: > >> 119: private static void check(String p, String s, boolean expected) { >> 120: Matcher matcher = Pattern.compile(p).matcher(s); >> 121: assertSame(matcher.find(), expected); > > Why use `assertSame(Object, Object)`? I would expect `assertEquals(boolean, > boolean)`. Artifacting because of the use of `==` I'll make it more readable. ------------- PR: https://git.openjdk.java.net/jdk/pull/5092