[Patch] Minor tweaks to ZipEntry and ZipOutputStream

2004-12-15 Thread kj
- changed format of for loops to remove method calls
- removed other method calls
- made access to ZipEntry.DEFLATED/STORED more explicit to stop compiler
whining
- changed one javadoc

On large file sets the VM should work a little less (a few method
calls/entry) - minor performance improvement.

Kev
Index: ZipEntry.java
===
RCS file: /home/cvspublic/ant/src/main/org/apache/tools/zip/ZipEntry.java,v
retrieving revision 1.21
diff -u -r1.21 ZipEntry.java
--- ZipEntry.java	4 Dec 2004 00:03:50 -	1.21
+++ ZipEntry.java	15 Dec 2004 04:20:01 -
@@ -20,8 +20,6 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.Vector;
-import java.util.Date;
-import java.util.Calendar;
 import java.util.zip.ZipException;
 
 /**
@@ -259,7 +257,7 @@
 public void addExtraField(ZipExtraField ze) {
 ZipShort type = ze.getHeaderId();
 boolean done = false;
-for (int i = 0; !done  i  extraFields.size(); i++) {
+for (int i = 0, fieldsSize = extraFields.size(); !done  i  fieldsSize; i++) {
 if (((ZipExtraField) extraFields.elementAt(i)).getHeaderId().equals(type)) {
 extraFields.setElementAt(ze, i);
 done = true;
@@ -278,7 +276,7 @@
  */
 public void removeExtraField(ZipShort type) {
 boolean done = false;
-for (int i = 0; !done  i  extraFields.size(); i++) {
+for (int i = 0, fieldsSize = extraFields.size(); !done  i  fieldsSize; i++) {
 if (((ZipExtraField) extraFields.elementAt(i)).getHeaderId().equals(type)) {
 extraFields.removeElementAt(i);
 done = true;
Index: ZipOutputStream.java
===
RCS file: /home/cvspublic/ant/src/main/org/apache/tools/zip/ZipOutputStream.java,v
retrieving revision 1.30
diff -u -r1.30 ZipOutputStream.java
--- ZipOutputStream.java	4 Dec 2004 00:03:50 -	1.30
+++ ZipOutputStream.java	15 Dec 2004 04:20:01 -
@@ -89,7 +89,7 @@
  *
  * @since 1.1
  */
-private int method = DEFLATED;
+private int method = java.util.zip.ZipEntry.DEFLATED;
 
 /**
  * List of ZipEntries written so far.
@@ -209,14 +209,14 @@
  *
  * @since 1.1
  */
-public static final int DEFLATED = ZipEntry.DEFLATED;
+public static final int DEFLATED = java.util.zip.ZipEntry.DEFLATED;
 
 /**
- * Compression method for deflated entries.
+ * Compression method for stored entries.
  *
  * @since 1.1
  */
-public static final int STORED = ZipEntry.STORED;
+public static final int STORED = java.util.zip.ZipEntry.STORED;
 
 /**
  * Creates a new ZIP OutputStream filtering the underlying stream.
@@ -299,7 +299,7 @@
 public void finish() throws IOException {
 closeEntry();
 cdOffset = written;
-for (int i = 0; i  entries.size(); i++) {
+for (int i = 0, entriesSize = entries.size(); i  entriesSize; i++) {
 writeCentralFileHeader((ZipEntry) entries.elementAt(i));
 }
 cdLength = written - cdOffset;
@@ -561,9 +561,12 @@
 writeOut(LFH_SIG);
 written += 4;
 
+//store method in local variable to prevent multiple method calls
+final int zipMethod = ze.getMethod();
+
 // version needed to extract
 // general purpose bit flag
-if (ze.getMethod() == DEFLATED  raf == null) {
+if (zipMethod == DEFLATED  raf == null) {
 // requires version 2 as we are going to store length info
 // in the data descriptor
 writeOut(ZipShort.getBytes(20));
@@ -577,7 +580,7 @@
 written += 4;
 
 // compression method
-writeOut(ZipShort.getBytes(ze.getMethod()));
+writeOut(ZipShort.getBytes(zipMethod));
 written += 2;
 
 // last mod. time and date
@@ -588,7 +591,7 @@
 // compressed length
 // uncompressed length
 localDataStart = written;
-if (ze.getMethod() == DEFLATED || raf != null) {
+if (zipMethod == DEFLATED || raf != null) {
 writeOut(LZERO);
 writeOut(LZERO);
 writeOut(LZERO);

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

AW: PropertyHelper log message

2004-12-15 Thread Jan . Materne
You can change that, but then with your second suggestion
   \foo\
because property names could contain blanks. And that would be
hard to read.

Mmh, the override-ignored message doesnt contain the \ neither.
  Override ignored for property with blank
What do you think here? (setNewProperty())


Jan


project
  property name=with blank value=with blank value/
  echo message=${with blank}/
/project

 -Ursprüngliche Nachricht-
 Von: Matt Benson [mailto:[EMAIL PROTECTED]
 Gesendet am: Dienstag, 14. Dezember 2004 21:27
 An: Ant Developers List
 Betreff: PropertyHelper log message
 
 In PropertyHelper.replaceProperties() a verbose log
 message is written when substitution syntax is found
 that does not map to a property: Property ${foo} has
 not been set.  I submit that the message should read
 Property foo has not been set or Property \foo\
 has not been set as this is the type of misuse of ${}
 notation that causes so much trouble in if/unless
 attributes.  I'd like to know the popular opinion on
 the subject.
 
 Thanks,
 Matt
 
 
   
 __ 
 Do you Yahoo!? 
 Send a seasonal email greeting and help others. Do good. 
 http://celebrity.mail.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Re: LibrariesTest

2004-12-15 Thread Stefan Bodewig
On Tue, 14 Dec 2004, Matt Benson [EMAIL PROTECTED] wrote:

 ...is in oata.taskdefs.  Should it not be in
 oata.taskdefs.repository ?

Yes, I agree.

Also it currently fails for me (hijacking your subject line 8-) after
a fresh bootstrap.

[junit] Download count mismatch: expected 0 but fetched 1
[junit] 
/home/bodewig/ASF/jakarta/jakarta-ant/src/etc/testcases/taskdefs/libraries.xml:242:
 Download count mismatch: expected 0 but fetched 1
[junit] at 
org.apache.tools.ant.taskdefs.repository.AssertDownloaded.afterFetched(AssertDownloaded.java:75)
[junit] at 
org.apache.tools.ant.taskdefs.repository.Libraries.doExecute(Libraries.java:423)
[junit] at 
org.apache.tools.ant.taskdefs.repository.Libraries.execute(Libraries.java:351)
[junit] at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[junit] at java.lang.reflect.Method.invoke(Native Method)
[junit] at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:95)
[junit] at org.apache.tools.ant.Task.perform(Task.java:366)
[junit] at org.apache.tools.ant.Target.execute(Target.java:341)
[junit] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[junit] at 
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1243)
[junit] at org.apache.tools.ant.Project.executeTarget(Project.java:1213)
[junit] at 
org.apache.tools.ant.BuildFileTest.executeTarget(BuildFileTest.java:243)
[junit] at 
org.apache.tools.ant.taskdefs.LibrariesTest.execIfOnline(LibrariesTest.java:89)
[junit] at 
org.apache.tools.ant.taskdefs.LibrariesTest.testTimestamp(LibrariesTest.java:169)

Stefan

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



Re: PropertyHelper log message

2004-12-15 Thread Stefan Bodewig
On Tue, 14 Dec 2004, Matt Benson [EMAIL PROTECTED] wrote:

 I'd like to know the popular opinion on the subject.

No popular opinion, just mine. 8-)

Make that foo - and yes, for the override message as well, Jan.

Stefan

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



Re: Internal AntCall and references

2004-12-15 Thread Stefan Bodewig
On Mon, 13 Dec 2004, Yves Martin [EMAIL PROTECTED] wrote:

  To clean it, I decided to use project references but it does not
  work with 'antcall':

This is because you set the reference in a different Project instance
than you try to read it in.

  target A
antcall B
MyTask{getReference X}
 
  target B
MyTask{setReference X}
 
  Is there a better way to implement a global storage ?

Option (1) don't use antcall at all.

Option (2) use a Map as your global storage and set this one as
reference before invoking antcall (with inheritrefs=true) and have
MyTask not set the reference in the project, but add it to your global
storage.

This also requires you Map to be not Cloneable since otherwise B will
only see a copy of your global storage and be unable to write to it.
Ant tries its best to make it hard for subbuilds to affect their
parent build.

Stefan

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



cvs commit: ant/src/main/org/apache/tools/zip ZipEntry.java ZipOutputStream.java

2004-12-15 Thread bodewig
bodewig 2004/12/15 00:14:08

  Modified:src/main/org/apache/tools/zip ZipEntry.java
ZipOutputStream.java
  Log:
  Loop optimization, Submitted by Kevin Jackson
  
  Revision  ChangesPath
  1.22  +3 -5  ant/src/main/org/apache/tools/zip/ZipEntry.java
  
  Index: ZipEntry.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/zip/ZipEntry.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- ZipEntry.java 4 Dec 2004 00:03:50 -   1.21
  +++ ZipEntry.java 15 Dec 2004 08:14:08 -  1.22
  @@ -20,8 +20,6 @@
   import java.lang.reflect.InvocationTargetException;
   import java.lang.reflect.Method;
   import java.util.Vector;
  -import java.util.Date;
  -import java.util.Calendar;
   import java.util.zip.ZipException;
   
   /**
  @@ -259,7 +257,7 @@
   public void addExtraField(ZipExtraField ze) {
   ZipShort type = ze.getHeaderId();
   boolean done = false;
  -for (int i = 0; !done  i  extraFields.size(); i++) {
  +for (int i = 0, fieldsSize = extraFields.size(); !done  i  
fieldsSize; i++) {
   if (((ZipExtraField) 
extraFields.elementAt(i)).getHeaderId().equals(type)) {
   extraFields.setElementAt(ze, i);
   done = true;
  @@ -278,7 +276,7 @@
*/
   public void removeExtraField(ZipShort type) {
   boolean done = false;
  -for (int i = 0; !done  i  extraFields.size(); i++) {
  +for (int i = 0, fieldsSize = extraFields.size(); !done  i  
fieldsSize; i++) {
   if (((ZipExtraField) 
extraFields.elementAt(i)).getHeaderId().equals(type)) {
   extraFields.removeElementAt(i);
   done = true;
  
  
  
  1.31  +12 -9 ant/src/main/org/apache/tools/zip/ZipOutputStream.java
  
  Index: ZipOutputStream.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/zip/ZipOutputStream.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- ZipOutputStream.java  4 Dec 2004 00:03:50 -   1.30
  +++ ZipOutputStream.java  15 Dec 2004 08:14:08 -  1.31
  @@ -89,7 +89,7 @@
*
* @since 1.1
*/
  -private int method = DEFLATED;
  +private int method = java.util.zip.ZipEntry.DEFLATED;
   
   /**
* List of ZipEntries written so far.
  @@ -209,14 +209,14 @@
*
* @since 1.1
*/
  -public static final int DEFLATED = ZipEntry.DEFLATED;
  +public static final int DEFLATED = java.util.zip.ZipEntry.DEFLATED;
   
   /**
  - * Compression method for deflated entries.
  + * Compression method for stored entries.
*
* @since 1.1
*/
  -public static final int STORED = ZipEntry.STORED;
  +public static final int STORED = java.util.zip.ZipEntry.STORED;
   
   /**
* Creates a new ZIP OutputStream filtering the underlying stream.
  @@ -299,7 +299,7 @@
   public void finish() throws IOException {
   closeEntry();
   cdOffset = written;
  -for (int i = 0; i  entries.size(); i++) {
  +for (int i = 0, entriesSize = entries.size(); i  entriesSize; i++) {
   writeCentralFileHeader((ZipEntry) entries.elementAt(i));
   }
   cdLength = written - cdOffset;
  @@ -561,9 +561,12 @@
   writeOut(LFH_SIG);
   written += 4;
   
  +//store method in local variable to prevent multiple method calls
  +final int zipMethod = ze.getMethod();
  +
   // version needed to extract
   // general purpose bit flag
  -if (ze.getMethod() == DEFLATED  raf == null) {
  +if (zipMethod == DEFLATED  raf == null) {
   // requires version 2 as we are going to store length info
   // in the data descriptor
   writeOut(ZipShort.getBytes(20));
  @@ -577,7 +580,7 @@
   written += 4;
   
   // compression method
  -writeOut(ZipShort.getBytes(ze.getMethod()));
  +writeOut(ZipShort.getBytes(zipMethod));
   written += 2;
   
   // last mod. time and date
  @@ -588,7 +591,7 @@
   // compressed length
   // uncompressed length
   localDataStart = written;
  -if (ze.getMethod() == DEFLATED || raf != null) {
  +if (zipMethod == DEFLATED || raf != null) {
   writeOut(LZERO);
   writeOut(LZERO);
   writeOut(LZERO);
  
  
  

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



Re: Internal AntCall and references

2004-12-15 Thread Yves Martin
Stefan Bodewig [EMAIL PROTECTED] writes:

 On Mon, 13 Dec 2004, Yves Martin [EMAIL PROTECTED] wrote:

  To clean it, I decided to use project references but it does not
  work with 'antcall':

 This is because you set the reference in a different Project instance
 than you try to read it in.

  target A
antcall B
MyTask{getReference X}
 
  target B
MyTask{setReference X}
 
  Is there a better way to implement a global storage ?

 Option (1) don't use antcall at all.

 I think it is impossible. My target A looks like to:

   target A
 Job before
 Loop { antcall B }
 MyTask{getReference X}

 What I may do is to create my own 'call' task that calls a target in the same
 project (as depends attribute does I guess). Is it a good idea ?

 Option (2) use a Map as your global storage and set this one as
 reference before invoking antcall (with inheritrefs=true) and have
 MyTask not set the reference in the project, but add it to your global
 storage.

 I will try that also.

 This also requires you Map to be not Cloneable since otherwise B will
 only see a copy of your global storage and be unable to write to it.
 Ant tries its best to make it hard for subbuilds to affect their
 parent build.

 Yes, I understand that perfectly.

 Regards
-- 
Yves Martin


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



[GUMP@brutus]: Project test-ant (in module ant) failed

2004-12-15 Thread Gump Integration Build
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at [EMAIL PROTECTED]

Project test-ant has an issue affecting its community integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- test-ant :  Java based build tool


Full details are available at:
http://brutus.apache.org/gump/public/ant/test-ant/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Optional dependency rhino prerequisite failed with reason build failed
 -INFO- Failed with reason build failed



The following work was performed:
http://brutus.apache.org/gump/public/ant/test-ant/gump_work/build_ant_test-ant.html
Work Name: build_ant_test-ant (Type: Build)
Work ended in a state of : Failed
Elapsed: 6 mins 38 secs
Command Line: java -Djava.awt.headless=true 
-Xbootclasspath/p:/usr/local/gump/public/workspace/xml-xerces2/java/build/xercesImpl.jar:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar:/usr/local/gump/public/workspace/xml-xalan/java/build/serializer.jar:/usr/local/gump/public/workspace/xml-xalan/java/build/xalan-unbundled.jar
 org.apache.tools.ant.Main 
-Dgump.merge=/home/gump/workspaces2/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only -Dtest.haltonfailure=false 
-Dant.home=/usr/local/gump/public/workspace/ant/dist run-tests 
[Working Directory: /usr/local/gump/public/workspace/ant]
CLASSPATH: 

RE: Internal AntCall and references

2004-12-15 Thread Jose Alberto Fernandez
Isn't there a task in Ant-contrib that allows returning values from the
sub-build to the main?
Can't remember its name.

Jose Alberto

 -Original Message-
 From: Stefan Bodewig [mailto:[EMAIL PROTECTED] 
 Sent: 15 December 2004 08:10
 To: [EMAIL PROTECTED]
 Subject: Re: Internal AntCall and references
 
 
 On Mon, 13 Dec 2004, Yves Martin [EMAIL PROTECTED] wrote:
 
   To clean it, I decided to use project references but it does not  
  work with 'antcall':
 
 This is because you set the reference in a different Project 
 instance than you try to read it in.
 
   target A
 antcall B
 MyTask{getReference X}
  
   target B
 MyTask{setReference X}
  
   Is there a better way to implement a global storage ?
 
 Option (1) don't use antcall at all.
 
 Option (2) use a Map as your global storage and set this one 
 as reference before invoking antcall (with inheritrefs=true) 
 and have MyTask not set the reference in the project, but add 
 it to your global storage.
 
 This also requires you Map to be not Cloneable since 
 otherwise B will only see a copy of your global storage and 
 be unable to write to it. Ant tries its best to make it hard 
 for subbuilds to affect their parent build.
 
 Stefan
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: Internal AntCall and references

2004-12-15 Thread Jose Alberto Fernandez
 From: Yves Martin [mailto:[EMAIL PROTECTED] 
 
 
 Stefan Bodewig [EMAIL PROTECTED] writes:
 
  On Mon, 13 Dec 2004, Yves Martin [EMAIL PROTECTED] wrote:
 
   To clean it, I decided to use project references but it does not  
  work with 'antcall':
 
  This is because you set the reference in a different 
 Project instance 
  than you try to read it in.
 
   target A
 antcall B
 MyTask{getReference X}
  
   target B
 MyTask{setReference X}
  
   Is there a better way to implement a global storage ?
 
  Option (1) don't use antcall at all.
 
  I think it is impossible. My target A looks like to:
 
target A
  Job before
  Loop { antcall B }
  MyTask{getReference X}
 

You may want to take a look at the for/ task in antcontrib
which uses a macro for the content of the loop.

  What I may do is to create my own 'call' task that calls a 
 target in the same  project (as depends attribute does I 
 guess). Is it a good idea ?
 
  Option (2) use a Map as your global storage and set this one as 
  reference before invoking antcall (with inheritrefs=true) and have 
  MyTask not set the reference in the project, but add it to 
 your global 
  storage.
 
  I will try that also.
 
  This also requires you Map to be not Cloneable since 
 otherwise B will 
  only see a copy of your global storage and be unable to 
 write to it. 
  Ant tries its best to make it hard for subbuilds to affect their 
  parent build.
 
  Yes, I understand that perfectly.
 
  Regards
 -- 
 Yves Martin
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



AW: [GUMP@brutus]: Project test-ant (in module ant) failed

2004-12-15 Thread Jan . Materne
[junit] Testsuite: org.apache.tools.ant.taskdefs.TouchTest
[junit] Tests run: 11, Failures: 0, Errors: 1, Time elapsed: 0.75 sec
[junit] Testcase:
testGoodPattern(org.apache.tools.ant.taskdefs.TouchTest):   Caused an
ERROR
[junit] condition satisfied
[junit]
/home/gump/workspaces2/public/workspace/ant/src/etc/testcases/taskdefs/touch
.xml:106: condition satisfied
[junit] at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:141)

(16 hours, 40 minutes ago) by mbenson 
touch gets nested mapper plus verbose, mkdirs, and pattern attributes.


Jan

 -Ursprüngliche Nachricht-
 Von: Gump Integration Build [mailto:[EMAIL PROTECTED]
 Gesendet am: Mittwoch, 15. Dezember 2004 11:05
 An: [EMAIL PROTECTED]
 Betreff: [EMAIL PROTECTED]: Project test-ant (in module ant) failed
 
 Project test-ant has an issue affecting its community integration.
 This issue affects 1 projects.
 The current state of this project is 'Failed', with reason 
 'Build Failed'.
 For reference only, the following projects are affected by this:
 - test-ant :  Java based build tool
 
 
 Full details are available at:
 http://brutus.apache.org/gump/public/ant/test-ant/index.html
 


Re: [Patch] FileUtils to use own close method

2004-12-15 Thread Stefan Bodewig
On Mon, 13 Dec 2004, kj [EMAIL PROTECTED] wrote:

 -FileUtils now uses close to close inputstreams inside itself

I've applied this part of the patch, but have some more comments on
the rest:

 +int stackSize = s.size();
  while (tok.hasMoreTokens()) {
  String thisToken = tok.nextToken();
  if (..equals(thisToken)) {
  continue;
  } else if (...equals(thisToken)) {
 -if (s.size()  2) {
 -throw new BuildException(Cannot resolve path  + orig);
 -} else {
 +if (stackSize  2) {
  s.pop();
 +} else {
 +throw new BuildException(Cannot resolve path  + orig);
  }

here s.pop() is going to change s.size(), but you don't update
stackSize.

 +/* If we have Java = 1.4, we can use NIO
 + * This buffer comparison simply maps the entire file into memory,
 + * it's not concerned with memory usage - for large files this
 + * may cause problems 
 + */
 +if (JavaEnvUtils.getJavaVersion().equals(JavaEnvUtils.JAVA_1_4)
 +||JavaEnvUtils.getJavaVersion().equals(JavaEnvUtils.JAVA_1_5)
 +) {

If you want to assert JDK 1.4+, you better reverse the logic for
forwards compatibility reasons.  I.e. check that we currently are not
running on JDK 1.2 or 1.3 (less than 1.2 is not possible anymore).

Stefan

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



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

2004-12-15 Thread bodewig
bodewig 2004/12/15 04:28:29

  Modified:.WHATSNEW
   src/main/org/apache/tools/ant/taskdefs/rmic KaffeRmic.java
  Log:
  Document Kaffe rmic changes
  
  Revision  ChangesPath
  1.699 +3 -0  ant/WHATSNEW
  
  Index: WHATSNEW
  ===
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.698
  retrieving revision 1.699
  diff -u -r1.698 -r1.699
  --- WHATSNEW  14 Dec 2004 23:52:44 -  1.698
  +++ WHATSNEW  15 Dec 2004 12:28:29 -  1.699
  @@ -146,6 +146,9 @@
   * Refactored Target invocation into org.apache.tools.ant.Executor
 implementations.  Bugzilla Reports 21421, 29248.
   
  +* rmic now also supports Kaffe's rmic version shipping with Kaffe
  +  1.1.2 and above.
  +
   Fixed bugs:
   ---
   
  
  
  
  1.21  +1 -0  
ant/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
  
  Index: KaffeRmic.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- KaffeRmic.java14 Dec 2004 17:36:54 -  1.20
  +++ KaffeRmic.java15 Dec 2004 12:28:29 -  1.21
  @@ -30,6 +30,7 @@
*/
   public class KaffeRmic extends DefaultRmicAdapter {
   public static final String RMIC_CLASSNAME = gnu.java.rmi.rmic.RMIC;
  +// pre Kaffe 1.1.2
   private static final String OLD_RMIC_CLASSNAME = kaffe.rmi.rmic.RMIC;
   
   /**
  
  
  

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



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

2004-12-15 Thread bodewig
bodewig 2004/12/15 04:31:44

  Modified:.Tag: ANT_16_BRANCH WHATSNEW
   src/main/org/apache/tools/ant/taskdefs/rmic Tag:
ANT_16_BRANCH KaffeRmic.java
  Log:
  merge
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.503.2.150 +3 -0  ant/WHATSNEW
  
  Index: WHATSNEW
  ===
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.503.2.149
  retrieving revision 1.503.2.150
  diff -u -r1.503.2.149 -r1.503.2.150
  --- WHATSNEW  14 Dec 2004 23:48:00 -  1.503.2.149
  +++ WHATSNEW  15 Dec 2004 12:31:43 -  1.503.2.150
  @@ -29,6 +29,9 @@
   * Refactored Target invocation into org.apache.tools.ant.Executor
 implementations.  Bugzilla Reports 21421, 29248.
   
  +* rmic now also supports Kaffe's rmic version shipping with Kaffe
  +  1.1.2 and above.
  +
   Fixed bugs:
   ---
   
  
  
  
  No   revision
  No   revision
  1.11.2.5  +56 -15
ant/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
  
  Index: KaffeRmic.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java,v
  retrieving revision 1.11.2.4
  retrieving revision 1.11.2.5
  diff -u -r1.11.2.4 -r1.11.2.5
  --- KaffeRmic.java9 Mar 2004 17:01:54 -   1.11.2.4
  +++ KaffeRmic.java15 Dec 2004 12:31:44 -  1.11.2.5
  @@ -29,33 +29,74 @@
* @since Ant 1.4
*/
   public class KaffeRmic extends DefaultRmicAdapter {
  +public static final String RMIC_CLASSNAME = gnu.java.rmi.rmic.RMIC;
  +// pre Kaffe 1.1.2
  +private static final String OLD_RMIC_CLASSNAME = kaffe.rmi.rmic.RMIC;
  +
  +/**
  + * the name of this adapter for users to select
  + */
  +public static final String COMPILER_NAME = kaffe;
  +
   
   public boolean execute() throws BuildException {
   getRmic().log(Using Kaffe rmic, Project.MSG_VERBOSE);
   Commandline cmd = setupRmicCommand();
   
  -try {
  +Class c = getRmicClass();
  +if (c == null) {
  +throw new BuildException(Cannot use Kaffe rmic, as it is not 
  + + available.  Neither 
  + + RMIC_CLASSNAME
  + +  nor 
  + + OLD_RMIC_CLASSNAME
  + +  have been found.  
  + + A common solution is to 
  + + set the environment variable 
  + + JAVA_HOME or CLASSPATH.,
  + getRmic().getLocation());
  +}
   
  -Class c = Class.forName(kaffe.rmi.rmic.RMIC);
  +try {
   Constructor cons = c.getConstructor(new Class[] 
{String[].class});
   Object rmic = cons.newInstance(new Object[] 
{cmd.getArguments()});
  -Method doRmic = c.getMethod(run, null);
  -Boolean ok = (Boolean) doRmic.invoke(rmic, null);
  +Method doRmic = c.getMethod(run, (Class[]) null);
  +Boolean ok = (Boolean) doRmic.invoke(rmic, (Object[]) null);
   
   return ok.booleanValue();
  -} catch (ClassNotFoundException ex) {
  -throw new BuildException(Cannot use Kaffe rmic, as it is not 
  - + available.  A common solution is to 
  - + set the environment variable 
  - + JAVA_HOME or CLASSPATH.,
  - getRmic().getLocation());
  +} catch (BuildException ex) {
  +//rethrow
  +throw ex;
   } catch (Exception ex) {
  -if (ex instanceof BuildException) {
  -throw (BuildException) ex;
  -} else {
  -throw new BuildException(Error starting Kaffe rmic: ,
  - ex, getRmic().getLocation());
  +//wrap
  +   throw new BuildException(Error starting Kaffe rmic: ,
  +ex, getRmic().getLocation());
  +}
  +}
  +
  +/**
  + * test for kaffe being on the system
  + * @return true if kaffe is on the current classpath
  + */
  +public static boolean isAvailable() {
  +return getRmicClass() != null;
  +}
  +
  +/**
  + * tries to load Kaffe RMIC and falls back to the older class name
  + * if necessary.
  + *
  + * @return null if neither class can get loaded.
  + */
  +private static Class getRmicClass() {
  +try {
  +return Class.forName(RMIC_CLASSNAME);
  +} catch 

JUnitTask is too complex

2004-12-15 Thread Yves Martin

   Hello,

 I'm working on a build system based on plugin, and I'm currently writting a
 'junit' plugin to call test cases and to generate report...

 And I find the 'junit' optionnal task really complex (from the user-side point
 of view). The big trouble for me is that it is possible to declare parameters
 that will not work properly: ignored arguments with fork options or mode,
 overwritten arguments in test declaration, many formatter possibilities... 

 And the only obvious aim of that complexity is to avoid to call the 'junit'
 task many times with adequat options.

 As a proposal, I think a simpler 'junit' task would be enough and may avoid
 troubles:
 . Java argument options (classpath, forkmode, environment, system properties)
 . Formatter options
 . filesets to filter TestCases to run (or a single file name)

 When reading a 'junit' invocation, there will be no doubt how it will behave:
 one JVM for all tests or one per test, same JVM options and same formatters
 for all declared test cases.

 In that case, JUnitTask may inherit from Java task and code will be really
 simpler I think.


 As an example, I have found a strange behavior of the internal
 JUnitTestRunner. Here is the corresponding command line:

 java
   fork=yes
   dir=${module.runtime.directory}
   classname=org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner
   classpath 
path=${module.classpath}:apache-ant-1.6.2/lib/ant-junit.jar:apache-ant-1.6.2/lib/ant.jar/
   arg value=testsfile=${module.testcases}/
   arg value=haltOnError=off/
   arg value=haltOnFailure=off/
   !-- Show Summary on console --
   arg 
value=formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormatter/
   !-- Generate XML report for this test suite --
   arg 
value=formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${module.report}/
 /java

 If ${module.report} parameter is removed after XMLJUnitResultFormatter, the
 XML report is outputed in the console - whereas the ${module.testcases} file
 declares an output directory and file per TestCase !

 If the parameter ${module.report} is present, output files declared in
 ${module.testcases} file are correctly generated BUT their is no generated
 file with name ${module.report} !!

 Strange isn't it ? In fact, the JUnitTestRunner command line is also a clue of
 the complexity of the 'junit' task.


 As a conclusion I consider the 'junit' may be replace by a simpler
 implementation that may avoid confusion about how it behaves. The only
 difference is that you need to call many 'junit' when parameters differ from a
 test case set to another... But I find it a good think !

 What is your opinion ? Is it worth to create a simpler 'junit' task ?
 
 Regards,
-- 
Yves Martin


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



Bug in JUnitReport: multiple reports of the same testcase

2004-12-15 Thread Yves Martin

   Hello,

 To keep history of run test cases, I create a report per run with a timestamp
 in the file name.

 So I can have many files with the same test case run many times... and at the
 first sight, it seems that junitreport task do not support well such an input.

 The package summary is OK (show all runs) but all links to the same test case
 go to a unique file (so information does not match). I guess the trouble is to
 generate a HTML file per test case without checking for many reports of the
 same test case. 

 I'm not an expert in XSLT but if needed I can have a look into 'junitreport'
 to find a work-around or a clean correction. In my opinion, the per test case
 HTML file should keep the original report file name to avoid such conflicts.

 What do you think about it ? Is it already known ? Is it planned to correct it 
?
 Thank you in advance
 Regards,
-- 
Yves Martin


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



DO NOT REPLY [Bug 32718] New: - Cannot determine Ant home from Locator class if path contains umlauts

2004-12-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=32718.
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=32718

   Summary: Cannot  determine Ant home from Locator class if path
contains umlauts
   Product: Ant
   Version: 1.6.2
  Platform: PC
OS/Version: Windows 2000
Status: NEW
  Severity: normal
  Priority: P2
 Component: Core
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


What I have done:
- ANT_HOME system property is not set.
- ant-launcher.jar lies on path that contains umlauts
  (i.e. c:\ä ö ü\ant-launcher.jar)
- I call the class org.apache.tools.ant.launch.Launcher and receive the message
Ant home is set incorrectly or ant could not be located

Debugging Ant shows that the problem is in the method fromURI(String uri) in
class org.apache.tools.ant.launch.Locator:

The method  getResourceSource(ClassLoader c, String resource) of that class
calls c.getResource(resource) (with c is ClassLoader) which returns   
jar:file:/C:/%c3%a4%20%c3%b6%20%c3%bc/ant-launcher.jar!/org/apache/to
ols/ant/launch/Launcher.class.

This URI is then given to the fromURI(String uri) method which tries to decode
it but fails to do that correctly since the URI is encoded in UTF-8:
i.e. %c3%a4 is encoded into two consecutive characters (i.e. it splits it up
in %c3 and %a4) instead of one. Therefore instead of getting back an ä the
string ä is returned and hence the resulting path is incorrect.

Could the de/encoding scheme from the revised 1.4 version of URLEncoder be used?

-- 
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: JUnitTask is too complex

2004-12-15 Thread Stefan Bodewig
On Wed, 15 Dec 2004, Yves Martin [EMAIL PROTECTED] wrote:

  As a proposal, I think a simpler 'junit' task would be enough and
  may avoid troubles:

Before you get too excited by the opportunities (and yes, junit has
collected quite a bit of historic cruft) - we are not going to remove
a single attribute or nested element of any existing task, since
backwards compatibility is an extremely important asset around Ant.

Stefan

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



Re: AW: [GUMP@brutus]: Project test-ant (in module ant) failed

2004-12-15 Thread Matt Benson
I was afraid something could go wrong with that
particular testcase.  Hmm...

--- [EMAIL PROTECTED] wrote:

 [junit] Testsuite:
 org.apache.tools.ant.taskdefs.TouchTest
 [junit] Tests run: 11, Failures: 0, Errors: 1,
 Time elapsed: 0.75 sec
 [junit] Testcase:

testGoodPattern(org.apache.tools.ant.taskdefs.TouchTest):
 Caused an
 ERROR
 [junit] condition satisfied
 [junit]

/home/gump/workspaces2/public/workspace/ant/src/etc/testcases/taskdefs/touch
 .xml:106: condition satisfied
 [junit]   at

org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:141)
 
 (16 hours, 40 minutes ago) by mbenson 
 touch gets nested mapper plus verbose, mkdirs, and
 pattern attributes.
 
 
 Jan
 
  -Ursprüngliche Nachricht-
  Von: Gump Integration Build
 [mailto:[EMAIL PROTECTED]
  Gesendet am: Mittwoch, 15. Dezember 2004 11:05
  An: [EMAIL PROTECTED]
  Betreff: [EMAIL PROTECTED]: Project test-ant (in
 module ant) failed
  
  Project test-ant has an issue affecting its
 community integration.
  This issue affects 1 projects.
  The current state of this project is 'Failed',
 with reason 
  'Build Failed'.
  For reference only, the following projects are
 affected by this:
  - test-ant :  Java based build tool
  
  
  Full details are available at:
 

http://brutus.apache.org/gump/public/ant/test-ant/index.html
  
 




__ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

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



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

2004-12-15 Thread Peter Reilly
Hi Matt,
the following changes remove information
from the javadoc.
Peter
[EMAIL PROTECTED] wrote:
mbenson 2004/12/14 13:18:08
 Modified:src/main/org/apache/tools/ant/taskdefs Ant.java
   CallTarget.java
 Log:
 Javadoc
 
 Revision  ChangesPath
 1.110 +31 -50ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
 
 Index: Ant.java
 ===
 RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
 retrieving revision 1.109
 retrieving revision 1.110
 diff -u -r1.109 -r1.110
 --- Ant.java	7 Dec 2004 06:44:34 -	1.109
 +++ Ant.java	14 Dec 2004 21:18:08 -	1.110
 @@ -203,9 +203,8 @@
  }
  
  /**
 - * Pass output sent to System.out to the new project.
 + * @see Task#handleOutput(String)
   *
 - * @param output a line of output
   * @since Ant 1.5
   */
  public void handleOutput(String output) {
 @@ -217,16 +216,6 @@
  }
   * @since Ant 1.6
 @@ -241,9 +230,7 @@
  }
  
  /**
 - * Pass output sent to System.out to the new project.
 - *
 - * @param output The output to log. Should not be codenull/code.
 + * @see Task#handleFlush(String)
   *
   * @since Ant 1.5.2
   */
 @@ -256,9 +243,7 @@
  }
  
  /**
 - * Pass output sent to System.err to the new project.
 - *
 - * @param output The error output to log. Should not be codenull/code.
 + * @see Task#handleErrorOutput(String)
   *
   * @since Ant 1.5
   */
 @@ -271,9 +256,7 @@
  }
  
  /**
 - * Pass output sent to System.err to the new project.
 - *
 - * @param output The error output to log. Should not be codenull/code.
 + * @see Task#handleErrorFlush(String)
   *
   * @since Ant 1.5.2
   */
 


  
  /**
 - * Pass output sent to System.out to the new project.
 + * @see Task#handleOutput(String)
   *
   * @since Ant 1.5
   */
 @@ -192,7 +196,7 @@
  }
  
  /**
 - * Pass output sent to System.out to the new project.
 + * @see Task#handleFlush(String)
   *
   * @since Ant 1.5.2
   */
 @@ -205,7 +209,7 @@
  }
  
  /**
 - * Pass output sent to System.err to the new project.
 + * @see Task#handleErrorOutput(String)
   *
   * @since Ant 1.5
   */
 @@ -218,7 +222,7 @@
  }
  
  /**
 - * Pass output sent to System.err to the new project and flush stream.
 + * @see Task#handleErrorFlush(String)
   *
   * @since Ant 1.5.2
   */
 
 
 

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

 


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


Re: JUnitTask is too complex

2004-12-15 Thread Yves Martin
Stefan Bodewig [EMAIL PROTECTED] writes:

 Before you get too excited by the opportunities (and yes, junit has
 collected quite a bit of historic cruft) - we are not going to remove a
 single attribute or nested element of any existing task, since backwards
 compatibility is an extremely important asset around Ant.

 You're right and I'm aware of it. But why not create a junit2 and made junit
 deprecated ?
 Wasn't it done for javadoc long time ago ?

 I think another way to convince you may be to find many bugs in the current
 implementation ;)

 Regard
-- 
Yves Martin


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



cvs commit: ant/src/etc/testcases/taskdefs touch.xml

2004-12-15 Thread mbenson
mbenson 2004/12/15 08:09:27

  Modified:src/etc/testcases/taskdefs touch.xml
  Log:
  Add time zone to the test case.
  
  Revision  ChangesPath
  1.5   +3 -3  ant/src/etc/testcases/taskdefs/touch.xml
  
  Index: touch.xml
  ===
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/touch.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- touch.xml 14 Dec 2004 17:56:35 -  1.4
  +++ touch.xml 15 Dec 2004 16:09:27 -  1.5
  @@ -102,12 +102,12 @@
 /target
   
 target name=testGoodPattern
  -touch file=touchtest datetime=06242003142012foo 
pattern=MMddHHmmss'foo' /
  +touch file=touchtest datetime=06242003142012GMTfoo 
pattern=MMddHHmmssz'foo' /
   fail
 condition
   not
 isfileselected file=touchtest
  -date millis=1056482412000 /
  +date millis=1056464412000 /
 /isfileselected
   /not
 /condition
  @@ -115,7 +115,7 @@
 /target
   
 target name=testBadPattern
  -touch file=touchtest datetime=06242003142012foo 
pattern=MMddHHmmss'bar' /
  +touch file=touchtest datetime=06242003142012GMTfoo 
pattern=MMddHHmmssz'bar' /
 /target
   
   /project
  
  
  

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



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

2004-12-15 Thread mbenson
mbenson 2004/12/15 08:40:22

  Modified:src/main/org/apache/tools/ant PropertyHelper.java
  Log:
  For non-debug (verbose) log messages, enclose property names in double quotes
  for clarity.  Fix cases where property name is logged as '${property name}'
  as that notation more appropriately refers to the property's value.
  
  Revision  ChangesPath
  1.18  +10 -19ant/src/main/org/apache/tools/ant/PropertyHelper.java
  
  Index: PropertyHelper.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/PropertyHelper.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- PropertyHelper.java   10 Sep 2004 17:31:50 -  1.17
  +++ PropertyHelper.java   15 Dec 2004 16:40:22 -  1.18
  @@ -167,7 +167,6 @@
   return true;
   }
   }
  -
   return false;
   }
   
  @@ -190,13 +189,8 @@
   if (name.startsWith(toString:)) {
   name = name.substring(toString:.length());
   Object v = project.getReference(name);
  -if (v == null) {
  -return null;
  -}
  -return v.toString();
  +return (v == null) ? null : v.toString();
   }
  -
  -
   return null;
   }
   
  @@ -249,13 +243,11 @@
* @return the original string with the properties replaced, or
* codenull/code if the original string is codenull/code.
*/
  -public String replaceProperties(String ns, String value,
  -Hashtable keys)
  +public String replaceProperties(String ns, String value, Hashtable keys)
   throws BuildException {
   if (value == null) {
   return null;
   }
  -
   Vector fragments = new Vector();
   Vector propertyRefs = new Vector();
   parsePropertyString(value, fragments, propertyRefs);
  @@ -280,8 +272,8 @@
   }
   
   if (replacement == null) {
  -project.log(Property ${ + propertyName
  -+ } has not been set, Project.MSG_VERBOSE);
  +project.log(Property \ + propertyName
  ++ \ has not been set, Project.MSG_VERBOSE);
   }
   fragment = (replacement != null)
   ? replacement.toString()
  @@ -289,7 +281,6 @@
   }
   sb.append(fragment);
   }
  -
   return sb.toString();
   }
   
  @@ -312,8 +303,8 @@
   // user (CLI) properties take precedence
   if (null != userProperties.get(name)) {
   if (verbose) {
  -project.log(Override ignored for user property  + name,
  -Project.MSG_VERBOSE);
  +project.log(Override ignored for user property \ + name
  ++ \, Project.MSG_VERBOSE);
   }
   return false;
   }
  @@ -324,8 +315,8 @@
   }
   
   if (null != properties.get(name)  verbose) {
  -project.log(Overriding previous definition of property  + name,
  -Project.MSG_VERBOSE);
  +project.log(Overriding previous definition of property \ + 
name
  ++ \, Project.MSG_VERBOSE);
   }
   
   if (verbose) {
  @@ -351,8 +342,8 @@
   public synchronized void setNewProperty(String ns, String name,
   Object value) {
   if (null != properties.get(name)) {
  -project.log(Override ignored for property  + name,
  -Project.MSG_VERBOSE);
  +project.log(Override ignored for property \ + name
  ++ \, Project.MSG_VERBOSE);
   return;
   }
   
  
  
  

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



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

2004-12-15 Thread Matt Benson
I rarely document overridden methods myself, but I
will admit that I may have accidentally deleted
information detailing how the subclass implementation
differs or elaborates substantially upon the base
implementation.   I will go back today and take a
second look at what I deleted. 

--- Peter Reilly [EMAIL PROTECTED] wrote:

 
 Hi Matt,
 the following changes remove information
 from the javadoc.
 
 Peter
 
 [EMAIL PROTECTED] wrote:
 
 mbenson 2004/12/14 13:18:08
 
   Modified:   
 src/main/org/apache/tools/ant/taskdefs Ant.java
 CallTarget.java
   Log:
   Javadoc
   
   Revision  ChangesPath
   1.110 +31 -50   
 ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
   
   Index: Ant.java
  

===
   RCS file:

/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
   retrieving revision 1.109
   retrieving revision 1.110
   diff -u -r1.109 -r1.110
   --- Ant.java   7 Dec 2004 06:44:34 -   1.109
   +++ Ant.java   14 Dec 2004 21:18:08 -  1.110
   @@ -203,9 +203,8 @@
}

/**
   - * Pass output sent to System.out to the new
 project.
   + * @see Task#handleOutput(String)
 *
   - * @param output a line of output
 * @since Ant 1.5
 */
public void handleOutput(String output) {
   @@ -217,16 +216,6 @@
}
 * @since Ant 1.6
   @@ -241,9 +230,7 @@
}

