Claes, Thanks for spotting this inefficiency.
The new code catches the case when a collector is erroneously removed, but not when a new one is introduced. Can you extract verification logic into separate method and check there that the number of collectors is equal to the hard-coded constant?New webrev: http://cr.openjdk.java.net/~redestad/8062180/webrev.01
Otherwise, looks good. Best regards, Vladimir Ivanov
