forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: xml-forrest/src/java/org/apache/cocoon/components/modules/input AntPropertiesModule.java
Date Tue, 27 Jan 2004 15:01:10 GMT
nicolaken    2004/01/27 07:01:10

  Modified:    src/java/org/apache/cocoon/components/modules/input
                        AntPropertiesModule.java
  Log:
  Ignore empty lines.
  Fix a bug inserted in the last commit, as I had accidentaly removed
  teh insertion of the new value in the Map.
  
  Revision  Changes    Path
  1.3       +2 -1      xml-forrest/src/java/org/apache/cocoon/components/modules/input/AntPropertiesModule.java
  
  Index: AntPropertiesModule.java
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/java/org/apache/cocoon/components/modules/input/AntPropertiesModule.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AntPropertiesModule.java	27 Jan 2004 14:03:38 -0000	1.2
  +++ AntPropertiesModule.java	27 Jan 2004 15:01:10 -0000	1.3
  @@ -121,7 +121,7 @@
                
               while((currentLine = in.readLine()) != null) {
                   // # == comment
  -                if(!currentLine.startsWith("#")){ 
  +                if(!currentLine.startsWith("#")&&!(currentLine.trim().length()==0)){

                       splitIndex =  currentLine.indexOf('='); 
                       name = currentLine.substring(0, splitIndex).trim();
                       //if the property is already there don't overwrite, as in Ant
  @@ -135,6 +135,7 @@
                               String valueToReplaceWith = (String) m_properties.get(currentName);
                               value = StringUtils.replace(value, valueToSearchFor, valueToReplaceWith);
                           }
  +                        m_properties.put(name,value);
                       }    
                   }    
               }
  
  
  

Mime
View raw message