private WeakReference<Object> newWeakReference(ReferenceQueue<Object> queue){
  Object o=new Object();
  WeakReference<Object> ref=new WeakReference<Object>(o,queue);
  assertSame(o,ref.get());
  return ref;
}

private WeakReference < Object > newWeakReference ( ReferenceQueue < Object > queue ) { Object o = new Object ( ) ; WeakReference < Object > ref = new WeakReference < Object > ( o , queue ) ; assertSame ( o , ref . get ( ) ) ; return ref ; }
helper method to prevent live - precise bugs from interfering with analysis of what is reachable . do not inline this method ; otherwise tests may fail on vms that are not live - precise . http : / / b / 4191345
