question: public void joinChannels ( Set < String > channels ) { Set < String > valid = new LinkedHashSet < > ( ) ; Set < String > invalid = new LinkedHashSet < > ( ) ; for ( String channel : channels ) { String checkedChannel = Helper . toValidChannel ( channel ) ; if ( checkedChannel == null ) { invalid . add ( channel ) ; } else { valid . add ( checkedChannel ) ; } } for ( String channel : invalid ) { listener . onJoinError ( channels , channel , JoinError . INVALID_NAME ) ; } joinValidChannels ( valid ) ; }
target:  Join a rename of channels. Sorts out invalid channels and outputs an error message, then joins the valid channels.