Hi Daniel, the fix looks good to me.
In the test, you could remove the import java.util.Set; in line 36 and List<ThreadGroup> groups of line 74 is not needed as well. BTW, as you are touching it, src/java.base/share/classes/java/lang/ThreadGroup.java does not need the import jdk.internal.misc.VM; in line 30 neither. Maybe you want to clean that up, too? Best regards Christoph > -----Original Message----- > From: core-libs-dev <core-libs-dev-boun...@openjdk.java.net> On Behalf > Of Daniel Fuchs > Sent: Dienstag, 12. März 2019 16:59 > To: core-libs-dev <core-libs-dev@openjdk.java.net> > Subject: RFR: 8219197: ThreadGroup.enumerate() may return wrong value > > Hi, > > Please find below a simple fix for > 8219197: ThreadGroup.enumerate() may return wrong value > > http://cr.openjdk.java.net/~dfuchs/webrev_8219197/webrev.00/ > > This is a bug in the implementation of the recursion, > as enumerate(list, n, recurse) should never have returned > a value < n. > > The test passes with the fix and fails 'often enough' without > it (~ 1 times out of 2 or 3). > > best regards, > > -- daniel