/**
   - * Pass output sent to System.out to the new
 project.
   - *
   - * @param output The output to log. Should
 not be codenull/code.
   + * @see Task#handleFlush(String)
 *
 * @since Ant 1.5.2
 */
   @@ -256,9 +243,7 @@
}

/**
   - * Pass output sent to System.err to the new
 project.
   - *
   - * @param output The error output to log.
 Should not be codenull/code.
   + * @see Task#handleErrorOutput(String)
 *
 * @since Ant 1.5
 */
   @@ -271,9 +256,7 @@
}

/**
   - * Pass output sent to System.err to the new
 project.
   - *
   - * @param output The error output to log.
 Should not be codenull/code.
   + * @see Task#handleErrorFlush(String)
 *
 * @since Ant 1.5.2
 */
   
 
 

/**
   - * Pass output sent to System.out to the new
 project.
   + * @see Task#handleOutput(String)
 *
 * @since Ant 1.5
 */
   @@ -192,7 +196,7 @@
}

/**
   - * Pass output sent to System.out to the new
 project.
   + * @see Task#handleFlush(String)
 *
 * @since Ant 1.5.2
 */
   @@ -205,7 +209,7 @@
}

/**
   - * Pass output sent to System.err to the new
 project.
   + * @see Task#handleErrorOutput(String)
 *
 * @since Ant 1.5
 */
   @@ -218,7 +222,7 @@
}

