Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 84003 invoked from network); 8 Nov 2002 15:02:10 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 8 Nov 2002 15:02:10 -0000 Received: (qmail 4485 invoked by uid 97); 8 Nov 2002 15:03:03 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 4460 invoked by uid 97); 8 Nov 2002 15:03:01 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 4442 invoked by uid 97); 8 Nov 2002 15:03:00 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: 8 Nov 2002 15:01:58 -0000 Message-ID: <20021108150158.75505.qmail@icarus.apache.org> From: bodewig@apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs FixCRLF.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N bodewig 2002/11/08 07:01:58 Modified: src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH FixCRLF.java Log: Merge fix for PR14061 from HEAD Revision Changes Path No revision No revision 1.37.2.3 +12 -8 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java Index: FixCRLF.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java,v retrieving revision 1.37.2.2 retrieving revision 1.37.2.3 diff -u -r1.37.2.2 -r1.37.2.3 --- FixCRLF.java 19 Jun 2002 02:17:27 -0000 1.37.2.2 +++ FixCRLF.java 8 Nov 2002 15:01:58 -0000 1.37.2.3 @@ -299,7 +299,7 @@ public void setTablength(int tlength) throws BuildException { if (tlength < 2 || tlength > 80) { throw new BuildException("tablength must be between 2 and 80", - location); + getLocation()); } tablength = tlength; StringBuffer sp = new StringBuffer(); @@ -449,7 +449,7 @@ break; case IN_MULTI_COMMENT: - endComment + endComment = lineString.indexOf("*/", line.getNext()); if (endComment >= 0) { // End of multiLineComment on this line @@ -486,7 +486,7 @@ if (line.getNextCharInc() == '\t') { line.setColumn(line.getColumn() + tablength - - (line.getColumn() + (line.getColumn() % tablength)); } else { line.incColumn(); @@ -495,7 +495,7 @@ // Now output the substring try { - outWriter.write(line.substring(begin, + outWriter.write(line.substring(begin, line.getNext())); } catch (IOException e) { throw new BuildException(e); @@ -547,7 +547,7 @@ lines.close(); lines = null; } catch (IOException e) { - throw new BuildException("Unable to close source file " + throw new BuildException("Unable to close source file " + srcFile); } @@ -807,15 +807,18 @@ private BufferedReader reader; private StringBuffer line = new StringBuffer(); private boolean reachedEof = false; + private File srcFile; public OneLiner(File srcFile) throws BuildException { + this.srcFile = srcFile; try { reader = new BufferedReader (getReader(srcFile), INBUFLEN); nextLine(); } catch (IOException e) { - throw new BuildException(e); + throw new BuildException(srcFile + ": "+ e.getMessage(), + e, getLocation()); } } @@ -899,7 +902,8 @@ } // end of if (eolcount == 0) } catch (IOException e) { - throw new BuildException(e); + throw new BuildException(srcFile + ": "+ e.getMessage(), + e, getLocation()); } } -- To unsubscribe, e-mail: For additional commands, e-mail: