Buggy code:
public class ConnectionManager implements Watcher { protected static final Logger log = LoggerFactory . getLogger ( ConnectionManager . class ) ; private final String name ; private final CountDownLatch clientConnected = new CountDownLatch ( 1 ) ; private boolean connected = false ; private final ZkClientConnectionStrategy connectionStrategy ; private final String zkServerAddress ; private final SolrZkClient client ; private final OnReconnect onReconnect ; private final BeforeReconnect beforeReconnect ; private volatile KeeperState state = KeeperState . Disconnected ; private volatile boolean isClosed = false ; private volatile boolean likelyExpired = true ; private volatile Timer disconnectedTimer ; public ConnectionManager ( String name , SolrZkClient client , String zkServerAddress , ZkClientConnectionStrategy strat , OnReconnect onConnect , BeforeReconnect beforeReconnect ) { } private synchronized void connected ( ) { } private synchronized void disconnected ( ) { } @ Override public void process ( WatchedEvent event ) { if ( ConnectionManager . log . isInfoEnabled ( ) ) { ConnectionManager . log . info ( ( ( ( ( ( ( ( ( ( "Watcher<seq2seq4repair_space>" + ( this ) ) + "<seq2seq4repair_space>name:" ) + ( name ) ) + "<seq2seq4repair_space>got<seq2seq4repair_space>event<seq2seq4repair_space>" ) + event ) + "<seq2seq4repair_space>path:" ) + ( event . getPath ( ) ) ) + "<seq2seq4repair_space>type:" ) + ( event . getType ( ) ) ) ) ; } if ( isClosed ) { ConnectionManager . log . info ( "Client->ZooKeeper<seq2seq4repair_space>status<seq2seq4repair_space>change<seq2seq4repair_space>trigger<seq2seq4repair_space>but<seq2seq4repair_space>we<seq2seq4repair_space>are<seq2seq4repair_space>already<seq2seq4repair_space>closed" ) ; return ; } state = event . getState ( ) ; if ( ( state ) == ( KeeperState . SyncConnected ) ) { connected ( ) ; clientConnected . countDown ( ) ; connectionStrategy . connected ( ) ; } else if ( ( state ) == ( KeeperState . Expired ) ) { if ( ( disconnectedTimer ) != null ) { disconnectedTimer . cancel ( ) ; disconnectedTimer = null ; } connected = false ; likelyExpired = true ; ConnectionManager . log . info ( "Our<seq2seq4repair_space>previous<seq2seq4repair_space>ZooKeeper<seq2seq4repair_space>session<seq2seq4repair_space>was<seq2seq4repair_space>expired.<seq2seq4repair_space>Attempting<seq2seq4repair_space>to<seq2seq4repair_space>reconnect<seq2seq4repair_space>to<seq2seq4repair_space>recover<seq2seq4repair_space>relationship<seq2seq4repair_space>with<seq2seq4repair_space>ZooKeeper..." ) ; if ( ( beforeReconnect ) != null ) { beforeReconnect . command ( ) ; } try { connectionStrategy . reconnect ( zkServerAddress , client . getZkClientTimeout ( ) , this , new ZkClientConnectionStrategy . ZkUpdate ( ) { @ Override public void update ( SolrZooKeeper keeper ) { try { waitForConnected ( Long . MAX_VALUE ) ; } catch ( Exception e1 ) { closeKeeper ( keeper ) ; throw new RuntimeException ( e1 ) ; } ConnectionManager . log . info ( "Connection<seq2seq4repair_space>with<seq2seq4repair_space>ZooKeeper<seq2seq4repair_space>reestablished." ) ; try { client . updateKeeper ( keeper ) ; } catch ( InterruptedException e ) { closeKeeper ( keeper ) ; Thread . currentThread ( ) . interrupt ( ) ; throw new RuntimeException ( e ) ; <START_BUG> } catch ( Throwable t ) { <END_BUG> closeKeeper ( keeper ) ; throw new RuntimeException ( t ) ; } connected ( ) ; if ( ( onReconnect ) != null ) { Thread thread = new Thread ( ) { @ Override public void run ( ) { try { onReconnect . command ( ) ; } catch ( Exception e ) { ConnectionManager . log . warn ( "Exception<seq2seq4repair_space>running<seq2seq4repair_space>onReconnect<seq2seq4repair_space>command" , e ) ; } } } ; thread . start ( ) ; } } } ) ; } catch ( Exception e ) { SolrException . log ( ConnectionManager . log , "" , e ) ; } ConnectionManager . log . info ( ( "Connected:" + ( connected ) ) ) ; } else if ( ( state ) == ( KeeperState . Disconnected ) ) { ConnectionManager . log . info ( "zkClient<seq2seq4repair_space>has<seq2seq4repair_space>disconnected" ) ; disconnected ( ) ; connectionStrategy . disconnected ( ) ; } else { disconnected ( ) ; } } public synchronized boolean isConnected ( ) { } public void close ( ) { } public boolean isLikelyExpired ( ) { } public synchronized void waitForConnected ( long waitForConnection ) throws TimeoutException { } public synchronized void waitForDisconnected ( long timeout ) throws InterruptedException , TimeoutException { } private void closeKeeper ( SolrZooKeeper keeper ) { } }

Fix:
} catch ( Exception t ) {