The scenario is depicted in this object graph:
Root -> .... -> SR -> A -> ... -> WR -> B -> ....
where SR is a SoftReference that points to object A and WR is a WeakReference
that points to object B. Both A and B are not reachable.
As specified in the java.lang.ref spec, B is softly reachable as
(1) B is not strongly reachable, and
(2) B can be reached by traversing a soft reference (SR)
B is not weakly-reachable since it is softly reachable as described
When GC decides not to clear the soft reference, it would be intuitive
to consider that as a strong reference for the rest of the GC operation
and therefore clear WR and reclaim B. The behavior conforming to
the current specification doesn't clear WR (as B is not weakly reachable).
This RFE is to request an enhancement to the java.lang.ref API to
support this new behavior.