From 36e39c68cef8f3d8d77a6810a88912a55c38cf02 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 14 Oct 2003 08:43:44 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275471 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java b/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java index d30a9f2c6..0c53d22f9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java +++ b/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java @@ -148,7 +148,7 @@ class ChangeLogParser { */ 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 @@ class ChangeLogParser { 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);