public void setSelectedEnvVars (final Set <String> aCollection)
  {
    selectedEnvVars = new HashSet <> ();
    if (aCollection != null)
    {
      for (final String sName : aCollection)
        if (StringHelper.hasText (sName))
          if (!selectedEnvVars.add (sName))
            getLog ().warn ("The selected environment variable '" + sName + "' is contained more than once");
    }
    if (!selectedEnvVars.isEmpty ())
    {
      // If we have a set of selected, don't use all
      if (withAllEnvVars)
      {
        getLog ().warn ("Disabling all environment variables, because selected environment variables are defined!");
        setWithAllEnvVars (false);
      }
    }
  }
public void setSelectedEnvVars ( final Set < String > aCollection ) { selectedEnvVars = new HashSet < > ( ) ; if ( aCollection != null ) { for ( final String sName : aCollection ) if ( StringHelper . hasText ( sName ) ) if ( ! selectedEnvVars . add ( sName ) ) getLog ( ) . warn ( "The selected environment variable '" + sName + "' is contained more than once" ) ; } if ( ! selectedEnvVars . isEmpty ( ) ) { if ( withAllEnvVars ) { getLog ( ) . warn ( "Disabling all environment variables, because selected environment variables are defined!" ) ; setWithAllEnvVars ( false ) ; } } }
Important: parameter type must match member type!