adammurdoch    2002/06/23 03:43:15

  Modified:    antlib/src/java/org/apache/antlib/vfile/selectors
                        NotFileSelector.java Resources.properties
  Log:
  Fix <not> selector, so that it supports a single nested condition.
  
  Revision  Changes    Path
  1.2       +8 -2      
jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/vfile/selectors/NotFileSelector.java
  
  Index: NotFileSelector.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/vfile/selectors/NotFileSelector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NotFileSelector.java      14 Apr 2002 10:56:20 -0000      1.1
  +++ NotFileSelector.java      23 Jun 2002 10:43:14 -0000      1.2
  @@ -32,8 +32,14 @@
       /**
        * Sets the nested selector.
        */
  -    public void set( final FileSelector selector )
  +    public void add( final FileSelector selector )
  +        throws TaskException
       {
  +        if( m_selector != null )
  +        {
  +            final String message = REZ.getString( 
"notfileselector.too-many-selectors.error" );
  +            throw new TaskException( message );
  +        }
           m_selector = selector;
       }
   
  
  
  
  1.2       +1 -0      
jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/vfile/selectors/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/vfile/selectors/Resources.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Resources.properties      14 Apr 2002 10:56:20 -0000      1.1
  +++ Resources.properties      23 Jun 2002 10:43:14 -0000      1.2
  @@ -3,6 +3,7 @@
   nameselector.bad-pattern.error=Invalid name pattern "{0}".
   
   notfileselector.no-selector.error=No selector specified.
  +notfileselector.too-many-selectors.error=Too many selectors specified.
   
   namefileselector.no-path.error=Cannot use the <name> file selector here.
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to