synchronized void attach(Closeable c){
  if (parent == null) {
    parent=c;
  }
 else   if (otherParents == null) {
    otherParents=new ArrayList<>();
    otherParents.add(parent);
    otherParents.add(c);
  }
 else {
    otherParents.add(c);
  }
}

synchronized void attach ( Closeable c ) { if ( parent == null ) { parent = c ; } else if ( otherParents == null ) { otherParents = new ArrayList < > ( ) ; otherParents . add ( parent ) ; otherParents . add ( c ) ; } else { otherParents . add ( c ) ; } }
attach a closeable to this fd for tracking . parent reference is added to otherparents when needed to make closeall simpler .
