#fixed code
                             @Override
	public final void onWriteDemand( WebSocket conn ) {
		try {
			conn.flush();
		} catch ( IOException e ) {
			handleIOException( conn, e );
		}
		/*synchronized ( write_demands ) {
			if( !write_demands.contains( conn ) ) {
				write_demands.add( conn );
				flusher.submit( new WebsocketWriteTask( conn ) );
			}
		}*/
	}
#vulnerable code 
                             @Override
	public final void onWriteDemand( WebSocket conn ) {
		selector.wakeup();
	} 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION