On Thu, 5 Mar 2020 22:15:07 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> Florian Kirmaier has updated the pull request incrementally with one >> additional commit since the last revision: >> >> JDK-8236259 >> readded unit-test without any dependency > > tests/system/src/test/java/test/javafx/scene/control/ProgressIndicatorLeakTest.java > line 95: > >> 94: } >> 95: public static void createGarbage() { >> 96: LinkedList list = new LinkedList<Integer>(); > > I think this is fine, but I'm curious as to whether you've actually found > this (creating garbage) to be necessary. Usually, it doesn't make a difference, but it's necessary to make the tests stable. If nothing happens in the JVM then even System.gc won't do anything anymore. Creating garbage stimulates the JVM enough to make GC-based tests stable. ------------- PR: https://git.openjdk.java.net/jfx/pull/71