commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jelly/jelly-tags/util/src/test/org/apache/commons/jelly/tags/util TestJelly.java
Date Thu, 09 Sep 2004 12:22:44 GMT
dion        2004/09/09 05:22:44

  Modified:    jelly/jelly-tags/validate/src/test/org/apache/commons/jelly/tags/validate
                        TestJelly.java
               jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util
                        TokenizeTag.java SleepTag.java PropertiesTag.java
                        FileTag.java UtilTagLibrary.java ReplaceTag.java
               jelly/jelly-tags/validate/src/java/org/apache/commons/jelly/tags/validate
                        ValidateTagLibrary.java AssertValidTag.java
               jelly/jelly-tags/threads/src/test/org/apache/commons/jelly/threads
                        TestJelly.java
               jelly/jelly-tags/util/src/test/org/apache/commons/jelly/tags/util
                        TestJelly.java
  Log:
  Fix license file whitespace
  
  Revision  Changes    Path
  1.4       +7 -7      jakarta-commons/jelly/jelly-tags/validate/src/test/org/apache/commons/jelly/tags/validate/TestJelly.java
  
  Index: TestJelly.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/validate/src/test/org/apache/commons/jelly/tags/validate/TestJelly.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestJelly.java	25 Feb 2004 01:32:00 -0000	1.3
  +++ TestJelly.java	9 Sep 2004 12:22:43 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -20,7 +20,7 @@
   
   import org.apache.commons.jelly.tags.junit.JellyTestSuite;
   
  -/** 
  +/**
    * A helper class to run jelly test cases as part of Ant's JUnit tests
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -31,8 +31,8 @@
       public static void main( String[] args ) throws Exception {
           TestRunner.run( suite() );
       }
  -    
  +
       public static TestSuite suite() throws Exception {
  -        return createTestSuite(TestJelly.class, "suite.jelly");        
  +        return createTestSuite(TestJelly.class, "suite.jelly");
       }
   }
  
  
  
  1.5       +6 -6      jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/TokenizeTag.java
  
  Index: TokenizeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/TokenizeTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TokenizeTag.java	25 Feb 2004 01:31:53 -0000	1.4
  +++ TokenizeTag.java	9 Sep 2004 12:22:43 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -29,15 +29,15 @@
   {
       private String var;
       private String delim;
  -    
  +
       public TokenizeTag()
       {
       }
   
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  -    
  +    //-------------------------------------------------------------------------
  +
       public void doTag(final XMLOutput output) throws MissingAttributeException, JellyTagException
{
           if ( this.var == null )
           {
  
  
  
  1.5       +7 -7      jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/SleepTag.java
  
  Index: SleepTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/SleepTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SleepTag.java	25 Feb 2004 01:31:53 -0000	1.4
  +++ SleepTag.java	9 Sep 2004 12:22:43 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -21,7 +21,7 @@
   import org.apache.commons.jelly.XMLOutput;
   /**
    * A tag which sleeps for a given amount of time.
  - * 
  + *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
    * @version $Revision$
    */
  @@ -32,7 +32,7 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(final XMLOutput output) throws JellyTagException {
           if (millis > 0) {
               try {
  @@ -44,7 +44,7 @@
       }
   
       // Properties
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
   
       /**
        * Sets the amount of time that this thread should sleep for in milliseconds.
  
  
  
  1.6       +13 -13    jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/PropertiesTag.java
  
  Index: PropertiesTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/PropertiesTag.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PropertiesTag.java	7 Sep 2004 02:07:32 -0000	1.5
  +++ PropertiesTag.java	9 Sep 2004 12:22:43 -0000	1.6
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -31,7 +31,7 @@
   /**
    * A tag which loads a properties file from a given file name or URI
    * which are loaded into the current context.
  - * 
  + *
    * @author Jim Birchfield
    * @version $Revision$
    */
  @@ -44,7 +44,7 @@
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(final XMLOutput output) throws JellyTagException {
           if (file == null && uri == null) {
               throw new JellyTagException("This tag must define a 'file' or 'uri' attribute");
  @@ -55,7 +55,7 @@
               if (!f.exists()) {
                   throw new JellyTagException("file: " + file + " does not exist!");
               }
  -            
  +
               try {
                   is = new FileInputStream(f);
               } catch (FileNotFoundException e) {
  @@ -69,13 +69,13 @@
               }
           }
           Properties props = new Properties();
  -        
  +
           try {
               props.load(is);
           } catch (IOException e) {
               throw new JellyTagException("properties tag could not load from file",e);
           }
  -        
  +
           if (var != null) {
               context.setVariable(var, props);
           }
  @@ -84,7 +84,7 @@
               while (propsEnum.hasMoreElements()) {
                   String key = (String) propsEnum.nextElement();
                   String value = props.getProperty(key);
  -                
  +
                   // @todo we should parse the value in case its an Expression
                   context.setVariable(key, value);
               }
  @@ -93,8 +93,8 @@
       }
   
       // Properties
  -    //------------------------------------------------------------------------- 
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * Sets the file name to be used to load the properties file.
        */
  @@ -114,7 +114,7 @@
        * If this is defined then a Properties object containing all the
        * properties will be created and exported, otherwise the current variable
        * scope will be set to the value of the properties.
  -     * 
  +     *
        * @param var The var to set
        */
       public void setVar(String var) {
  
  
  
  1.6       +11 -11    jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/FileTag.java
  
  Index: FileTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/FileTag.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FileTag.java	25 Feb 2004 01:31:53 -0000	1.5
  +++ FileTag.java	9 Sep 2004 12:22:43 -0000	1.6
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -25,27 +25,27 @@
   
   /**
    * A tag which creates a {@link File} from a given name.
  - * 
  + *
    * @author <a href="mailto:dion@apache.org">dIon Gillard</a>
    * @version $Revision$
    */
   public class FileTag extends TagSupport {
  -    
  -    /** The file to place into the context */  
  +
  +    /** The file to place into the context */
       private String name;
  -    
  +
       /** The variable name to place the file into */
       private String var;
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(final XMLOutput output) throws MissingAttributeException, JellyTagException
{
           boolean available = false;
   
           if (name == null) {
               throw new MissingAttributeException("name must be specified");
           }
  -        
  +
           if (var == null) {
               throw new MissingAttributeException("var must be specified");
           }
  @@ -55,7 +55,7 @@
       }
   
       /**
  -     * Name of the file to be placed into the context 
  +     * Name of the file to be placed into the context
        * @param name The fileName to set
        */
       public void setName(String name) {
  
  
  
  1.5       +5 -5      jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/UtilTagLibrary.java
  
  Index: UtilTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/UtilTagLibrary.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- UtilTagLibrary.java	25 Feb 2004 01:31:53 -0000	1.4
  +++ UtilTagLibrary.java	9 Sep 2004 12:22:43 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -23,7 +23,7 @@
    *  @version $Revision$
    */
   public class UtilTagLibrary extends TagLibrary {
  -    
  +
       public UtilTagLibrary() {
           registerTag("available", AvailableTag.class);
           registerTag("file", FileTag.class);
  
  
  
  1.7       +10 -10    jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/ReplaceTag.java
  
  Index: ReplaceTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/ReplaceTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ReplaceTag.java	31 Aug 2004 09:16:28 -0000	1.6
  +++ ReplaceTag.java	9 Sep 2004 12:22:43 -0000	1.7
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -31,13 +31,13 @@
   /**
    * A tag that replaces occurrences of a character or string in its body or
    * (or value) and places the result into the context
  - * 
  + *
    * @author dion
    */
   public class ReplaceTag extends TagSupport {
       /** The Log to which logging calls will be made. */
       private static final Log log = LogFactory.getLog(ReplaceTag.class);
  -    
  +
       /** The variable name to export. */
       private String var;
   
  @@ -46,7 +46,7 @@
   
       /** the old character to be replaced */
       private String oldChar;
  -    
  +
       /** the new character that will replace the old */
       private String newChar;
   
  @@ -55,9 +55,9 @@
   
       /** the new string that will replace the old */
       private String newString;
  -    
  +
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException
{
           // check required properties
           if (oldChar != null) {
  @@ -83,7 +83,7 @@
           } else {
               answer = getBodyText(false);
           }
  -        
  +
           // set the result in the context, or output it
           if (answer != null) {
               String stringAnswer = StringUtils.replace(answer.toString(), oldString, newString);
  @@ -98,7 +98,7 @@
               }
           }
       }
  -    
  +
       /**
        * Returns the newChar used in replacing. Should only be a single
        * character.
  
  
  
  1.4       +4 -4      jakarta-commons/jelly/jelly-tags/validate/src/java/org/apache/commons/jelly/tags/validate/ValidateTagLibrary.java
  
  Index: ValidateTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/validate/src/java/org/apache/commons/jelly/tags/validate/ValidateTagLibrary.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ValidateTagLibrary.java	25 Feb 2004 01:31:58 -0000	1.3
  +++ ValidateTagLibrary.java	9 Sep 2004 12:22:44 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  
  
  
  1.5       +20 -20    jakarta-commons/jelly/jelly-tags/validate/src/java/org/apache/commons/jelly/tags/validate/AssertValidTag.java
  
  Index: AssertValidTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/validate/src/java/org/apache/commons/jelly/tags/validate/AssertValidTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AssertValidTag.java	25 Feb 2004 01:31:58 -0000	1.4
  +++ AssertValidTag.java	9 Sep 2004 12:22:44 -0000	1.5
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -22,9 +22,9 @@
   import org.xml.sax.SAXException;
   import org.xml.sax.SAXParseException;
   
  -/** 
  +/**
    * This tag performs an assertion that the tags body contains XML
  - * which matches a givem schema validation. This tag is used with 
  + * which matches a givem schema validation. This tag is used with
    * JellyUnit to implement an assertion.
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -35,49 +35,49 @@
       private StringBuffer buffer = new StringBuffer();
   
   
  -/*        
  +/*
       public AssertValidTag() {
           setErrorHandler(
               new ErrorHandler() {
                   public void error(SAXParseException exception) throws SAXException {
                       outputException(output, "error", exception);
                   }
  -                
  +
                   public void fatalError(SAXParseException exception) throws SAXException
{
                       outputException(output, "fatalError", exception);
                   }
  -                
  +
                   public void warning(SAXParseException exception) throws SAXException {
                       outputException(output, "warning", exception);
                   }
               }
           );
       }
  -*/    
  +*/
       // Tag interface
  -    //-------------------------------------------------------------------------       
            
  -    public void doTag(final XMLOutput output) throws JellyTagException {    
  +    //-------------------------------------------------------------------------
  +    public void doTag(final XMLOutput output) throws JellyTagException {
           buffer.setLength(0);
           super.doTag(output);
       }
  -    
  +
       // Implementation methods
  -    //-------------------------------------------------------------------------       
            
  -    
  +    //-------------------------------------------------------------------------
  +
       /**
        * Processes whether or not the document is valid.
  -     * Derived classes can overload this method to do different things, such 
  +     * Derived classes can overload this method to do different things, such
        * as to throw assertion exceptions etc.
  -     */    
  +     */
       protected void handleValid(boolean valid) {
           super.handleValid(valid);
  -        
  +
           if ( ! valid ) {
               String message = buffer.toString();
               throw new JellyAssertionFailedError( "The XML is not valid according to the
schema: " + message );
           }
       }
  -    
  +
       /**
        * Outputs the given validation exception as XML to the output
        */
  @@ -91,5 +91,5 @@
           buffer.append( e.getMessage() );
           buffer.append( '\n' );
       }
  -    
  +
   }
  
  
  
  1.4       +5 -5      jakarta-commons/jelly/jelly-tags/threads/src/test/org/apache/commons/jelly/threads/TestJelly.java
  
  Index: TestJelly.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/threads/src/test/org/apache/commons/jelly/threads/TestJelly.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestJelly.java	25 Feb 2004 01:32:00 -0000	1.3
  +++ TestJelly.java	9 Sep 2004 12:22:44 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -20,7 +20,7 @@
   
   import org.apache.commons.jelly.tags.junit.JellyTestSuite;
   
  -/** 
  +/**
    * A helper class to run jelly test cases as part of Ant's JUnit tests
    *
    * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  @@ -31,7 +31,7 @@
       public static void main( String[] args ) throws Exception {
           TestRunner.run( suite() );
       }
  -    
  +
       public static TestSuite suite() throws Exception {
           return createTestSuite(TestJelly.class, "suite.jelly");
       }
  
  
  
  1.4       +4 -4      jakarta-commons/jelly/jelly-tags/util/src/test/org/apache/commons/jelly/tags/util/TestJelly.java
  
  Index: TestJelly.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/util/src/test/org/apache/commons/jelly/tags/util/TestJelly.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestJelly.java	25 Feb 2004 01:32:00 -0000	1.3
  +++ TestJelly.java	9 Sep 2004 12:22:44 -0000	1.4
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message