/**
   - * Pass output sent to System.err to the new
 project and flush stream.
   + * @see Task#handleErrorFlush(String)
 *
 * @since Ant 1.5.2
 */
   
   
   
 

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

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




__ 
Do you Yahoo!? 
Dress up your holiday email, Hollywood style. Learn more. 
http://celebrity.mail.yahoo.com

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



cvs commit: ant/src/etc/testcases/taskdefs touch.xml

2004-12-15 Thread peterreilly
peterreilly2004/12/15 09:23:25

  Modified:src/main/org/apache/tools/ant/taskdefs Touch.java
   src/testcases/org/apache/tools/ant/taskdefs TouchTest.java
   src/etc/testcases/taskdefs touch.xml
  Log:
  use Touch#addConfigured(Mapper) rather than add(Mapper) as the mapper is
  used in the method
  
  Revision  ChangesPath
  1.42  +1 -1  ant/src/main/org/apache/tools/ant/taskdefs/Touch.java
  
  Index: Touch.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Touch.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Touch.java14 Dec 2004 17:56:34 -  1.41
  +++ Touch.java15 Dec 2004 17:23:24 -  1.42
  @@ -168,7 +168,7 @@
* @param mapper the codeMapper/code to add.
* @since Ant 1.6.3
*/
  -public void addMapper(Mapper mapper) {
  +public void addConfiguredMapper(Mapper mapper) {
   add(mapper.getImplementation());
   }
   
  
  
  
  1.10  +7 -0  
ant/src/testcases/org/apache/tools/ant/taskdefs/TouchTest.java
  
  Index: TouchTest.java
  ===
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/TouchTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TouchTest.java14 Dec 2004 17:56:35 -  1.9
  +++ TouchTest.java15 Dec 2004 17:23:25 -  1.10
  @@ -110,6 +110,13 @@
   }
   
   /**
  + * test the explicit mapped file set
  + */
  +public void testExplicitMappedFileset() {
  +executeTarget(testExplicitMappedFileset);
  +}
  +
  +/**
* test the mapped file list
*/
   public void testMappedFilelist() {
  
  
  
  1.6   +32 -0 ant/src/etc/testcases/taskdefs/touch.xml
  
  Index: touch.xml
  ===
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/touch.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- touch.xml 15 Dec 2004 16:09:27 -  1.5
  +++ touch.xml 15 Dec 2004 17:23:25 -  1.6
  @@ -83,6 +83,38 @@
   
 /target
   
  +  target name=testExplicitMappedFileset
  +touch file=touchtest millis=${mappermillis} /
  +touch
  +  fileset file=touchtest /
  +  mapper
  +compositemapper
  +  globmapper from=* to=*foo /
  +  globmapper from=* to=*bar /
  +/compositemapper
  +  /mapper
  +/touch
  +
  +fail
  +  condition
  +not
  +  and
  +isfileselected file=touchtest
  +  selector refid=map.selector /
  +/isfileselected
  +isfileselected file=touchtestfoo
  +  selector refid=map.selector /
  +/isfileselected
  +isfileselected file=touchtestbar
  +  selector refid=map.selector /
  +/isfileselected
  +  /and
  +/not
  +  /condition
  +/fail
  +
  +  /target
  +
 target name=testMappedFilelist
   touch millis=${mappermillis}
 filelist dir=. files=idonotexist /
  
  
  

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



Re: JUnitTask is too complex

2004-12-15 Thread Stefan Bodewig
On Wed, 15 Dec 2004, Yves Martin [EMAIL PROTECTED] wrote:

  But why not create a junit2 and made junit deprecated ?

Because you'll have to convince us as well as the existing junit
task user base why they'd prefer junit2.  Less options and
potentially more tasks won't be good selling arguments ;-)

  Wasn't it done for javadoc long time ago ?

No.  javadoc2 and javadoc have been separate tasks that have been
merged into one.

But yes, we once removed attributes and even tasks (Ant 1.1 to 1.2) -
and have been badly chastised for it.

  I think another way to convince you may be to find many bugs in the
  current implementation ;)

