ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/cvslib ChangeLogParser.java
Date Tue, 14 Oct 2003 08:43:44 GMT
bodewig     2003/10/14 01:43:44

  Modified:    src/main/org/apache/tools/ant/taskdefs/cvslib
                        ChangeLogParser.java
  Log:
  Use exact matches instead of substring matches in the parser so that
  comments containing dashes or equals signs are less likely to throw
  off the parser.
  
  I have no idea how portable the exact number of characters is, that's
  why I won't merge it into the 1.6 branch.
  
  PR: 8085
  Suggested by:	Peter Leschev
  
  Revision  Changes    Path
  1.23      +3 -3      ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java
  
  Index: ChangeLogParser.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ChangeLogParser.java	17 Sep 2003 20:11:43 -0000	1.22
  +++ ChangeLogParser.java	14 Oct 2003 08:43:44 -0000	1.23
  @@ -148,7 +148,7 @@
        */
       private void processComment(final String line) {
           final String lineSeparator = System.getProperty("line.separator");
  -        if (line.startsWith("======")) {
  +        if (line.equals("============================================================================="))
{
               //We have ended changelog for that particular file
               //so we can save it
               final int end
  @@ -156,7 +156,7 @@
               m_comment = m_comment.substring(0, end);
               saveEntry();
               m_status = GET_FILE;
  -        } else if (line.startsWith("----------------------------")) {
  +        } else if (line.equals("----------------------------")) {
               final int end
                   = m_comment.length() - lineSeparator.length(); //was -1
               m_comment = m_comment.substring(0, end);
  
  
  

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


Mime
View raw message