protected boolean clearSpecial(DatabaseConnection connection,Logger logger){
  NestedConnection currentSaved=specialConnection.get();
  boolean cleared=false;
  if (connection == null) {
  }
 else   if (currentSaved == null) {
    logger.error("no connection has been saved when clear() called");
  }
 else   if (currentSaved.connection == connection) {
    if (currentSaved.decrementAndGet() == 0) {
      specialConnection.set(null);
    }
    cleared=true;
  }
 else {
    logger.error("connection saved {} is not the one being cleared {}",currentSaved.connection,connection);
  }
  return cleared;
}

protected boolean clearSpecial ( DatabaseConnection connection , Logger logger ) { NestedConnection currentSaved = specialConnection . get ( ) ; boolean cleared = false ; if ( connection == null ) { } else if ( currentSaved == null ) { logger . error ( "no connection has been saved when clear() called" ) ; } else if ( currentSaved . connection == connection ) { if ( currentSaved . decrementAndGet ( ) == 0 ) { specialConnection . set ( null ) ; } cleared = true ; } else { logger . error ( "connection saved {} is not the one being cleared {}" , currentSaved . connection , connection ) ; } return cleared ; }
clear the connection that was previously saved .