Your welcome to find and even fix them 8-)

Stefan

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



cvs commit: ant/src/main/org/apache/tools/ant/types/selectors DateSelector.java

2004-12-15 Thread mbenson
mbenson 2004/12/15 08:37:11

  Modified:src/main/org/apache/tools/ant/types/selectors
DateSelector.java
  Log:
  Javadoc
  
  Revision  ChangesPath
  1.15  +17 -17
ant/src/main/org/apache/tools/ant/types/selectors/DateSelector.java
  
  Index: DateSelector.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/types/selectors/DateSelector.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DateSelector.java 12 Nov 2004 15:17:03 -  1.14
  +++ DateSelector.java 15 Dec 2004 16:37:10 -  1.15
  @@ -88,10 +88,10 @@
   }
   
   /**
  - * For users that prefer to express time in milliseconds since 1970
  + * Set the time; for users who prefer to express time in ms since 1970.
*
* @param millis the time to compare file's last modified date to,
  - *expressed in milliseconds
  + *expressed in milliseconds.
*/
   public void setMillis(long millis) {
   this.millis = millis;
  @@ -99,7 +99,7 @@
   
   /**
* Returns the millisecond value the selector is set for.
  - * @return the millisecond value
  + * @return the millisecond value.
*/
   public long getMillis() {
   if (dateTime != null) {
  @@ -109,19 +109,19 @@
   }
   
   /**
  - * Sets the date. The user must supply it in MM/DD/ HH:MM AM_PM
  - * format
  + * Sets the date. The user must supply it in MM/DD/ HH:MM AM_PM 
format,
  + * unless an alternate pattern is specified via the pattern attribute.
*
  - * @param dateTime a string in MM/DD/ HH:MM AM_PM format
  + * @param dateTime a formatted date codeString/code.
*/
   public void setDatetime(String dateTime) {
   this.dateTime = dateTime;
   }
   
   /**
  - * Should we be checking dates on directories?
  + * Set whether to check dates on directories.
*
  - * @param includeDirs whether to check the timestamp on directories
  + * @param includeDirs whether to check the timestamp on directories.
*/
   public void setCheckdirs(boolean includeDirs) {
   this.includeDirs = includeDirs;
  @@ -130,7 +130,7 @@
   /**
* Sets the number of milliseconds leeway we will give before we consider
* a file not to have matched a date.
  - * @param granularity the number of milliconds leeway
  + * @param granularity the number of milliseconds leeway.
*/
   public void setGranularity(int granularity) {
   this.granularity = granularity;
  @@ -140,16 +140,16 @@
* Sets the type of comparison to be done on the file's last modified
* date.
*
  - * @param cmp The comparison to perform, an EnumeratedAttribute
  + * @param cmp The comparison to perform, an EnumeratedAttribute.
*/
   public void setWhen(TimeComparisons tcmp) {
   this.cmp = tcmp.getIndex();
   }
   
   /**
  - * Sets the pattern to be used for the SimpleDateFormat
  + * Sets the pattern to be used for the SimpleDateFormat.
*
  - * @param pattern the pattern that defines the date format
  + * @param pattern the pattern that defines the date format.
*/
   public void setPattern(String pattern) {
   this.pattern = pattern;
  @@ -159,7 +159,7 @@
* When using this as a custom selector, this method will be called.
* It translates each parameter into the appropriate setXXX() call.
*
  - * @param parameters the complete set of parameters for this selector
  + * @param parameters the complete set of parameters for this selector.
*/
   public void setParameters(Parameter[] parameters) {
   super.setParameters(parameters);
  @@ -234,10 +234,10 @@
* The heart of the matter. This is where the selector gets to decide
* on the inclusion of a file in a particular fileset.
*
  - * @param basedir the base directory the scan is being done from
  - * @param filename is the name of the file to check
  - * @param file is a java.io.File object the selector can use
  - * @return whether the file should be selected or not
  + * @param basedir the base directory from which the scan is being 
performed.
  + * @param filename is the name of the file to check.
  + * @param file is a java.io.File object the selector can use.
  + * @return whether the file is selected.
*/
   public boolean isSelected(File basedir, String filename, File file) {
   
  
  
  

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



Re: cvs commit: ant/src/etc/testcases/taskdefs touch.xml

2004-12-15 Thread Matt Benson
--- [EMAIL PROTECTED] wrote:
   Log:
   use Touch#addConfigured(Mapper) rather than
 add(Mapper) as the mapper is
   used in the method
   

Thanks for that.

-Matt




__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


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



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

2004-12-15 Thread Matt Benson
--- Matt Benson [EMAIL PROTECTED] wrote:

 I rarely document overridden methods myself, but I
 will admit that I may have accidentally deleted
 information detailing how the subclass
 implementation
 differs or elaborates substantially upon the base
 implementation.   I will go back today and take a
 second look at what I deleted. 

I don't see that what I removed contained any really
earth-shattering information.  :)  But if you are more
comfortable I can revert the changes.

-Matt
 
 --- Peter Reilly [EMAIL PROTECTED] wrote:
 
  
  Hi Matt,
  the following changes remove information
  from the javadoc.
  
  Peter
  
[SNIP]




__ 
Do you Yahoo!? 
Send holiday email and support a worthy cause. Do good. 
http://celebrity.mail.yahoo.com

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



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

2004-12-15 Thread mbenson
mbenson 2004/12/15 13:47:19

  Modified:src/main/org/apache/tools/ant/taskdefs PreSetDef.java
  Log:
  LOC bumming and Javadoc
  
  Revision  ChangesPath
  1.14  +58 -84ant/src/main/org/apache/tools/ant/taskdefs/PreSetDef.java
  
  Index: PreSetDef.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/PreSetDef.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PreSetDef.java9 Mar 2004 16:48:06 -   1.13
  +++ PreSetDef.java15 Dec 2004 21:47:19 -  1.14
  @@ -44,16 +44,16 @@
   private String name;
   
   /**
  - * Name of the definition
  - * @param name the name of the definition
  + * Set the name of this definition.
  + * @param name the name of the definition.
*/
public void setName(String name) {
   this.name = name;
   }
   
   /**
  - * Add a nested task to predefine attributes and elements on
  - * @param nestedTask  Nested task/type to extend
  + * Add a nested task to predefine attributes and elements on.
  + * @param nestedTask  Nested task/type to extend.
*/
   public void addTask(Task nestedTask) {
   if (this.nestedTask != null) {
  @@ -68,7 +68,7 @@
   
   
   /**
  - * make a new definition
  + * Make a new definition.
*/
   public void execute() {
   if (nestedTask == null) {
  @@ -77,7 +77,6 @@
   if (name == null) {
   throw new BuildException(Name not specified);
   }
  -
   name = ProjectHelper.genComponentName(getURI(), name);
   
   ComponentHelper helper = ComponentHelper.getComponentHelper(
  @@ -91,7 +90,6 @@
   throw new BuildException(
   Unable to find typedef  + componentName);
   }
  -
   PreSetDefinition newDef = new PreSetDefinition(def, nestedTask);
   
   newDef.setName(name);
  @@ -111,7 +109,7 @@
   /**
* Creates a new codePresetDefinition/code instance.
*
  - * @param parent The parent of this predefintion.
  + * @param parent The parent of this predefinition.
* @param el The predefined attributes, nested elements and text.
*/
   public PreSetDefinition(AntTypeDefinition parent, UnknownElement el) 
{
  @@ -125,80 +123,80 @@
   }
   
   /**
  - * Override so that it is not allowed
  + * Override so that it is not allowed.
*
  - * @param clazz a codeClass/code value
  + * @param clazz a codeClass/code value.
*/
   public void setClass(Class clazz) {
   throw new BuildException(Not supported);
   }
   
   /**
  - * Override so that it is not allowed
  + * Override so that it is not allowed.
*
  - * @param className a codeString/code value
  + * @param className a codeString/code value.
*/
   public void setClassName(String className) {
   throw new BuildException(Not supported);
   }
   
   /**
  - * get the classname of the definition
  - * @return the name of the class of this definition
  + * Get the classname of the definition.
  + * @return the name of the class of this definition.
*/
   public String getClassName() {
   return parent.getClassName();
   }
   
   /**
  - * set the adapter class for this definition.
  - * NOTE Supported
  - * @param adapterClass the adapterClass
  + * Set the adapter class for this definition.
  + * NOT Supported
  + * @param adapterClass the adapterClass.
*/
   public void setAdapterClass(Class adapterClass) {
   throw new BuildException(Not supported);
   }
   
   /**
  - * set the assignable class for this definition.
  + * Set the assignable class for this definition.
* NOT SUPPORTED
  - * @param adaptToClass the assignable class
  + * @param adaptToClass the assignable class.
*/
  -
   public void setAdaptToClass(Class adaptToClass) {
   throw new BuildException(Not supported);
   }
   
   /**
  - * set the classloader to use to create an instance
  - * of the definition
  - * @param classLoader the classLoader
  + * Set the classloader to use to create an instance
  + * of the definition.
  + * NOT SUPPORTED
  + * @param classLoader the classLoader.
*/
   public void setClassLoader(ClassLoader classLoader) {
   throw new BuildException(Not supported);
   }
   
   /**
  - * get the 

DO NOT REPLY [Bug 32718] - Cannot determine Ant home from Locator class if path contains umlauts

2004-12-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=32718.
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=32718


[EMAIL PROTECTED] changed:

   What|Removed |Added

  BugsThisDependsOn||8031




-- 
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]



DO NOT REPLY [Bug 8031] - [PATCH] Suggest ProjectHelperImpl use File.toURI().toURL().toExternalForm()

2004-12-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=8031.
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=8031


[EMAIL PROTECTED] changed:

   What|Removed |Added

OtherBugsDependingO||32718
  nThis||




-- 
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]



DO NOT REPLY [Bug 8031] - [PATCH] Suggest ProjectHelperImpl use File.toURI().toURL().toExternalForm()

2004-12-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=8031.
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=8031





--- Additional Comments From [EMAIL PROTECTED]  2004-12-15 23:15 ---
...documented in bug 26642 which is mentioned above.

-- 
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]



DO NOT REPLY [Bug 32718] - Cannot determine Ant home from Locator class if path contains umlauts

2004-12-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=32718.
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=32718





--- Additional Comments From [EMAIL PROTECTED]  2004-12-15 23:26 ---
Does this really depend on 8031, or is it actually a duplicate?  Adding the 1.4+
sensitive code is easy enough especially now that Jesse's a committer, ;) but
how do we get the correct behavior on 1.2-3, if at all?

-- 
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]



DO NOT REPLY [Bug 8031] - [PATCH] Suggest ProjectHelperImpl use File.toURI().toURL().toExternalForm()

2004-12-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=8031.
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=8031





--- Additional Comments From [EMAIL PROTECTED]  2004-12-15 23:14 ---
Note that Peter added the recommended c  256 check on 2/3/2004.

-- 
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/types PermissionsTest.java

2004-12-15 Thread mbenson
mbenson 2004/12/15 15:44:31

  Modified:src/testcases/org/apache/tools/ant/types
PermissionsTest.java
  Log:
  Spelling
  
  Revision  ChangesPath
  1.7   +1 -1  
ant/src/testcases/org/apache/tools/ant/types/PermissionsTest.java
  
  Index: PermissionsTest.java
  ===
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/types/PermissionsTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PermissionsTest.java  9 Mar 2004 16:49:05 -   1.6
  +++ PermissionsTest.java  15 Dec 2004 23:44:31 -  1.7
  @@ -142,7 +142,7 @@
   if (e.getStatus() != 3) {
   fail(Received wrong exit status in Exit Exception.);
   }
  -System.out.println(testExit successfull.);
  +System.out.println(testExit successful.);
   } finally {
   perms.restoreSecurityManager();
   }
  
  
  

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



cvs commit: ant/src/main/org/apache/tools/ant AntTypeDefinition.java ComponentHelper.java RuntimeConfigurable.java

2004-12-15 Thread mbenson
mbenson 2004/12/15 15:44:06

  Modified:src/main/org/apache/tools/ant AntTypeDefinition.java
ComponentHelper.java RuntimeConfigurable.java
  Log:
  More javadoc work and LOC bumming.
  
  Revision  ChangesPath
  1.15  +75 -128   ant/src/main/org/apache/tools/ant/AntTypeDefinition.java
  
  Index: AntTypeDefinition.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/AntTypeDefinition.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- AntTypeDefinition.java14 Sep 2004 12:45:12 -  1.14
  +++ AntTypeDefinition.java15 Dec 2004 23:44:05 -  1.15
  @@ -36,68 +36,65 @@
   private ClassLoader classLoader;
   
   /**
  - * set the definition's name
  - * @param name the name of the definition
  + * Set the definition's name.
  + * @param name the name of the definition.
*/
   public void setName(String name) {
   this.name = name;
   }
   
   /**
  - * return the definition's name
  - * @return the name of the definition
  + * Return the definition's name.
  + * @return the name of the definition.
*/
   public String getName() {
   return name;
   }
   
   /**
  - * set the class of the definition.
  - * as a side-effect may set the classloader and classname
  - * @param clazz the class of this definition
  + * Set the class of the definition.
  + * As a side-effect may set the classloader and classname.
  + * @param clazz the class of this definition.
*/
   public void setClass(Class clazz) {
   this.clazz = clazz;
   if (clazz == null) {
   return;
   }
  -if (classLoader == null) {
  -this.classLoader = clazz.getClassLoader();
  -}
  -if (className == null) {
  -this.className = clazz.getName();
  -}
  +this.classLoader = (classLoader == null)
  +? clazz.getClassLoader() : classLoader;
  +this.className = (className == null) ? clazz.getName() : className;
   }
   
   /**
  - * set the classname of the definition
  - * @param className the classname of this definition
  + * Set the classname of the definition.
  + * @param className the classname of this definition.
*/
   public void setClassName(String className) {
   this.className = className;
   }
   
   /**
  - * get the classname of the definition
  - * @return the name of the class of this definition
  + * Get the classname of the definition.
  + * @return the name of the class of this definition.
*/
   public String getClassName() {
   return className;
   }
   
   /**
  - * set the adapter class for this definition.
  - * this class is used to adapt the definitions class if
  + * Set the adapter class for this definition.
  + * This class is used to adapt the definitions class if
* required.
  - * @param adapterClass the adapterClass
  + * @param adapterClass the adapterClass.
*/
   public void setAdapterClass(Class adapterClass) {
   this.adapterClass = adapterClass;
   }
   
   /**
  - * set the assignable class for this definition.
  - * @param adaptToClass the assignable class
  + * Set the assignable class for this definition.
  + * @param adaptToClass the assignable class.
*/
   
   public void setAdaptToClass(Class adaptToClass) {
  @@ -105,57 +102,50 @@
   }
   
   /**
  - * set the classloader to use to create an instance
  - * of the definition
  - * @param classLoader the classLoader
  + * Set the classloader to use to create an instance
  + * of the definition.
  + * @param classLoader the ClassLoader.
*/
   public void setClassLoader(ClassLoader classLoader) {
   this.classLoader = classLoader;
   }
   
   /**
  - * get the classloader for this definition
  - * @return the classloader for this definition
  + * Get the classloader for this definition.
  + * @return the classloader for this definition.
*/
   public ClassLoader getClassLoader() {
   return classLoader;
   }
   
   /**
  - * get the exposed class for this
  + * Get the exposed class for this
* definition. This will be a proxy class
* (adapted class) if there is an adapter
* class and the definition class is not
* assignable from the assignable class.
  - * @param project the current project
  - * @return the exposed class
  + * @param project the current project.
  + * @return the exposed class.
*/
   public Class getExposedClass(Project project) {
   if (adaptToClass != null) {