On Thu, 8 Oct 2020 07:50:02 GMT, Ambarish Rapte <ara...@openjdk.org> wrote:
>> Florian Kirmaier has updated the pull request incrementally with one >> additional commit since the last revision: >> >> JDK-8244297 >> Fixed unit-test > > modules/javafx.base/src/test/java/test/util/memory/JMemoryBuddy.java line 255: > >> 253: >> 254: static class AssertCollectable { >> 255: WeakReference<Object> assertCollectable; > > There is method, class member variable and class itself with the same name > `assertCollectable`. > I think they should be named differently, like for instance, > 1. Class `AssertCollectable` can be named as `CollectableReferernce` or > `ReferenceToBeGC` > 2. The member variable `assertCollectable` can be named as just `weakRef` or > `reference`. > 3. The method `assertCollectable` can be named as `checkIfGCed` or > `checkIfCollected` > > Similar change for `AssertNotCollectable` 1.) Main purpose of the class is being easy searchable in tools like VisualVM. CollectableReference isn't correct, because we don't know whether it's collectable. That's what we are checking. 2.) true, but the old name has the benefit to be easier recognizable in tools like VisualVM. 3.) See other comments on the same topic. ------------- PR: https://git.openjdk.java.net/jfx/pull/204