public static void validateChannel(String channel){
  if (channel == null) {
    throw new IllegalArgumentException("Channel cannot be null");
  }
  if (channel.length() > Messenger.MAX_CHANNEL_SIZE) {
    throw new ChannelNameTooLongException(channel);
  }
}

public static void validateChannel ( String channel ) { if ( channel == null ) { throw new IllegalArgumentException ( "Channel cannot be null" ) ; } if ( channel . length ( ) > Messenger . MAX_CHANNEL_SIZE ) { throw new ChannelNameTooLongException ( channel ) ; } }
validates a plugin channel name .
