Re: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs EchoXML.java

2005-06-21 Thread Stefan Bodewig
On Tue, 21 Jun 2005, Matt Benson <[EMAIL PROTECTED]> wrote:

> Oops.  You can't blame me, though.

I don't.  Luckily I still use JDK 1.3 at work to catch this sort of
problem.

I no longer have access to a 1.2 JDK (haven't tried whether my old
Blackdown version still works on Fedora Core 4), so there could be
even more problems hidden in CVS.

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileUtils.close()

2005-06-21 Thread Kev Jackson

Alexey N. Solofnenko wrote:


Maybe just ioex.printStackTrace()?


I thought it would be better to log to the specific calling task 
(although getting the error message from the exception makes perfect 
sense).  I seem to recall a complaint about close silent behaviour with 
a full filesystem and it taking a *long* time to track down the cause of 
the strange failure, that's the motivation behind the suggestion.


Kev

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 35163] - CVS changelog hangs...

2005-06-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35163


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs EchoXML.java

2005-06-21 Thread Matt Benson
--- [EMAIL PROTECTED] wrote:

> bodewig 2005/06/21 06:39:05
> 
>   Modified:   
> src/main/org/apache/tools/ant/taskdefs EchoXML.java
>   Log:
>   JDK 1.3 doesn't have that constructor (at least
> not public)

Oops.  You can't blame me, though.  Why have

FileOutputStream(String)
FileOutputStream(String, boolean) and
FileOutputStream(File)

but not
FileOutputStream(File, boolean)

(always have someone else to blame)
-Matt




 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FileUtils.close()

2005-06-21 Thread Alexey N. Solofnenko

Maybe just ioex.printStackTrace()?

- Alexey.

