question: 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 ) ; } }
target:  Attach a Closeable to this FD for tracking. parent reference is added to otherParents when needed to make closeAll simpler.