Kev Jackson wrote:
This came up before, but I forgot what the consensus was (been a while 
since I've had time to play with Ant).  Whenever FileUtils.close() is 
used, any resulting exceptions are swallowed and no logging is 
performed.  I'd like to propose that instead of this "silent death" 
for close, that there is instead a record of what happened, but that 
the record is voluntary


--FileUtils
   /**
* Close a stream without throwing any exception.
* Record message on tasks log for tracability
* @param device stream, can be null
* @param user task calling this method
* @param message message to log in case of IOException
*/
   public static void close(OutputStream device, Task user, String 
message) {

   if (device != null) {
   try {
   device.close();
   } catch (IOException ioex) {
   user.log(message);
   }
   }
   }

In use...

   } finally {
 FileUtils.close(os, this, "Failed to close output stream 
during method foo");

   }

thoughts/abuse??
Kev

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--

/ Alexey N. Solofnenko
home: http://trelony.cjb.net/
/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/main/org/apache/tools/ant/taskdefs EchoXML.java

2005-06-21 Thread bodewig
bodewig 2005/06/21 06:39:05

  Modified:src/main/org/apache/tools/ant/taskdefs EchoXML.java
  Log:
  JDK 1.3 doesn't have that constructor (at least not public)
  
  Revision  ChangesPath
  1.3   +1 -1  ant/src/main/org/apache/tools/ant/taskdefs/EchoXML.java
  
  Index: EchoXML.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/EchoXML.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EchoXML.java  12 Jun 2005 15:54:14 -  1.2
  +++ EchoXML.java  21 Jun 2005 13:39:05 -  1.3
  @@ -62,7 +62,7 @@
   try {
   OutputStream os = null;
   if (file != null) {
  -os = new FileOutputStream(file, append);
  +os = new FileOutputStream(file.getAbsolutePath(), append);
   } else {
   os = new LogOutputStream(this, Project.MSG_INFO);
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34963] - junit-frames.xsl included with ant does not properly deal with stack traces

2005-06-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34963


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |1.7
Version|1.6.3   |1.6.5




--- Additional Comments From [EMAIL PROTECTED]  2005-06-21 14:09 ---
Actually it is good enough 8-)

Checking in src/etc/junit-frames.xsl;
/home/cvs/ant/src/etc/junit-frames.xsl,v  <--  junit-frames.xsl
new revision: 1.25; previous revision: 1.24
done
Checking in src/etc/junit-noframes.xsl;
/home/cvs/ant/src/etc/junit-noframes.xsl,v  <--  junit-noframes.xsl
new revision: 1.16; previous revision: 1.15
done
Mailing the commit message...


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/etc junit-frames.xsl junit-noframes.xsl

2005-06-21 Thread bodewig
bodewig 2005/06/21 05:09:25

  Modified:.WHATSNEW
   src/etc  junit-frames.xsl junit-noframes.xsl
  Log:
  fix PR 34963, create  in stack-traces
  
  Revision  ChangesPath
  1.840 +5 -2  ant/WHATSNEW
  
  Index: WHATSNEW
  ===
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.839
  retrieving revision 1.840
  diff -u -r1.839 -r1.840
  --- WHATSNEW  6 Jun 2005 22:18:27 -   1.839
  +++ WHATSNEW  21 Jun 2005 12:09:24 -  1.840
  @@ -1,5 +1,5 @@
  -Changes from current Ant 1.6 CVS version to current CVS version
  -=
  +Changes from current Ant 1.6.5 version to current CVS version
  +=
   
   Changes that could break older environments:
   
  @@ -113,6 +113,9 @@
   *  /  now accepts files upto 8GB,  gives an error if larger 
 files are to be included. This is the POSIX size limit.
   
  +*  removed line-breaks from stack-traces.  Bugzilla
  +  Report 34963.
  +
   Other changes:
   --
   
  
  
  
  1.25  +1 -2  ant/src/etc/junit-frames.xsl
  
  Index: junit-frames.xsl
  ===
  RCS file: /home/cvs/ant/src/etc/junit-frames.xsl,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- junit-frames.xsl  14 Mar 2005 09:13:42 -  1.24
  +++ junit-frames.xsl  21 Jun 2005 12:09:24 -  1.25
  @@ -701,8 +701,7 @@
   -->
   
   
  -
  -
  +
   
   
   
  
  
  
  1.16  +2 -3  ant/src/etc/junit-noframes.xsl
  
  Index: junit-noframes.xsl
  ===
  RCS file: /home/cvs/ant/src/etc/junit-noframes.xsl,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- junit-noframes.xsl11 Nov 2004 16:04:43 -  1.15
  +++ junit-noframes.xsl21 Jun 2005 12:09:24 -  1.16
  @@ -5,7 +5,7 @@
 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" />
   
   
   
   
  -
  -
  +
   
   
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java

2005-06-21 Thread bodewig
bodewig 2005/06/21 05:09:06

  Modified:src/testcases/org/apache/tools/ant/taskdefs/optional/junit
JUnitReportTest.java
  Log:
  fix PR 34963, create  in stack-traces
  
  Revision  ChangesPath
  1.11  +1 -1  
ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java
  
  Index: JUnitReportTest.java
  ===
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JUnitReportTest.java  21 Jun 2005 11:53:44 -  1.10
  +++ JUnitReportTest.java  21 Jun 2005 12:09:06 -  1.11
  @@ -91,7 +91,7 @@
   }
   
   // Bugzilla Report 34963
  -public void XtestStackTraceLineBreaks() throws Exception {
  +public void testStackTraceLineBreaks() throws Exception {
   expectReportWithText("testStackTraceLineBreaks", null);
   FileReader r = null;
   try {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34963] - junit-frames.xsl included with ant does not properly deal with stack traces

2005-06-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34963


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED




--- Additional Comments From [EMAIL PROTECTED]  2005-06-21 13:54 ---
I can verify the bug and have committed a (disabled) test demonstrating it,
unfortunately my XSLT is not good enough to fix it right now.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitReportTest.java

2005-06-21 Thread bodewig
bodewig 2005/06/21 04:53:44

  Modified:src/etc/testcases/taskdefs/optional junitreport.xml
   src/testcases/org/apache/tools/ant/taskdefs/optional/junit
JUnitReportTest.java
  Log:
  Unit test for 34963
  
  Revision  ChangesPath
  1.3   +10 -0 ant/src/etc/testcases/taskdefs/optional/junitreport.xml
  
  Index: junitreport.xml
  ===
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/optional/junitreport.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- junitreport.xml   13 May 2005 21:42:23 -  1.2
  +++ junitreport.xml   21 Jun 2005 11:53:44 -  1.3
  @@ -66,4 +66,14 @@
   
   
   
  +
  +  
  +
  +
  +  
  +
  +  
  +  
  +
  +  
   
  
  
  
  1.10  +18 -0 
ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java
  
  Index: JUnitReportTest.java
  ===
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JUnitReportTest.java  13 May 2005 21:54:14 -  1.9
  +++ JUnitReportTest.java  21 Jun 2005 11:53:44 -  1.10
  @@ -18,7 +18,9 @@
   package org.apache.tools.ant.taskdefs.optional.junit;
   
   import java.io.File;
  +import java.io.FileReader;
   import org.apache.tools.ant.BuildFileTest;
  +import org.apache.tools.ant.util.FileUtils;
   
   /**
* Small testcase for the junitreporttask.
  @@ -88,5 +90,21 @@
   XMLResultAggregator.WARNING_INVALID_ROOT_ELEMENT);
   }
   
  +// Bugzilla Report 34963
  +public void XtestStackTraceLineBreaks() throws Exception {
  +expectReportWithText("testStackTraceLineBreaks", null);
  +FileReader r = null;
  +try {
  +r = new FileReader(new File(System.getProperty("root"),
  +
"src/etc/testcases/taskdefs/optional/junitreport/test/html/sampleproject/coins/0_CoinTest.html"));
  +String report = FileUtils.readFully(r);
  +assertTrue("output must contain ",
  +   report.indexOf("junit.framework.AssertionFailedError: 
DOEG")
  +   > -1);
  +} finally {
  +FileUtils.close(r);
  +}
  +}
  +
   }
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 35203] - NullPointerException thrown when using ftp and passive="yes"

2005-06-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35203


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |NEEDINFO




--- Additional Comments From [EMAIL PROTECTED]  2005-06-21 12:37 ---
Could you please attach the stack trace?  Just run Ant with -verbose.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FileUtils.close()

2005-06-21 Thread Kev Jackson
This came up before, but I forgot what the consensus was (been a while 
since I've had time to play with Ant).  Whenever FileUtils.close() is 
used, any resulting exceptions are swallowed and no logging is 
performed.  I'd like to propose that instead of this "silent death" for 
close, that there is instead a record of what happened, but that the 
record is voluntary


--FileUtils
   /**
* Close a stream without throwing any exception.
* Record message on tasks log for tracability
* @param device stream, can be null
* @param user task calling this method
* @param message message to log in case of IOException
*/
   public static void close(OutputStream device, Task user, String 
message) {

   if (device != null) {
   try {
   device.close();
   } catch (IOException ioex) {
   user.log(message);
   }
   }
   }

In use...

   } finally {
 FileUtils.close(os, this, "Failed to close output stream 
during method foo");

   }

thoughts/abuse??
Kev

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]