cvs commit: jakarta-commons/digester/src/examples/api/catalog CatalogDigester.java

2004-04-09 Thread skitching
skitching2004/04/09 03:13:48

  Modified:digester/src/examples/api/addressbook
AddressBookDigester.java
   digester/src/examples/api/catalog CatalogDigester.java
  Log:
  Removed @author tags
  
  Revision  ChangesPath
  1.5   +0 -2  
jakarta-commons/digester/src/examples/api/addressbook/AddressBookDigester.java
  
  Index: AddressBookDigester.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/digester/src/examples/api/addressbook/AddressBookDigester.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AddressBookDigester.java  28 Feb 2004 13:32:51 -  1.4
  +++ AddressBookDigester.java  9 Apr 2004 10:13:48 -   1.5
  @@ -33,8 +33,6 @@
* quite low.
* p
* Usage: java Example1 example.xml
  - *
  - * @author Simon Kitching
*/
   public class AddressBookDigester {
   
  
  
  
  1.6   +0 -2  
jakarta-commons/digester/src/examples/api/catalog/CatalogDigester.java
  
  Index: CatalogDigester.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/digester/src/examples/api/catalog/CatalogDigester.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CatalogDigester.java  29 Feb 2004 06:21:14 -  1.5
  +++ CatalogDigester.java  9 Apr 2004 10:13:48 -   1.6
  @@ -36,8 +36,6 @@
* quite low.
* p
* Usage: java CatalogDigester example.xml
  - *
  - * @author Simon Kitching
*/
   public class CatalogDigester {
   
  
  
  

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



cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester CallMethodRule.java

2004-04-09 Thread skitching
skitching2004/04/09 03:16:11

  Modified:digester/src/java/org/apache/commons/digester
CallMethodRule.java
  Log:
  Added javadoc comment re CallMethodRule behaviour when 1 parameter is
  expected and it is not found.
  
  Revision  ChangesPath
  1.34  +7 -0  
jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java
  
  Index: CallMethodRule.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/CallMethodRule.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- CallMethodRule.java   8 Apr 2004 06:11:35 -   1.33
  +++ CallMethodRule.java   9 Apr 2004 10:16:11 -   1.34
  @@ -52,6 +52,13 @@
* tags nested within the one associated with the CallMethodRule will 
* fire before the CallMethodRule invokes the target method. This behaviour is
* not configurable. /p
  + *
  + * pNote also that if a CallMethodRule is expecting exactly one parameter
  + * and that parameter is not available (eg CallParamRule is used with an
  + * attribute name but the attribute does not exist) then the method will
  + * not be invoked. If a CallMethodRule is expecting more than one parameter,
  + * then it is always invoked, regardless of whether the parameters were
  + * available or not (missing parameters are passed as null values)./p
*/
   
   public class CallMethodRule extends Rule {
  
  
  

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



cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map UnmodifiableMap.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 03:32:25

  Modified:collections/src/test/org/apache/commons/collections/map
TestUnmodifiableMap.java
   collections/src/java/org/apache/commons/collections/map
UnmodifiableMap.java
  Added:   collections/data/test
UnmodifiableMap.emptyCollection.version3.1.obj
UnmodifiableMap.fullCollection.version3.1.obj
  Log:
  Make UnmodifiableMap Serializable [18815]
  
  Revision  ChangesPath
  1.9   +15 -1 
jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestUnmodifiableMap.java
  
  Index: TestUnmodifiableMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestUnmodifiableMap.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestUnmodifiableMap.java  18 Feb 2004 01:20:37 -  1.8
  +++ TestUnmodifiableMap.java  9 Apr 2004 10:32:25 -   1.9
  @@ -87,4 +87,18 @@
   } catch (IllegalArgumentException ex) {}
   }
   
  +public String getCompatibilityVersion() {
  +return 3.1;
  +}
  +
  +public void testCreate() throws Exception {
  +resetEmpty();
  +writeExternalFormToDisk(
  +(java.io.Serializable) map,
  +
D:/dev/collections/data/test/UnmodifiableMap.emptyCollection.version3.1.obj);
  +resetFull();
  +writeExternalFormToDisk(
  +(java.io.Serializable) map,
  +
D:/dev/collections/data/test/UnmodifiableMap.fullCollection.version3.1.obj);
  +}
   }
  
  
  
  1.1  
jakarta-commons/collections/data/test/UnmodifiableMap.emptyCollection.version3.1.obj
  
Binary file
  
  
  1.1  
jakarta-commons/collections/data/test/UnmodifiableMap.fullCollection.version3.1.obj
  
Binary file
  
  
  1.10  +38 -2 
jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableMap.java
  
  Index: UnmodifiableMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableMap.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- UnmodifiableMap.java  18 Feb 2004 01:13:19 -  1.9
  +++ UnmodifiableMap.java  9 Apr 2004 10:32:25 -   1.10
  @@ -15,6 +15,10 @@
*/
   package org.apache.commons.collections.map;
   
  +import java.io.IOException;
  +import java.io.ObjectInputStream;
  +import java.io.ObjectOutputStream;
  +import java.io.Serializable;
   import java.util.Collection;
   import java.util.Map;
   import java.util.Set;
  @@ -29,6 +33,8 @@
   
   /**
* Decorates another codeMap/code to ensure it can't be altered.
  + * p
  + * This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
  @@ -36,7 +42,11 @@
* @author Stephen Colebourne
*/
   public final class UnmodifiableMap
  -extends AbstractMapDecorator implements IterableMap, Unmodifiable {
  +extends AbstractMapDecorator
  +implements IterableMap, Unmodifiable, Serializable {
  +
  +/** Serialization version */
  +private static final long serialVersionUID = 2737023427269031941L;
   
   /**
* Factory method to create an unmodifiable map.
  @@ -60,6 +70,32 @@
*/
   private UnmodifiableMap(Map map) {
   super(map);
  +}
  +
  +//---
  +/**
  + * Write the map out using a custom routine.
  + * 
  + * @param out  the output stream
  + * @throws IOException
  + * @since Commons Collections 3.1
  + */
  +private void writeObject(ObjectOutputStream out) throws IOException {
  +out.defaultWriteObject();
  +out.writeObject(map);
  +}
  +
  +/**
  + * Read the map in using a custom routine.
  + * 
  + * @param in  the input stream
  + * @throws IOException
  + * @throws ClassNotFoundException
  + * @since Commons Collections 3.1
  + */
  +private void readObject(ObjectInputStream in) throws IOException, 
ClassNotFoundException {
  +in.defaultReadObject();
  +map = (Map) in.readObject();
   }
   
   //---
  
  
  

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



cvs commit: jakarta-commons/betwixt project.xml

2004-04-09 Thread rdonkin
rdonkin 2004/04/09 03:34:24

  Modified:betwixt  project.xml
  Log:
  Added brian to the contributors list
  
  Revision  ChangesPath
  1.35  +7 -1  jakarta-commons/betwixt/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/betwixt/project.xml,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- project.xml   6 Apr 2004 17:39:33 -   1.34
  +++ project.xml   9 Apr 2004 10:34:24 -   1.35
  @@ -116,7 +116,13 @@
   timezone-6/timezone
   /developer
 /developers
  -  
  +contributors
  +contributor
  +  nameBrian Pugh/name
  +  email/email
  +/contributor
  +  /contributors
  +
 dependencies
   
   dependency
  
  
  

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



cvs commit: jakarta-commons/collections/data/test TransformedSortedMap.fullCollection.version3.1.obj TransformedSortedMap.emptyCollection.version3.1.obj PredicatedMap.fullCollection.version3.1.obj PredicatedSortedMap.emptyCollection.version3.1.obj FixedSizeSortedMap.emptyCollection.version3.1.obj LazyMap.fullCollection.version3.1.obj TransformedMap.fullCollection.version3.1.obj LazySortedMap.fullCollection.version3.1.obj LazySortedMap.emptyCollection.version3.1.obj ListOrderedMap.fullCollection.version3.1.obj FixedSizeSortedMap.fullCollection.version3.1.obj FixedSizeMap.fullCollection.version3.1.obj PredicatedSortedMap.fullCollection.version3.1.obj

2004-04-09 Thread scolebourne
scolebourne2004/04/09 03:36:02

  Modified:collections/src/java/org/apache/commons/collections/map
TransformedMap.java LazySortedMap.java LazyMap.java
PredicatedSortedMap.java TransformedSortedMap.java
FixedSizeMap.java ListOrderedMap.java
PredicatedMap.java FixedSizeSortedMap.java
   collections/data/test
TransformedSortedMap.fullCollection.version3.1.obj
TransformedSortedMap.emptyCollection.version3.1.obj
PredicatedMap.fullCollection.version3.1.obj
PredicatedSortedMap.emptyCollection.version3.1.obj
FixedSizeSortedMap.emptyCollection.version3.1.obj
LazyMap.fullCollection.version3.1.obj
TransformedMap.fullCollection.version3.1.obj
LazySortedMap.fullCollection.version3.1.obj
LazySortedMap.emptyCollection.version3.1.obj
ListOrderedMap.fullCollection.version3.1.obj
FixedSizeSortedMap.fullCollection.version3.1.obj
FixedSizeMap.fullCollection.version3.1.obj
PredicatedSortedMap.fullCollection.version3.1.obj
  Log:
  Simplify the decorator serialization, add javadoc [18815]
  
  Revision  ChangesPath
  1.8   +3 -1  
jakarta-commons/collections/src/java/org/apache/commons/collections/map/TransformedMap.java
  
  Index: TransformedMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/TransformedMap.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TransformedMap.java   9 Apr 2004 09:43:09 -   1.7
  +++ TransformedMap.java   9 Apr 2004 10:36:01 -   1.8
  @@ -37,6 +37,8 @@
* Thus objects must be removed or searched for using their transformed form.
* For example, if the transformation converts Strings to Integers, you must
* use the Integer form to remove objects.
  + * p
  + * This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
  
  
  
  1.6   +4 -23 
jakarta-commons/collections/src/java/org/apache/commons/collections/map/LazySortedMap.java
  
  Index: LazySortedMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/LazySortedMap.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LazySortedMap.java7 Apr 2004 23:05:37 -   1.5
  +++ LazySortedMap.java9 Apr 2004 10:36:01 -   1.6
  @@ -15,12 +15,7 @@
*/
   package org.apache.commons.collections.map;
   
  -import java.io.IOException;
  -import java.io.ObjectInputStream;
  -import java.io.ObjectOutputStream;
  -import java.io.Serializable;
   import java.util.Comparator;
  -import java.util.Map;
   import java.util.SortedMap;
   
   import org.apache.commons.collections.Factory;
  @@ -47,6 +42,8 @@
* After the above code is executed, codeobj/code will contain
* a new codeDate/code instance. Furthermore, that codeDate/code
* instance is mapped to the NOW key in the map.
  + * p
  + * This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
  @@ -56,7 +53,7 @@
*/
   public class LazySortedMap
   extends LazyMap
  -implements SortedMap, Serializable {
  +implements SortedMap {
   
   /** Serialization version */
   private static final long serialVersionUID = 2715322183617658933L;
  @@ -107,22 +104,6 @@
   }
   
   //---
  -/**
  - * Write the map out using a custom routine.
  - */
  -private void writeObject(ObjectOutputStream out) throws IOException {
  -out.defaultWriteObject();
  -out.writeObject(map);
  -}
  -
  -/**
  - * Read the map in using a custom routine.
  - */
  -private void readObject(ObjectInputStream in) throws IOException, 
ClassNotFoundException {
  -in.defaultReadObject();
  -map = (Map) in.readObject();
  -}
  -
   /**
* Gets the map being decorated.
* 
  
  
  
  1.6   +12 -1 
jakarta-commons/collections/src/java/org/apache/commons/collections/map/LazyMap.java
  
  Index: LazyMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/LazyMap.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LazyMap.java  7 

cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map UnmodifiableOrderedMap.java UnmodifiableSortedMap.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 03:46:32

  Modified:collections/src/test/org/apache/commons/collections/map
TestUnmodifiableMap.java
TestUnmodifiableSortedMap.java
TestUnmodifiableOrderedMap.java
   collections/src/java/org/apache/commons/collections/map
UnmodifiableOrderedMap.java
UnmodifiableSortedMap.java
  Added:   collections/data/test
UnmodifiableOrderedMap.fullCollection.version3.1.obj
UnmodifiableOrderedMap.emptyCollection.version3.1.obj
UnmodifiableSortedMap.emptyCollection.version3.1.obj
UnmodifiableSortedMap.fullCollection.version3.1.obj
  Log:
  Make unmodifiable maps Serializable [18815]
  
  Revision  ChangesPath
  1.1  
jakarta-commons/collections/data/test/UnmodifiableOrderedMap.fullCollection.version3.1.obj
  
Binary file
  
  
  1.1  
jakarta-commons/collections/data/test/UnmodifiableOrderedMap.emptyCollection.version3.1.obj
  
Binary file
  
  
  1.1  
jakarta-commons/collections/data/test/UnmodifiableSortedMap.emptyCollection.version3.1.obj
  
Binary file
  
  
  1.1  
jakarta-commons/collections/data/test/UnmodifiableSortedMap.fullCollection.version3.1.obj
  
Binary file
  
  
  1.10  +11 -11
jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestUnmodifiableMap.java
  
  Index: TestUnmodifiableMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestUnmodifiableMap.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestUnmodifiableMap.java  9 Apr 2004 10:32:25 -   1.9
  +++ TestUnmodifiableMap.java  9 Apr 2004 10:46:32 -   1.10
  @@ -91,14 +91,14 @@
   return 3.1;
   }
   
  -public void testCreate() throws Exception {
  -resetEmpty();
  -writeExternalFormToDisk(
  -(java.io.Serializable) map,
  -
D:/dev/collections/data/test/UnmodifiableMap.emptyCollection.version3.1.obj);
  -resetFull();
  -writeExternalFormToDisk(
  -(java.io.Serializable) map,
  -
D:/dev/collections/data/test/UnmodifiableMap.fullCollection.version3.1.obj);
  -}
  +//public void testCreate() throws Exception {
  +//resetEmpty();
  +//writeExternalFormToDisk(
  +//(java.io.Serializable) map,
  +//
D:/dev/collections/data/test/UnmodifiableMap.emptyCollection.version3.1.obj);
  +//resetFull();
  +//writeExternalFormToDisk(
  +//(java.io.Serializable) map,
  +//
D:/dev/collections/data/test/UnmodifiableMap.fullCollection.version3.1.obj);
  +//}
   }
  
  
  
  1.4   +15 -1 
jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestUnmodifiableSortedMap.java
  
  Index: TestUnmodifiableSortedMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestUnmodifiableSortedMap.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestUnmodifiableSortedMap.java18 Feb 2004 01:20:37 -  1.3
  +++ TestUnmodifiableSortedMap.java9 Apr 2004 10:46:32 -   1.4
  @@ -88,4 +88,18 @@
   } catch (IllegalArgumentException ex) {}
   }
   
  +public String getCompatibilityVersion() {
  +return 3.1;
  +}
  +
  +//public void testCreate() throws Exception {
  +//resetEmpty();
  +//writeExternalFormToDisk(
  +//(java.io.Serializable) map,
  +//
D:/dev/collections/data/test/UnmodifiableSortedMap.emptyCollection.version3.1.obj);
  +//resetFull();
  +//writeExternalFormToDisk(
  +//(java.io.Serializable) map,
  +//
D:/dev/collections/data/test/UnmodifiableSortedMap.fullCollection.version3.1.obj);
  +//}
   }
  
  
  
  1.5   +15 -1 
jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestUnmodifiableOrderedMap.java
  
  Index: TestUnmodifiableOrderedMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/TestUnmodifiableOrderedMap.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestUnmodifiableOrderedMap.java   18 Feb 2004 01:20:38 -  1.4
  +++ TestUnmodifiableOrderedMap.java   9 Apr 2004 10:46:32 -   1.5
  @@ -88,4 +88,18 @@
   } catch (IllegalArgumentException ex) {}
   }
   
  +public String 

[digester] ObjectParamRule - attn Mark Huisman

2004-04-09 Thread Simon Kitching
Hi Mark (or anyone else who might know the answer to this one):

I was looking at the ObjectCreateRule class, and saw that there was some
basic conditional logic in there that allows the caller to specify
that the object is to be passed to the method only if a certain
attribute is present on the matching tag.

What exactly was the reasoning for including this feature?

Thanks,

Simon


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



Re: [digester] @author and @version

2004-04-09 Thread robert burrell donkin
On 9 Apr 2004, at 02:10, Craig McClanahan wrote:

matthew.hawthorne wrote:

Simon Kitching wrote:

What benefit is there in having this info in the source?
I can't currently see any:
 * Developers can just use cvs status.
 * End users just care that the file came from version 2.1.
 * Maybe it is useful info when working with source snapshots,
but that isn't very common.

What am I missing?


I think it's a convenience to be able to see when the last change was 
made, and who made it, in the source file -- instead of doing  'cvs 
status'.  But that's about it.
I like having the $Id$ string somewhere at the top of each file, 
because I often download the sources onto my laptop, and can't execute 
cvs status from an airplane.
+1

the version doesn't add anything (but distractions ;) to the javadocs 
but having an $Id$ tag somewhere is useful (on occasion).

i think that henri's right about good @since tags being much more 
useful. if this was done just before each release, it'd probably be 
possible to use a script to add these to every method and every class 
(which does not have them already).

- robert

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


cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester InvokeMethodRule.java InvokeParamFromAttrRule.java InvokeParamFromBodyRule.java InvokeParamFromDefaultsRule.java InvokeParamFromObjectRule.java InvokeParamFromPathRule.java InvokeParamFromStackRule.java InvokeParamRule.java MethodParams.java Digester.java

2004-04-09 Thread skitching
skitching2004/04/09 04:33:17

  Modified:digester/src/java/org/apache/commons/digester Tag:
DIGESTER_INVOKE_METHOD_BRANCH Digester.java
  Added:   digester/src/java/org/apache/commons/digester Tag:
DIGESTER_INVOKE_METHOD_BRANCH InvokeMethodRule.java
InvokeParamFromAttrRule.java
InvokeParamFromBodyRule.java
InvokeParamFromDefaultsRule.java
InvokeParamFromObjectRule.java
InvokeParamFromPathRule.java
InvokeParamFromStackRule.java InvokeParamRule.java
MethodParams.java
  Log:
  Added implementation of InvokeMethodRule and supporting classes.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.100.2.1 +97 -0 
jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java
  
  Index: Digester.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v
  retrieving revision 1.100
  retrieving revision 1.100.2.1
  diff -u -r1.100 -r1.100.2.1
  --- Digester.java 8 Apr 2004 06:11:36 -   1.100
  +++ Digester.java 9 Apr 2004 11:33:17 -   1.100.2.1
  @@ -1922,6 +1922,103 @@
   }
   
   /**
  + * Add an invoke method rule for a method.
  + *
  + * @param pattern Element matching pattern
  + * @param methodName Method name to be called
  + * @param paramCount Number of expected parameters (or -1 for a single
  + *  parameter from the element body).
  + * @see InvokeMethodRule
  + */
  +public void addInvokeMethod(String pattern, String methodName, 
  +int paramCount) {
  +
  +addRule(
  +pattern,
  +new InvokeMethodRule(methodName, paramCount));
  +}
  +
  +/**
  + * Add an invoke method rule for a method.
  + *
  + * @param pattern Element matching pattern
  + * @param methodName Method name to be called
  + * @param paramCount Number of expected parameters (or -1 for a single
  + *  parameter from the element body).
  + * @see InvokeMethodRule
  + */
  +public void addInvokeMethod(String pattern, String methodName, 
  +int paramCount, String[] types) {
  +
  +addRule(
  +pattern,
  +new InvokeMethodRule(methodName, paramCount, types));
  +}
  +
  +/**
  + * Add an invoke method rule for a method.
  + *
  + * @param pattern Element matching pattern
  + * @param methodName Method name to be called
  + * @param paramCount Number of expected parameters (or -1 for a single
  + *  parameter from the element body).
  + * @see InvokeMethodRule
  + */
  +public void addInvokeMethod(String pattern, String methodName, 
  +int paramCount, Class[] types) {
  +
  +addRule(
  +pattern,
  +new InvokeMethodRule(methodName, paramCount, types));
  +}
  +
  +/** Add an InvokeParamFromAttr rule for the specified parameters. */
  +public void addInvokeParamFromAttr(String pattern, int paramIndex, String 
attrName) {
  +addRule(pattern, new InvokeParamFromAttrRule(paramIndex, attrName));
  +  
  +}
  +
  +/** Add an InvokeParamFromBody rule for the specified parameters. */
  +public void addInvokeParamFromBody(String pattern, int paramIndex) {
  +addRule(pattern, new InvokeParamFromBodyRule(paramIndex));
  +  
  +}
  +
  +/** Add an InvokeParamFromObject rule for the specified parameters. */
  +public void addInvokeParamFromObject(String pattern, int paramIndex,
  +Object obj) {
  +addRule(pattern, new InvokeParamFromObjectRule(paramIndex, obj));
  +  
  +}
  +
  +/** Add an InvokeParamFromStack rule for the specified parameters. */
  +public void addInvokeParamFromStack(String pattern, int paramIndex) {
  +addRule(pattern, new InvokeParamFromStackRule(paramIndex));
  +}
  +
  +/** Add an InvokeParamFromStack rule for the specified parameters. */
  +public void addInvokeParamFromStack(String pattern, int paramIndex, int offset) 
{
  +addRule(pattern, new InvokeParamFromStackRule(paramIndex, offset));
  +}
  +
  +/** Add an InvokeParamFromPath rule for the specified parameters. */
  +public void addInvokeParamFromPath(String pattern, int paramIndex) {
  +addRule(pattern, new InvokeParamFromPathRule(paramIndex));
  +  
  +}
  +
  +/** Add an InvokeParamFromPath rule for the specified parameters. */
  +public void addInvokeParamFromPath(String pattern, int paramIndex,
  +boolean passFullPath) {
  +

cvs commit: jakarta-commons/digester/src/test/org/apache/commons/digester InvokeMethodRuleTestCase.java OverlappingInvokeMethodRuleTestCase.java

2004-04-09 Thread skitching
skitching2004/04/09 04:35:07

  Added:   digester/src/test/org/apache/commons/digester Tag:
DIGESTER_INVOKE_METHOD_BRANCH
InvokeMethodRuleTestCase.java
OverlappingInvokeMethodRuleTestCase.java
  Log:
  New test cases for the new InvokeMethodRule and related classes.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.1.2.1   +699 -0
jakarta-commons/digester/src/test/org/apache/commons/digester/Attic/InvokeMethodRuleTestCase.java
  
  
  
  
  1.1.2.1   +276 -0
jakarta-commons/digester/src/test/org/apache/commons/digester/Attic/OverlappingInvokeMethodRuleTestCase.java
  
  
  
  

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



[digester] InvokeMethodRule

2004-04-09 Thread Simon Kitching
Hi,

I've created a branch called DIGESTER_INVOKE_METHOD_BRANCH, and
committed some code to it.

This is an implementation of a new variant of CallMethodRule.
This new variant invokes its target method as soon as all parameters are
available. As discussed earlier on this list, this makes behaviour more
intuitive in most cases.

It also takes the opportunity to learn some lessons from CallMethodRule,
and hopefully provide a cleaner API.

And hopefully it provides a model for implementing immutable object
creation, where it is desired to create objects with non-default
constructors, but where the data is present as child tags, not as
attributes.

I don't think this is candidate material for release 1.6, as it is a
reasonably large body of new code. But it does pass *all* the tests
provided for CallMethodRule (modified to suit the InvokeMethodRule api).
I'm committing it now so that people can see the code (and so I don't
lose it!).

All comments welcome.

Regards,

Simon


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



cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpClient.java

2004-04-09 Thread olegk
olegk   2004/04/09 05:03:24

  Modified:httpclient/src/java/org/apache/commons/httpclient
HttpClient.java
  Log:
  PR #28303 (HttpClient#getHost  HttpClient#getPort methods are misleading)
  
  HttpClient#getHost  HttpClient#getPort methods deprecated
  
  Contributed by Oleg Kalnichevski
  Reviewed by Michael Becke
  
  Revision  ChangesPath
  1.93  +12 -10
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java
  
  Index: HttpClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- HttpClient.java   22 Feb 2004 18:08:45 -  1.92
  +++ HttpClient.java   9 Apr 2004 12:03:24 -   1.93
  @@ -442,20 +442,22 @@
   }
   
   /**
  -  * Returns the host that the client is accessing.
  +  * Returns the default host. 
 *
  -  * @return The host that the client is accessing, or codenull/code if
  -  * the session has not been started via startSession.
  +  * @return The default host.
  +  * 
  +  * @deprecated use #getHostConfiguration()
 */
public String getHost() {
return hostConfiguration.getHost();
}
   
/**
  -  * Returns the port that the client is accessing.
  +  * Returns the default port.
 *
  -  * @return The port that the client is accessing, or -1 if the session
  -  * has not been started via startSession().
  +  * @return The default port.
  +  * 
  +  * @deprecated use #getHostConfiguration()
 */
public int getPort() {
return hostConfiguration.getPort();
  
  
  

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



cvs commit: jakarta-commons/daemon/src/native/nt/procrun/apps/prunmgr prunmgr.c

2004-04-09 Thread mturk
mturk   2004/04/09 05:23:23

  Modified:daemon/src/native/nt/procrun/apps/prunmgr prunmgr.c
  Log:
  Fix wrongly displayed 'Disabled' instead 'Stopped' status.
  
  Revision  ChangesPath
  1.2   +32 -27
jakarta-commons/daemon/src/native/nt/procrun/apps/prunmgr/prunmgr.c
  
  Index: prunmgr.c
  ===
  RCS file: 
/home/cvs/jakarta-commons/daemon/src/native/nt/procrun/apps/prunmgr/prunmgr.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- prunmgr.c 7 Apr 2004 11:22:45 -   1.1
  +++ prunmgr.c 9 Apr 2004 12:23:23 -   1.2
  @@ -71,20 +71,20 @@
   static LPCWSTR  _s_java = LJava;
   static LPCWSTR  _s_start= LStart;
   static LPCWSTR  _s_stop = LStop;
  -
  -/* Allowed procrun commands */
  -static LPCWSTR _commands[] = {
  -LES,  /* 1 Manage Service (default)*/
  -LMS,  /* 2 Monitor Service */
  -NULL
  -};
  -
  -/* Allowed procrun parameters */
  -static APXCMDLINEOPT _options[] = {
  -/* 0  */{ LAllowMultiInstances, NULL, NULL,   APXCMDOPT_INT, NULL, 0},
  -/* NULL terminate the array */
  -{ NULL }
  -};
  +

  +/* Allowed procrun commands */

  +static LPCWSTR _commands[] = {

  +LES,  /* 1 Manage Service (default)*/

  +LMS,  /* 2 Monitor Service */

  +NULL

  +};

  +
  +/* Allowed procrun parameters */

  +static APXCMDLINEOPT _options[] = {

  +/* 0  */{ LAllowMultiInstances, NULL, NULL,   APXCMDOPT_INT, NULL, 0},

  +/* NULL terminate the array */

  +{ NULL }

  +};

   
   /* Create RBUTTON try menu 
* Configure... (default, or lbutton dblclick)
  @@ -528,10 +528,10 @@
   case SERVICE_STOPPED:
   if (_currentEntry-lpConfig-dwStartType != SERVICE_DISABLED) {
   Button_Enable(GetDlgItem(hDlg, IDC_PPSGSTART), TRUE);
  -SetDlgItemText(hDlg, IDC_PPSGSTATUS, STAT_DISABLED);
  +SetDlgItemText(hDlg, IDC_PPSGSTATUS, STAT_STOPPED);
   }
   else
  -SetDlgItemText(hDlg, IDC_PPSGSTATUS, STAT_STOPPED);
  +SetDlgItemText(hDlg, IDC_PPSGSTATUS, STAT_DISABLED);
   break;
   default:
   break;
  @@ -1043,6 +1043,11 @@
   if (IsDlgButtonChecked(hDlg, IDC_PPJAUTO)) {
   EnableWindow(GetDlgItem(hDlg, IDC_PPJJVM), FALSE);
   EnableWindow(GetDlgItem(hDlg, IDC_PPJBJVM), FALSE);
  +lpBuf = apxGetJavaSoftRuntimeLib(hPool);
  +if (lpBuf) {
  +SetDlgItemTextW(hDlg, IDC_PPJJVM, lpBuf);
  +apxFree(lpBuf);
  +}
   }
   else {
   EnableWindow(GetDlgItem(hDlg, IDC_PPJJVM), TRUE);
  @@ -1572,24 +1577,24 @@
   #endif
   {
   MSGmsg;
  -LPAPXCMDLINE lpCmdline;
  +LPAPXCMDLINE lpCmdline;

   HANDLE mutex = NULL;
   
   apxHandleManagerInitialize();
   hPool = apxPoolCreate(NULL, 0);
   
  -/* Parse the command line */
  -if ((lpCmdline = apxCmdlineParse(hPool, _options, _commands)) == NULL) {
  -/* TODO: dispalay error message */
  -apxDisplayError(TRUE, NULL, 0, Error parsing command line);
  +/* Parse the command line */

  +if ((lpCmdline = apxCmdlineParse(hPool, _options, _commands)) == NULL) {

  +/* TODO: dispalay error message */

  +apxDisplayError(TRUE, NULL, 0, Error parsing command line);

   goto cleanup;
   }
   
   if (!lpCmdline-dwCmdIndex) {
   /* Skip sytem error message */
   SetLastError(ERROR_SUCCESS);
  -apxDisplayError(TRUE, NULL, 0, 
  -apxLoadResourceA(IDS_ERRORCMD, 0),
  +apxDisplayError(TRUE, NULL, 0, 

  +apxLoadResourceA(IDS_ERRORCMD, 0),

   lpCmdLine);
   goto cleanup;
   }
  @@ -1640,8 +1645,8 @@
   if ((mutex == NULL) || (GetLastError() == ERROR_ALREADY_EXISTS)) { 
   /* Skip sytem error message */
   SetLastError(ERROR_SUCCESS);
  -apxDisplayError(TRUE, NULL, 0, apxLoadResourceA(IDS_ALREAY_RUNING, 0),
  -lpCmdline-szApplication);
  +apxDisplayError(TRUE, NULL, 0, apxLoadResourceA(IDS_ALREAY_RUNING, 0),

  +lpCmdline-szApplication);

   goto cleanup;
   }
   }
  @@ -1685,8 +1690,8 @@
   DestroyIcon(hIcoRun);
   if (mutex)
   CloseHandle(mutex);
  -if (lpCmdline)
  -apxCmdlineFree(lpCmdline);
  +if (lpCmdline)

  +apxCmdlineFree(lpCmdline);

   apxCloseHandle(hService);
   apxHandleManagerDestroy();
   ExitProcess(0);
  
  
  


RE: [Math] - RealMatrix

2004-04-09 Thread Inger, Matthew
The basic reason i inquired is that by using doubles,
you're limiting the precision available when doing certain
operations.  Take the following matrix:

 [ 4 6 ]
 [ 6 14 ]

If you try to take the inverse of that matrix, the correct
answer is:

 [  0.7  -0.3 ]
 [ -0.3   0.2 ]

however, by using double in java, we get something like:

 [  0.7002 -0.3001  ]
 [ -0.3001  0.20007 ]

using BigDecimal isntead, we might get a slightly more accurate
result (though i admit, in most cases, people won't go to 16 digits)


-Original Message-
From: Al Chou [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 1:13 AM
To: Jakarta Commons Developers List
Subject: Re: [Math] - RealMatrix


--- Phil Steitz [EMAIL PROTECTED] wrote:
 Inger, Matthew wrote:
  Has any thought been given to creating a Matrix interface
  which can handle BigInteger and/or BigDecimal?
 
 Yes. BigInteger would be a little funny, since Integers aren't a field ;-)

 but BigDecimal might make sense, as would Complex.  There are (at least) 
 two ways to go, which we can explore post 1.0:
 
 1) Create an abstract Matrix interface with entries being abstact field 
 elements.  See the approach in, e.g. JADE 
 http://jade.dautelle.com/api/com/dautelle/math/Matrix.html.  This is 
 really walking down the abstract algebra framework path.
 
 2) Create BigDecimalMatrix, ComplexMatrix with interfaces similar to 
 RealMatrix, leveraging the special properties of the field elements and 
 their representations.
 
 My inclination would be to KISS and go with 2), with practical 
 applications / use cases driving decisions on what gets implemented; 
 though I see the value of the abstract approach as well.

+1 As usual, I agree that real use of the library should play a very large
role
in informing what we develop (though I certainly dream of being most things
to
most users g).


 Unless we think that the current design of RealMatrix is overly limiting, 
 I would prefer to hold off on this discussion until post 1.0, though.
 
 Phil

I completely agree.  We don't have anyone clamoring for these extensions
(yet)!



Al

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



[digester] moving the RSS code

2004-04-09 Thread Simon Kitching
Hi,

A while ago I raised the idea of moving the RSS code currently in
digester to somewhere outside the main build, so that the vast majority
of users who don't want RSS support don't get it bundled.

For reference, Craig's +1 response is here:

http://marc.theaimsgroup.com/?l=jakarta-commons-userm=107475737704437w=2

Unless someone objects, towards the end of the week (around 16 april) I
will create
  src/extras/rss/java/org/apache/commons/digester/rss
and add all the rss files there, then cvs rm them from their original
locations. Directory
  src/extras/rss/test/org/apache/commons/digester/rss
will be used to store the rss unit tests.

Users who do want rss support will then need to compile the code
themselves, and include that extra jar file in their classpath. However
there are no changes to package names, so it should be a binary
compatible change.

I guess we'll need some extra target(s) in the build.xml file, to ensure
the extras stuff gets built too.

Regards,

Simon


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



Re: [math] ArrayUtils.isAscending, isDescending

2004-04-09 Thread Phil Steitz


I missed the beginning of this thread; my Yahoo mail has been strangely low in
activity the past two days.
Rather than espouse an opinion on where these methods should go, let me ask why
a parallel sort would be so bad.  Especially if you sorted by using an index
table.  I did a clean-room implementation of index table sorting in Ruby a few
weeks ago for my wife, based on the text description of the algorithm in _NR_
(I was very careful not to read the code -- though I'm pretty sure I had to
type it in once and use it years ago in grad school, I sure wouldn't remember
even a line of it now).
The use case that touched this off was validating the knot point array 
passed in to spline interpolation.  If the x[] values are not strictly 
increasing, the activation is suspect, so I would prefer to throw rather 
than speculatively sort the y[] vector in parallel. Same problem applies 
to the constructor of the PolynomialSpline wrt x[] and polynomials[] 
(where parallel sorting would be even more dubious).

Phil



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


RE: [Math] - RealMatrix

2004-04-09 Thread Al Chou
--- Inger, Matthew [EMAIL PROTECTED] wrote:
 The basic reason i inquired is that by using doubles,
 you're limiting the precision available when doing certain
 operations.  Take the following matrix:
 
  [ 4 6 ]
  [ 6 14 ]
 
 If you try to take the inverse of that matrix, the correct
 answer is:
 
  [  0.7  -0.3 ]
  [ -0.3   0.2 ]
 
 however, by using double in java, we get something like:
 
  [  0.7002 -0.3001  ]
  [ -0.3001  0.20007 ]
 
 using BigDecimal isntead, we might get a slightly more accurate
 result (though i admit, in most cases, people won't go to 16 digits)

A valid point, though again, usage will dictate whether such levels of
precision are necessary (also, most usage I've seen just lives with the fact
that most base-10 numbers are not exactly represented in base-2; the inverse
matrix above would probably be considered close enough by many if the
difference were explained by representation inaccuracy).  Essentially all
numerical computing to date has been done with, at best(!), double precision. 
Some techniques that could in fact increase precision in principle are, to my
knowledge, never used in practice (e.g., sorting a list of numbers before
summing, so that they can be summed from smallest to largest -- and if there's
a possibility of having both negative and positive signs, summing the
like-signed elements and then finally the resulting two opposite-signed partial
sums).  I guess performance comes into play, as well as a mathematician's view
(even though many who are not mathematicians do numerical computing) that
_that_ level of nitpickiness is just too much g.

But if we were to have use cases in which exactness was paramount, very high
precision (or perhaps using a RationalNumber class) would of course be the
right thing to provide.


Al

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



Re: [math] ArrayUtils.isAscending, isDescending

2004-04-09 Thread Al Chou
--- Phil Steitz [EMAIL PROTECTED] wrote:
 
 
  I missed the beginning of this thread; my Yahoo mail has been strangely low
 in
  activity the past two days.
  
  Rather than espouse an opinion on where these methods should go, let me ask
 why
  a parallel sort would be so bad.  Especially if you sorted by using an
 index
  table.  I did a clean-room implementation of index table sorting in Ruby a
 few
  weeks ago for my wife, based on the text description of the algorithm in
 _NR_
  (I was very careful not to read the code -- though I'm pretty sure I had to
  type it in once and use it years ago in grad school, I sure wouldn't
 remember
  even a line of it now).
 
 The use case that touched this off was validating the knot point array 
 passed in to spline interpolation.  If the x[] values are not strictly 
 increasing, the activation is suspect, so I would prefer to throw rather 
 than speculatively sort the y[] vector in parallel. Same problem applies 
 to the constructor of the PolynomialSpline wrt x[] and polynomials[] 
 (where parallel sorting would be even more dubious).
 
 Phil

It just occurred to me that a use case that perhaps we have not considered is
in graphics and scalable fonts, where relations that are not functions (i.e.,
they are multi-valued functions) can easily occur -- think of your favorite
drawing program's ability to draw Bezier curves with loops in them.  I know
that font systems use cubic (Postscript) and quadratic (TrueType) curves to
describe font outlines -- though that case doesn't necessarily argue for
multivalued interpolating segments.

Anyway, food for thought.


Al

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



Re: [Math] - RealMatrix

2004-04-09 Thread Phil Steitz
Al Chou wrote:
--- Inger, Matthew [EMAIL PROTECTED] wrote:

The basic reason i inquired is that by using doubles,
you're limiting the precision available when doing certain
operations.  Take the following matrix:
[ 4 6 ]
[ 6 14 ]
If you try to take the inverse of that matrix, the correct
answer is:
[  0.7  -0.3 ]
[ -0.3   0.2 ]
however, by using double in java, we get something like:

[  0.7002 -0.3001  ]
[ -0.3001  0.20007 ]
using BigDecimal isntead, we might get a slightly more accurate
result (though i admit, in most cases, people won't go to 16 digits)


A valid point, though again, usage will dictate whether such levels of
precision are necessary (also, most usage I've seen just lives with the fact
that most base-10 numbers are not exactly represented in base-2; the inverse
matrix above would probably be considered close enough by many if the
difference were explained by representation inaccuracy).  Essentially all
numerical computing to date has been done with, at best(!), double precision. 
Some techniques that could in fact increase precision in principle are, to my
knowledge, never used in practice (e.g., sorting a list of numbers before
summing, so that they can be summed from smallest to largest -- and if there's
a possibility of having both negative and positive signs, summing the
like-signed elements and then finally the resulting two opposite-signed partial
sums).  I guess performance comes into play, as well as a mathematician's view
(even though many who are not mathematicians do numerical computing) that
_that_ level of nitpickiness is just too much g.

But if we were to have use cases in which exactness was paramount, very high
precision (or perhaps using a RationalNumber class) would of course be the
right thing to provide.
And of course, you can quickly waste 50 digits of individual value 
representation precision with bad numerics ;-)

Phil



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


[all] maven build - help required

2004-04-09 Thread Rob Oxspring
I've freshly set up my environment to do some work on commons-cli 
(RESEARCH_CLI_2_ROXSPRING branch if that matters) and am really 
struggling to get the build working.

Using a clean checkout of jakarta-commons, running maven (rc1) from the 
cli directory ends up failing to compile any of the java source 
(although maven claims a successful build):

java:compile:
[echo] Compiling to 
C:\Java\apache.org\jakarta-commons\cli/target/classes
[echo] No java source files to compile.

I tried a few other components at random and founnd that while codec, 
collections and digester do the same; validator claims to be compiling 
20 file.

Could anyone enlighten me as to what's gone wrong? is it my set up? is 
it the new commons-build? is it just general maven black magic?

Thanks,

Rob

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


Re: [all] maven build - help required

2004-04-09 Thread David Graham

--- Rob Oxspring [EMAIL PROTECTED] wrote:
 I've freshly set up my environment to do some work on commons-cli 
 (RESEARCH_CLI_2_ROXSPRING branch if that matters) and am really 
 struggling to get the build working.
 
 Using a clean checkout of jakarta-commons, running maven (rc1) from the 
 cli directory ends up failing to compile any of the java source 
 (although maven claims a successful build):
 
 java:compile:
  [echo] Compiling to 
 C:\Java\apache.org\jakarta-commons\cli/target/classes
  [echo] No java source files to compile.

It sounds like your build element in project.xml isn't configured
correctly.  Take a look at the setup for working components to see what
you're missing.

David

 
 I tried a few other components at random and founnd that while codec, 
 collections and digester do the same; validator claims to be compiling 
 20 file.
 
 Could anyone enlighten me as to what's gone wrong? is it my set up? is 
 it the new commons-build? is it just general maven black magic?
 
 Thanks,
 
 Rob
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



RE: [Math] - RealMatrix

2004-04-09 Thread Inger, Matthew
Not only that, but as you mention, order matters.  Doing the following
operations produces different outputs:


NumberFormat fmt = NumberFormat.getInstance();
fmt.setMaximumFractionDigits(48);
fmt.setMinimumFractionDigits(48);


double res = ((double)2.0 / (double)3.0) * (double)14.0;
System.out.println(fmt.format(res));
// outputs: 9.3320

double res2 = ((double)14.0 * (double)2.0) / (double) 3.0;
System.out.println(fmt.format(res2));
// outputs: 9.3340


conceptually, and mathematically, these two equations are identical
and should produce the exact same result.  However they do not (even
using BigDecimal, they do not).

-Original Message-
From: Al Chou [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 9:23 AM
To: Jakarta Commons Developers List
Subject: RE: [Math] - RealMatrix


--- Inger, Matthew [EMAIL PROTECTED] wrote:
 The basic reason i inquired is that by using doubles,
 you're limiting the precision available when doing certain
 operations.  Take the following matrix:
 
  [ 4 6 ]
  [ 6 14 ]
 
 If you try to take the inverse of that matrix, the correct
 answer is:
 
  [  0.7  -0.3 ]
  [ -0.3   0.2 ]
 
 however, by using double in java, we get something like:
 
  [  0.7002 -0.3001  ]
  [ -0.3001  0.20007 ]
 
 using BigDecimal isntead, we might get a slightly more accurate
 result (though i admit, in most cases, people won't go to 16 digits)

A valid point, though again, usage will dictate whether such levels of
precision are necessary (also, most usage I've seen just lives with the fact
that most base-10 numbers are not exactly represented in base-2; the inverse
matrix above would probably be considered close enough by many if the
difference were explained by representation inaccuracy).  Essentially all
numerical computing to date has been done with, at best(!), double
precision. 
Some techniques that could in fact increase precision in principle are, to
my
knowledge, never used in practice (e.g., sorting a list of numbers before
summing, so that they can be summed from smallest to largest -- and if
there's
a possibility of having both negative and positive signs, summing the
like-signed elements and then finally the resulting two opposite-signed
partial
sums).  I guess performance comes into play, as well as a mathematician's
view
(even though many who are not mathematicians do numerical computing) that
_that_ level of nitpickiness is just too much g.

But if we were to have use cases in which exactness was paramount, very high
precision (or perhaps using a RationalNumber class) would of course be the
right thing to provide.


Al

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/keyvalue TiedMapEntry.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 07:35:10

  Modified:collections RELEASE-NOTES.html
   collections/src/java/org/apache/commons/collections/keyvalue
TiedMapEntry.java
  Log:
  Make TiedMapEntry serializable
  
  Revision  ChangesPath
  1.29  +13 -6 jakarta-commons/collections/RELEASE-NOTES.html
  
  Index: RELEASE-NOTES.html
  ===
  RCS file: /home/cvs/jakarta-commons/collections/RELEASE-NOTES.html,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- RELEASE-NOTES.html7 Apr 2004 23:17:25 -   1.28
  +++ RELEASE-NOTES.html9 Apr 2004 14:35:10 -   1.29
  @@ -26,18 +26,13 @@
   centerh3NEW CLASSES/h3/center
   ul
   liTransformedPredicate - A predicate where the input object is transformed 
[26946]/li
  +liObjectGraphIterator - An iterator that can iterate over a graph of objects/li
   /ul
   
   centerh3ENHANCEMENTS/h3/center
   ul
   liReferenceMap - Changed to extend AbstractHashedMap, thus gaining a 
mapIterator() and subclassability/li
  -liFast3Map - Make Serializable [27946]/li
   liFast3Map - Add clone() method/li
  -liFixedSizeMap - Make Serializable [18815]/li
  -liFixedSizeSortedMap - Make Serializable [18815]/li
  -liLazyMap - Make Serializable [18815]/li
  -liLazySortedMap - Make Serializable [18815]/li
  -liListOrderedMap - Make Serializable [18815]/li
   liMultiKey - Add getKey(index) and size() methods and make constructor public/li
   liMultiHashMap - Add five methods to improve the API/li
   liAbstractHashedMap,AbstractLinkedMap - Add methods to access entry methods when 
protected scope blocks/li
  @@ -45,6 +40,18 @@
   liFunctors - Add additional getInstance() methods for consistency 
[27856,27857]/li
   liCollectionUtils - get(Object,int) method now supports primitive arrays/li
   liCollectionUtils - Add size(Object) method to find the size of various 
collection-like objects [27909]/li
  +/ul
  +
  +h4Made Serializable/h4
  +ul
  +liFast3Map [27946]/li
  +liFixedSizeMap/SortedMap [18815]/li
  +liLazyMap/SortedMap [18815]/li
  +liListOrderedMap [18815]/li
  +liPredicatedMap/SortedMap [18815]/li
  +liTransformedMap/SortedMap [18815]/li
  +liUnmodifiableMap/SortedMap/OrderedMap [18815]/li
  +liTiedMapEntry/li
   /ul
   
   centerh3BUG FIXES/h3/center
  
  
  
  1.5   +6 -2  
jakarta-commons/collections/src/java/org/apache/commons/collections/keyvalue/TiedMapEntry.java
  
  Index: TiedMapEntry.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/keyvalue/TiedMapEntry.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TiedMapEntry.java 18 Feb 2004 01:00:08 -  1.4
  +++ TiedMapEntry.java 9 Apr 2004 14:35:10 -   1.5
  @@ -15,6 +15,7 @@
*/
   package org.apache.commons.collections.keyvalue;
   
  +import java.io.Serializable;
   import java.util.Map;
   
   import org.apache.commons.collections.KeyValue;
  @@ -30,7 +31,10 @@
* 
* @author Stephen Colebourne
*/
  -public class TiedMapEntry implements Map.Entry, KeyValue {
  +public class TiedMapEntry implements Map.Entry, KeyValue, Serializable {
  +
  +/** Serialization version */
  +private static final long serialVersionUID = -8453869361373831205L;
   
   /** The map underlying the entry/iterator */
   private final Map map;
  
  
  

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



cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections/iterators AbstractTestMapIterator.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 07:38:13

  Modified:collections/src/test/org/apache/commons/collections/iterators
AbstractTestMapIterator.java
  Log:
  Handle singleton maps in test class
  
  Revision  ChangesPath
  1.12  +2 -2  
jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/AbstractTestMapIterator.java
  
  Index: AbstractTestMapIterator.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/AbstractTestMapIterator.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AbstractTestMapIterator.java  18 Feb 2004 01:20:33 -  1.11
  +++ AbstractTestMapIterator.java  9 Apr 2004 14:38:13 -   1.12
  @@ -211,7 +211,7 @@
   }
   
   Object newValue = addSetValues()[0];
  -Object newValue2 = addSetValues()[1];
  +Object newValue2 = (addSetValues().length == 1 ? addSetValues()[0] : 
addSetValues()[1]);
   MapIterator it = makeFullMapIterator();
   Map map = getMap();
   Map confirmed = getConfirmedMap();
  
  
  

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



cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/iterators SingletonIterator.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 07:38:47

  Modified:collections/src/test/org/apache/commons/collections/iterators
TestAll.java
   collections RELEASE-NOTES.html
   collections/src/java/org/apache/commons/collections/iterators
SingletonIterator.java
  Added:   collections/src/test/org/apache/commons/collections/iterators
TestSingletonIterator2.java
  Log:
  SingletonIterator - make remove() functionality optional
  
  Revision  ChangesPath
  1.15  +2 -1  
jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestAll.java
  
  Index: TestAll.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestAll.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TestAll.java  20 Mar 2004 00:21:08 -  1.14
  +++ TestAll.java  9 Apr 2004 14:38:47 -   1.15
  @@ -48,6 +48,7 @@
   suite.addTest(TestListIteratorWrapper.suite());
   suite.addTest(TestLoopingIterator.suite());
   suite.addTest(TestSingletonIterator.suite());
  +suite.addTest(TestSingletonIterator2.suite());
   suite.addTest(TestSingletonListIterator.suite());
   suite.addTest(TestObjectGraphIterator.suite());
   suite.addTest(TestUniqueFilterIterator.suite());
  
  
  
  1.1  
jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestSingletonIterator2.java
  
  Index: TestSingletonIterator2.java
  ===
  /*
   *  Copyright 2001-2004 The Apache Software Foundation
   *
   *  Licensed under the Apache License, Version 2.0 (the License);
   *  you may not use this file except in compliance with the License.
   *  You may obtain a copy of the License at
   *
   *  http://www.apache.org/licenses/LICENSE-2.0
   *
   *  Unless required by applicable law or agreed to in writing, software
   *  distributed under the License is distributed on an AS IS BASIS,
   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *  See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  package org.apache.commons.collections.iterators;
  
  import java.util.Iterator;
  import java.util.NoSuchElementException;
  
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.commons.collections.ResettableIterator;
  
  /**
   * Tests the SingletonIterator to ensure that the next() method will actually
   * perform the iteration rather than the hasNext() method.
   *
   * @version $Revision: 1.1 $ $Date: 2004/04/09 14:38:47 $
   * 
   * @author James Strachan
   */
  public class TestSingletonIterator2 extends AbstractTestIterator {
  
  private static final Object testValue = foo;
  
  public static Test suite() {
  return new TestSuite(TestSingletonIterator2.class);
  }
  
  public TestSingletonIterator2(String testName) {
  super(testName);
  }
  
  //---
  public Iterator makeEmptyIterator() {
  SingletonIterator iter = new SingletonIterator(testValue);
  iter.next();
  iter.remove();
  iter.reset();
  return iter;
  }
  
  public Iterator makeFullIterator() {
  return new SingletonIterator(testValue, false);
  }
  
  public boolean supportsRemove() {
  return false;
  }
  
  public boolean supportsEmptyIterator() {
  return false;
  }
  
  //---
  public void testIterator() {
  Iterator iter = (Iterator) makeObject();
  assertTrue(Iterator has a first item, iter.hasNext());
  
  Object iterValue = iter.next();
  assertEquals(Iteration value is correct, testValue, iterValue);
  
  assertTrue(Iterator should now be empty, !iter.hasNext());
  
  try {
  iter.next();
  } catch (Exception e) {
  assertTrue(
  NoSuchElementException must be thrown,
  e.getClass().equals((new NoSuchElementException()).getClass()));
  }
  }
  
  public void testReset() {
  ResettableIterator it = (ResettableIterator) makeObject();
  
  assertEquals(true, it.hasNext());
  assertEquals(testValue, it.next());
  assertEquals(false, it.hasNext());
  
  it.reset();
  
  assertEquals(true, it.hasNext());
  assertEquals(testValue, it.next());
  assertEquals(false, it.hasNext());
  
  it.reset();
  it.reset();
  
  assertEquals(true, 

cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map Flat3Map.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 07:42:37

  Modified:collections RELEASE-NOTES.html
   collections/src/java/org/apache/commons/collections/map
Flat3Map.java
  Log:
  Handle infinite loops in toString of Flat3Map
  
  Revision  ChangesPath
  1.31  +1 -0  jakarta-commons/collections/RELEASE-NOTES.html
  
  Index: RELEASE-NOTES.html
  ===
  RCS file: /home/cvs/jakarta-commons/collections/RELEASE-NOTES.html,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- RELEASE-NOTES.html9 Apr 2004 14:38:47 -   1.30
  +++ RELEASE-NOTES.html9 Apr 2004 14:42:36 -   1.31
  @@ -60,6 +60,7 @@
   liMap/BidiMap implementations only checked key and not value in entry set 
contains(Object) and remove(Object)/li
   liAbstractHashedMap subclasses failed to clone() correctly [27159]/li
   liExtendedProperties - Close input stream in constructor [27737]/li
  +liFlat3Map - Handle infinite loops in toString/li
   /ul
   
   centerh3JAVADOC/h3/center
  
  
  
  1.15  +10 -8 
jakarta-commons/collections/src/java/org/apache/commons/collections/map/Flat3Map.java
  
  Index: Flat3Map.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/Flat3Map.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Flat3Map.java 31 Mar 2004 23:18:56 -  1.14
  +++ Flat3Map.java 9 Apr 2004 14:42:36 -   1.15
  @@ -103,6 +103,7 @@
* Constructor copying elements from another map.
*
* @param map  the map to copy
  + * @throws NullPointerException if the map is null
*/
   public Flat3Map(Map map) {
   super();
  @@ -325,7 +326,8 @@
   /**
* Puts all the values from the specified map into this map.
* 
  - * @param map
  + * @param map  the map to add
  + * @throws NullPointerException if the map is null
*/
   public void putAll(Map map) {
   int size = map.size();
  @@ -1094,19 +1096,19 @@
   buf.append('{');
   switch (size) {  // drop through
   case 3:
  -buf.append(key3);
  +buf.append((key3 == this ? (this Map) : key3));
   buf.append('=');
  -buf.append(value3);
  +buf.append((value3 == this ? (this Map) : value3));
   buf.append(',');
   case 2:
  -buf.append(key2);
  +buf.append((key2 == this ? (this Map) : key2));
   buf.append('=');
  -buf.append(value2);
  +buf.append((value2 == this ? (this Map) : value2));
   buf.append(',');
   case 1:
  -buf.append(key1);
  +buf.append((key1 == this ? (this Map) : key1));
   buf.append('=');
  -buf.append(value1);
  +buf.append((value1 == this ? (this Map) : value1));
   }
   buf.append('}');
   return buf.toString();
  
  
  

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



cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections/map AbstractTestMap.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 07:45:38

  Modified:collections/src/test/org/apache/commons/collections/map
AbstractTestMap.java
  Log:
  Handle singleton maps in test class
  
  Revision  ChangesPath
  1.11  +3 -3  
jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestMap.java
  
  Index: AbstractTestMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestMap.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AbstractTestMap.java  9 Apr 2004 09:38:31 -   1.10
  +++ AbstractTestMap.java  9 Apr 2004 14:45:38 -   1.11
  @@ -1241,9 +1241,9 @@
   
   public void testMapEntrySetIteratorEntrySetValue() {
   Object key1 = getSampleKeys()[0];
  -Object key2 = getSampleKeys()[1];
  +Object key2 = (getSampleKeys().length ==1 ? getSampleKeys()[0] : 
getSampleKeys()[1]);
   Object newValue1 = getNewSampleValues()[0];
  -Object newValue2 = getNewSampleValues()[1];
  +Object newValue2 = (getNewSampleValues().length ==1 ? 
getNewSampleValues()[0] : getNewSampleValues()[1]);
   
   resetFull();
   // explicitly get entries as sample values/keys are connected for some 
maps
  
  
  

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



cvs commit: jakarta-commons/collections/data/test SingletonMap.emptyCollection.version3.1.obj SingletonMap.fullCollection.version3.1.obj

2004-04-09 Thread scolebourne
scolebourne2004/04/09 07:46:35

  Modified:collections RELEASE-NOTES.html
   collections/src/test/org/apache/commons/collections/map
TestAll.java
  Added:   collections/src/java/org/apache/commons/collections/map
SingletonMap.java
   collections/src/test/org/apache/commons/collections/map
TestSingletonMap.java
   collections/data/test
SingletonMap.emptyCollection.version3.1.obj
SingletonMap.fullCollection.version3.1.obj
  Log:
  Add fully featured SingletonMap
  
  Revision  ChangesPath
  1.1  
jakarta-commons/collections/src/java/org/apache/commons/collections/map/SingletonMap.java
  
  Index: SingletonMap.java
  ===
  /*
   *  Copyright 2003-2004 The Apache Software Foundation
   *
   *  Licensed under the Apache License, Version 2.0 (the License);
   *  you may not use this file except in compliance with the License.
   *  You may obtain a copy of the License at
   *
   *  http://www.apache.org/licenses/LICENSE-2.0
   *
   *  Unless required by applicable law or agreed to in writing, software
   *  distributed under the License is distributed on an AS IS BASIS,
   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *  See the License for the specific language governing permissions and
   *  limitations under the License.
   */
  package org.apache.commons.collections.map;
  
  import java.io.Serializable;
  import java.util.AbstractSet;
  import java.util.Collection;
  import java.util.Collections;
  import java.util.Iterator;
  import java.util.Map;
  import java.util.NoSuchElementException;
  import java.util.Set;
  
  import org.apache.commons.collections.BoundedMap;
  import org.apache.commons.collections.KeyValue;
  import org.apache.commons.collections.MapIterator;
  import org.apache.commons.collections.OrderedMap;
  import org.apache.commons.collections.OrderedMapIterator;
  import org.apache.commons.collections.ResettableIterator;
  import org.apache.commons.collections.iterators.SingletonIterator;
  import org.apache.commons.collections.keyvalue.TiedMapEntry;
  
  /**
   * A codeMap/code implementation that holds a single item and is fixed size.
   * p
   * The single key/value pair is specified at creation.
   * The map is fixed size so any action that would change the size is disallowed.
   * However, the codeput/code or codesetValue/code methods can ichange/i
   * the value associated with the key.
   * p
   * If trying to remove or clear the map, an UnsupportedOperationException is thrown.
   * If trying to put a new mapping into the map, an  IllegalArgumentException is 
thrown.
   * The put method will only suceed if the key specified is the same as the 
   * singleton key.
   * p
   * The key and value can be obtained by:
   * ul
   * linormal Map methods and views
   * lithe codeMapIterator/code, see [EMAIL PROTECTED] #mapIterator()}
   * lithe codeKeyValue/code interface (just cast - no object creation)
   * /ul
   * 
   * @since Commons Collections 3.1
   * @version $Revision: 1.1 $ $Date: 2004/04/09 14:46:35 $
   *
   * @author Stephen Colebourne
   */
  public class SingletonMap
  implements OrderedMap, BoundedMap, KeyValue, Serializable, Cloneable {
  
  /** Serialization version */
  private static final long serialVersionUID = -8931271118676803261L;
  
  /** Singleton key */
  private final Object key;
  /** Singleton value */
  private Object value;
  
  /**
   * Constructor that creates a map of codenull/code to codenull/code.
   */
  public SingletonMap() {
  super();
  this.key = null;
  }
  
  /**
   * Constructor specifying the key and value.
   *
   * @param key  the key to use
   * @param value  the value to use
   */
  public SingletonMap(Object key, Object value) {
  super();
  this.key = key;
  this.value = value;
  }
  
  /**
   * Constructor specifying the key and value as a codeKeyValue/code.
   *
   * @param keyValue  the key value pair to use
   */
  public SingletonMap(KeyValue keyValue) {
  super();
  this.key = keyValue.getKey();
  this.value = keyValue.getValue();
  }
  
  /**
   * Constructor specifying the key and value as a codeMapEntry/code.
   *
   * @param keyValue  the key value pair to use
   */
  public SingletonMap(Map.Entry entry) {
  super();
  this.key = entry.getKey();
  this.value = entry.getValue();
  }
  
  /**
   * Constructor copying elements from another map.
   *
   * @param map  the map to copy, must be size 1
   * @throws NullPointerException if the map is null
   * @throws IllegalArgumentException if the size 

cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections TestMapUtils.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 07:55:39

  Modified:collections/src/test/org/apache/commons/collections
TestMapUtils.java
  Log:
  Make typed maps Serializable [18815]
  
  Revision  ChangesPath
  1.23  +3 -3  
jakarta-commons/collections/src/test/org/apache/commons/collections/TestMapUtils.java
  
  Index: TestMapUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestMapUtils.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- TestMapUtils.java 18 Feb 2004 01:20:35 -  1.22
  +++ TestMapUtils.java 9 Apr 2004 14:55:39 -   1.23
  @@ -28,9 +28,9 @@
   
   import junit.framework.Test;
   
  -import org.apache.commons.collections.map.AbstractTestMap;
   import org.apache.commons.collections.map.LazyMap;
   import org.apache.commons.collections.map.PredicatedMap;
  +import org.apache.commons.collections.map.TestPredicatedMap;
   
   /**
* Tests for MapUtils.
  @@ -121,7 +121,7 @@
   }
   
   public BulkTest bulkTestTypedMap() {
  -return new AbstractTestMap() {
  +return new TestPredicatedMap() {
   public boolean isAllowNullKey() {
   return false;
   }
  
  
  

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



Re: [Math] - RealMatrix

2004-04-09 Thread Al Chou
--- Phil Steitz [EMAIL PROTECTED] wrote:
 Al Chou wrote:
  But if we were to have use cases in which exactness was paramount, very
 high
  precision (or perhaps using a RationalNumber class) would of course be the
  right thing to provide.
 
 And of course, you can quickly waste 50 digits of individual value 
 representation precision with bad numerics ;-)
 
 Phil

Ah-yup.  Accuracy/precision, like security and so many other things (e.g.,
performance), is vulnerable to the weakest-link-in-the-chain effect.


Al

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map TypedSortedMap.java TypedMap.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 07:57:10

  Modified:collections/src/java/org/apache/commons/collections/map
TypedSortedMap.java TypedMap.java
  Log:
  Make typed maps Serializable [18815]
  
  Revision  ChangesPath
  1.5   +3 -1  
jakarta-commons/collections/src/java/org/apache/commons/collections/map/TypedSortedMap.java
  
  Index: TypedSortedMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/TypedSortedMap.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TypedSortedMap.java   18 Feb 2004 01:13:19 -  1.4
  +++ TypedSortedMap.java   9 Apr 2004 14:57:10 -   1.5
  @@ -26,6 +26,8 @@
* The validation of additions is performed via an instanceof test against 
* a specified codeClass/code. If an object cannot be added to the
* collection, an IllegalArgumentException is thrown.
  + * p
  + * The returned implementation is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
  
  
  
  1.5   +3 -1  
jakarta-commons/collections/src/java/org/apache/commons/collections/map/TypedMap.java
  
  Index: TypedMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/TypedMap.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TypedMap.java 18 Feb 2004 01:13:19 -  1.4
  +++ TypedMap.java 9 Apr 2004 14:57:10 -   1.5
  @@ -26,6 +26,8 @@
* The validation of additions is performed via an instanceof test against 
* a specified codeClass/code. If an object cannot be added to the
* collection, an IllegalArgumentException is thrown.
  + * p
  + * The returned implementation is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
  
  
  

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



cvs commit: jakarta-commons/collections RELEASE-NOTES.html

2004-04-09 Thread scolebourne
scolebourne2004/04/09 07:57:41

  Modified:collections RELEASE-NOTES.html
  Log:
  Make typed maps Serializable [18815]
  
  Revision  ChangesPath
  1.33  +1 -0  jakarta-commons/collections/RELEASE-NOTES.html
  
  Index: RELEASE-NOTES.html
  ===
  RCS file: /home/cvs/jakarta-commons/collections/RELEASE-NOTES.html,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- RELEASE-NOTES.html9 Apr 2004 14:46:35 -   1.32
  +++ RELEASE-NOTES.html9 Apr 2004 14:57:41 -   1.33
  @@ -52,6 +52,7 @@
   liListOrderedMap [18815]/li
   liPredicatedMap/SortedMap [18815]/li
   liTransformedMap/SortedMap [18815]/li
  +liTypedMap/SortedMap [18815]/li
   liUnmodifiableMap/SortedMap/OrderedMap [18815]/li
   liTiedMapEntry/li
   /ul
  
  
  

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



RE: [Math] - RealMatrix

2004-04-09 Thread Al Chou
Yup.  It's interesting that the two results straddle the correct value in the
final nonzero digit.

Al


--- Inger, Matthew [EMAIL PROTECTED] wrote:
 Not only that, but as you mention, order matters.  Doing the following
 operations produces different outputs:
 
 
 NumberFormat fmt = NumberFormat.getInstance();
 fmt.setMaximumFractionDigits(48);
 fmt.setMinimumFractionDigits(48);
 
 
 double res = ((double)2.0 / (double)3.0) * (double)14.0;
 System.out.println(fmt.format(res));
 // outputs: 9.3320
 
 double res2 = ((double)14.0 * (double)2.0) / (double) 3.0;
 System.out.println(fmt.format(res2));
 // outputs: 9.3340
 
 
 conceptually, and mathematically, these two equations are identical
 and should produce the exact same result.  However they do not (even
 using BigDecimal, they do not).
 
 -Original Message-
 From: Al Chou [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 09, 2004 9:23 AM
 To: Jakarta Commons Developers List
 Subject: RE: [Math] - RealMatrix
 
 
 --- Inger, Matthew [EMAIL PROTECTED] wrote:
  The basic reason i inquired is that by using doubles,
  you're limiting the precision available when doing certain
  operations.  Take the following matrix:
  
   [ 4 6 ]
   [ 6 14 ]
  
  If you try to take the inverse of that matrix, the correct
  answer is:
  
   [  0.7  -0.3 ]
   [ -0.3   0.2 ]
  
  however, by using double in java, we get something like:
  
   [  0.7002 -0.3001  ]
   [ -0.3001  0.20007 ]
  
  using BigDecimal isntead, we might get a slightly more accurate
  result (though i admit, in most cases, people won't go to 16 digits)
 
 A valid point, though again, usage will dictate whether such levels of
 precision are necessary (also, most usage I've seen just lives with the fact
 that most base-10 numbers are not exactly represented in base-2; the inverse
 matrix above would probably be considered close enough by many if the
 difference were explained by representation inaccuracy).  Essentially all
 numerical computing to date has been done with, at best(!), double
 precision. 
 Some techniques that could in fact increase precision in principle are, to
 my
 knowledge, never used in practice (e.g., sorting a list of numbers before
 summing, so that they can be summed from smallest to largest -- and if
 there's
 a possibility of having both negative and positive signs, summing the
 like-signed elements and then finally the resulting two opposite-signed
 partial
 sums).  I guess performance comes into play, as well as a mathematician's
 view
 (even though many who are not mathematicians do numerical computing) that
 _that_ level of nitpickiness is just too much g.
 
 But if we were to have use cases in which exactness was paramount, very high
 precision (or perhaps using a RationalNumber class) would of course be the
 right thing to provide.
 
 
 Al

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections/map AbstractTestSortedMap.java AbstractTestMap.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 08:04:29

  Modified:collections/src/test/org/apache/commons/collections/map
AbstractTestSortedMap.java AbstractTestMap.java
  Log:
  Fix tests for sub map views so BidiMap tests still work
  
  Revision  ChangesPath
  1.7   +4 -15 
jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestSortedMap.java
  
  Index: AbstractTestSortedMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestSortedMap.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractTestSortedMap.java9 Apr 2004 09:38:31 -   1.6
  +++ AbstractTestSortedMap.java9 Apr 2004 15:04:29 -   1.7
  @@ -45,17 +45,6 @@
   
   //---
   /**
  - * Returns whether the sub map views are serializable.
  - * If the class being tested is based around a TreeMap then you should
  - * override and return false as TreeMap has a bug in deserialization.
  - * 
  - * @return false
  - */
  -public boolean isSubMapViewsSerializable() {
  -return true;
  -}
  -
  -/**
* Can't sort null keys.
* 
* @return false
  @@ -173,15 +162,15 @@
   return false;
   }
   public void testSerializeDeserializeThenCompare() throws Exception {
  -if (((AbstractTestSortedMap) main).isSubMapViewsSerializable() == 
false) return;
  +if (main.isSubMapViewsSerializable() == false) return;
   super.testSerializeDeserializeThenCompare();
   }
   public void testEmptyMapCompatibility() throws Exception {
  -if (((AbstractTestSortedMap) main).isSubMapViewsSerializable() == 
false) return;
  +if (main.isSubMapViewsSerializable() == false) return;
   super.testEmptyMapCompatibility();
   }
   public void testFullMapCompatibility() throws Exception {
  -if (((AbstractTestSortedMap) main).isSubMapViewsSerializable() == 
false) return;
  +if (main.isSubMapViewsSerializable() == false) return;
   super.testFullMapCompatibility();
   }
   }
  
  
  
  1.12  +12 -1 
jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestMap.java
  
  Index: AbstractTestMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestMap.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AbstractTestMap.java  9 Apr 2004 14:45:38 -   1.11
  +++ AbstractTestMap.java  9 Apr 2004 15:04:29 -   1.12
  @@ -228,6 +228,17 @@
   }
   
   /**
  + * Returns whether the sub map views of SortedMap are serializable.
  + * If the class being tested is based around a TreeMap then you should
  + * override and return false as TreeMap has a bug in deserialization.
  + * 
  + * @return false
  + */
  +public boolean isSubMapViewsSerializable() {
  +return true;
  +}
  +
  +/**
* Returns true if the maps produced by 
* [EMAIL PROTECTED] #makeEmptyMap()} and [EMAIL PROTECTED] #makeFullMap()}
* supports null keys.
  
  
  

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



cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections/bidimap TestUnmodifiableSortedBidiMap.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 08:15:18

  Modified:collections/src/test/org/apache/commons/collections/bidimap
TestUnmodifiableSortedBidiMap.java
  Log:
  Disable sub map serializable tests
  
  Revision  ChangesPath
  1.4   +9 -5  
jakarta-commons/collections/src/test/org/apache/commons/collections/bidimap/TestUnmodifiableSortedBidiMap.java
  
  Index: TestUnmodifiableSortedBidiMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/bidimap/TestUnmodifiableSortedBidiMap.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestUnmodifiableSortedBidiMap.java18 Feb 2004 01:20:39 -  1.3
  +++ TestUnmodifiableSortedBidiMap.java9 Apr 2004 15:15:18 -   1.4
  @@ -46,6 +46,7 @@
   super(testName);
   }
   
  +//---
   public BidiMap makeEmptyBidiMap() {
   return UnmodifiableSortedBidiMap.decorate(new DualTreeBidiMap());
   }
  @@ -66,13 +67,16 @@
   return new TreeMap();
   }
   
  -/**
  - * Override to prevent infinite recursion of tests.
  - */
  +public boolean isSubMapViewsSerializable() {
  +// TreeMap sub map views have a bug in deserialization.
  +return false;
  +}
   public String[] ignoredTests() {
  +// Override to prevent infinite recursion of tests.
   return new String[] 
{TestUnmodifiableSortedBidiMap.bulkTestInverseMap.bulkTestInverseMap};
   }
  -
  +
  +//---
   public boolean isAllowNullKey() {
   return false;
   }
  
  
  

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



cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections/collection AbstractTestCollection.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 08:16:24

  Modified:collections/src/test/org/apache/commons/collections/collection
AbstractTestCollection.java
  Log:
  Increase testing of serialization
  
  Revision  ChangesPath
  1.5   +32 -1 
jakarta-commons/collections/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java
  
  Index: AbstractTestCollection.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractTestCollection.java   18 Feb 2004 01:20:40 -  1.4
  +++ AbstractTestCollection.java   9 Apr 2004 15:16:24 -   1.5
  @@ -15,6 +15,11 @@
*/
   package org.apache.commons.collections.collection;
   
  +import java.io.ByteArrayInputStream;
  +import java.io.ByteArrayOutputStream;
  +import java.io.ObjectInputStream;
  +import java.io.ObjectOutputStream;
  +import java.io.Serializable;
   import java.lang.reflect.Array;
   import java.util.ArrayList;
   import java.util.Arrays;
  @@ -1285,4 +1290,30 @@
   }
   }
   
  +public void testSerializeDeserializeThenCompare() throws Exception {
  +Object obj = makeCollection();
  +if (obj instanceof Serializable) {
  +ByteArrayOutputStream buffer = new ByteArrayOutputStream();
  +ObjectOutputStream out = new ObjectOutputStream(buffer);
  +out.writeObject(obj);
  +out.close();
  +
  +ObjectInputStream in = new ObjectInputStream(new 
ByteArrayInputStream(buffer.toByteArray()));
  +Object dest = in.readObject();
  +in.close();
  +assertEquals(obj != deserialize(serialize(obj)) - EMPTY Collection, 
obj, dest);
  +}
  +obj = makeFullCollection();
  +if (obj instanceof Serializable) {
  +ByteArrayOutputStream buffer = new ByteArrayOutputStream();
  +ObjectOutputStream out = new ObjectOutputStream(buffer);
  +out.writeObject(obj);
  +out.close();
  +
  +ObjectInputStream in = new ObjectInputStream(new 
ByteArrayInputStream(buffer.toByteArray()));
  +Object dest = in.readObject();
  +in.close();
  +assertEquals(obj != deserialize(serialize(obj)) - FULL Collection, 
obj, dest);
  +}
  +}
   }
  
  
  

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



cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections AbstractTestObject.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 08:17:11

  Modified:collections/src/test/org/apache/commons/collections/map
AbstractTestSortedMap.java
   collections/src/test/org/apache/commons/collections
AbstractTestObject.java
  Log:
  Disable sub map serializable tests
  
  Revision  ChangesPath
  1.8   +5 -1  
jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestSortedMap.java
  
  Index: AbstractTestSortedMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestSortedMap.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractTestSortedMap.java9 Apr 2004 15:04:29 -   1.7
  +++ AbstractTestSortedMap.java9 Apr 2004 15:17:11 -   1.8
  @@ -161,6 +161,10 @@
   public boolean supportsFullCollections() {
   return false;
   }
  +public void testSimpleSerialization() throws Exception {
  +if (main.isSubMapViewsSerializable() == false) return;
  +super.testSimpleSerialization();
  +}
   public void testSerializeDeserializeThenCompare() throws Exception {
   if (main.isSubMapViewsSerializable() == false) return;
   super.testSerializeDeserializeThenCompare();
  
  
  
  1.5   +2 -2  
jakarta-commons/collections/src/test/org/apache/commons/collections/AbstractTestObject.java
  
  Index: AbstractTestObject.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/AbstractTestObject.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractTestObject.java   18 Feb 2004 01:20:35 -  1.4
  +++ AbstractTestObject.java   9 Apr 2004 15:17:11 -   1.5
  @@ -144,7 +144,7 @@
* @throws IOException
* @throws ClassNotFoundException
*/
  -public void testSimpleSerialization() throws IOException, 
ClassNotFoundException {
  +public void testSimpleSerialization() throws Exception {
   Object o = makeObject();
   if (o instanceof Serializable) {
   byte[] objekt = writeExternalFormToBytes((Serializable) o);
  
  
  

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



Re: [all] maven build - help required

2004-04-09 Thread Mark R. Diggory
This could be verflow from both the commons-build efforts and past 
changes to the /cli/project.xml file.

I notice that back  in March you made some changes to the build section, 
then it looks like I removed it when we started extending the 
commons-build/project.xml, which may have been unintended. I recommend 
we comment out the extend and add this back in as a test.

 build
  resources
   resource
 directorysrc/java/org/apache/commons/cli2/directory
 targetPathorg/apache/commons/cli2/targetPath
 includes
   include**/*.properties/include
 /includes
   /resource
   /resources
  
   !-- Unit test classes --
   unitTest
 includes
   include**/*Test.java/include
 /includes
   /unitTest
 /build

-Mark



David Graham wrote:

--- Rob Oxspring [EMAIL PROTECTED] wrote:
 

I've freshly set up my environment to do some work on commons-cli 
(RESEARCH_CLI_2_ROXSPRING branch if that matters) and am really 
struggling to get the build working.

Using a clean checkout of jakarta-commons, running maven (rc1) from the 
cli directory ends up failing to compile any of the java source 
(although maven claims a successful build):

java:compile:
[echo] Compiling to 
C:\Java\apache.org\jakarta-commons\cli/target/classes
[echo] No java source files to compile.
   

It sounds like your build element in project.xml isn't configured
correctly.  Take a look at the setup for working components to see what
you're missing.
David

 

I tried a few other components at random and founnd that while codec, 
collections and digester do the same; validator claims to be compiling 
20 file.

Could anyone enlighten me as to what's gone wrong? is it my set up? is 
it the new commons-build? is it just general maven black magic?

Thanks,

Rob

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



__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

-
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: [all] maven build - help required

2004-04-09 Thread Gary Gregory
I would also suggest:

includes
include**/*Test.java/include
+include**/*TestCase.java/include
/includes

I like to create subclasses of TestCase called *TestCase ;-)

Thank you,
Gary 

 -Original Message-
 From: Mark R. Diggory [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 09, 2004 09:21
 To: Jakarta Commons Developers List
 Subject: Re: [all] maven build - help required
 
 This could be verflow from both the commons-build efforts and past
 changes to the /cli/project.xml file.
 
 I notice that back  in March you made some changes to the build
section,
 then it looks like I removed it when we started extending the
 commons-build/project.xml, which may have been unintended. I recommend
 we comment out the extend and add this back in as a test.
 
   build
resources
 resource
   directorysrc/java/org/apache/commons/cli2/directory
   targetPathorg/apache/commons/cli2/targetPath
   includes
 include**/*.properties/include
   /includes
 /resource
 /resources
 
 !-- Unit test classes --
 unitTest
   includes
 include**/*Test.java/include
   /includes
 /unitTest
   /build
 
 -Mark
 
 
 
 David Graham wrote:
 
 --- Rob Oxspring [EMAIL PROTECTED] wrote:
 
 
 I've freshly set up my environment to do some work on commons-cli
 (RESEARCH_CLI_2_ROXSPRING branch if that matters) and am really
 struggling to get the build working.
 
 Using a clean checkout of jakarta-commons, running maven (rc1) from
the
 cli directory ends up failing to compile any of the java source
 (although maven claims a successful build):
 
 java:compile:
  [echo] Compiling to
 C:\Java\apache.org\jakarta-commons\cli/target/classes
  [echo] No java source files to compile.
 
 
 
 It sounds like your build element in project.xml isn't configured
 correctly.  Take a look at the setup for working components to see
what
 you're missing.
 
 David
 
 
 
 I tried a few other components at random and founnd that while
codec,
 collections and digester do the same; validator claims to be
compiling
 20 file.
 
 Could anyone enlighten me as to what's gone wrong? is it my set up?
is
 it the new commons-build? is it just general maven black magic?
 
 Thanks,
 
 Rob
 

-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Small Business $15K Web Design Giveaway
 http://promotions.yahoo.com/design_giveaway/
 
 -
 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]
 



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



RE: [all] maven build - help required

2004-04-09 Thread Gary Gregory
As far as I am concerned the builds for codec and lang are still broken.
Unit tests are not run, javadoc and clover not generated, etc, all due
to commons-build changes made to fix other components. 

To make things more complicated, Maven RC-2 behaves subtly differently.
I think a 1st step would be to agree for all to use the same Maven
version.

Thank you,
Gary 

 -Original Message-
 From: Rob Oxspring [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 09, 2004 06:30
 To: Jakarta Commons Developers List
 Subject: [all] maven build - help required
 
 I've freshly set up my environment to do some work on commons-cli
 (RESEARCH_CLI_2_ROXSPRING branch if that matters) and am really
 struggling to get the build working.
 
 Using a clean checkout of jakarta-commons, running maven (rc1) from
the
 cli directory ends up failing to compile any of the java source
 (although maven claims a successful build):
 
 java:compile:
  [echo] Compiling to
 C:\Java\apache.org\jakarta-commons\cli/target/classes
  [echo] No java source files to compile.
 
 I tried a few other components at random and founnd that while codec,
 collections and digester do the same; validator claims to be compiling
 20 file.
 
 Could anyone enlighten me as to what's gone wrong? is it my set up? is
 it the new commons-build? is it just general maven black magic?
 
 Thanks,
 
 Rob
 
 -
 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: [all] maven build - help required

2004-04-09 Thread David Graham

--- Gary Gregory [EMAIL PROTECTED] wrote:
 As far as I am concerned the builds for codec and lang are still broken.
 Unit tests are not run, javadoc and clover not generated, etc, all due
 to commons-build changes made to fix other components. 

It did fix the other components and is a good solution in the long run.

 
 To make things more complicated, Maven RC-2 behaves subtly differently.
 I think a 1st step would be to agree for all to use the same Maven
 version.

That would be nice but RC2 doesn't work for every component due to bugs. 
RC1 is the only version I've been able to build many components with.

David

 
 Thank you,
 Gary 
 
  -Original Message-
  From: Rob Oxspring [mailto:[EMAIL PROTECTED]
  Sent: Friday, April 09, 2004 06:30
  To: Jakarta Commons Developers List
  Subject: [all] maven build - help required
  
  I've freshly set up my environment to do some work on commons-cli
  (RESEARCH_CLI_2_ROXSPRING branch if that matters) and am really
  struggling to get the build working.
  
  Using a clean checkout of jakarta-commons, running maven (rc1) from
 the
  cli directory ends up failing to compile any of the java source
  (although maven claims a successful build):
  
  java:compile:
   [echo] Compiling to
  C:\Java\apache.org\jakarta-commons\cli/target/classes
   [echo] No java source files to compile.
  
  I tried a few other components at random and founnd that while codec,
  collections and digester do the same; validator claims to be compiling
  20 file.
  
  Could anyone enlighten me as to what's gone wrong? is it my set up? is
  it the new commons-build? is it just general maven black magic?
  
  Thanks,
  
  Rob
  
  -
  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!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



Re: [all] Stripping Excludes from project.xml (was Re: [all] Shared build causes issues in releases)

2004-04-09 Thread David Graham
Can you be more specific about what changes you're proposing?

David

--- Mark R. Diggory [EMAIL PROTECTED] wrote:
 This mostly a heads up. I've got a version of each projects project.xml 
 minus the includes and with all the information that was being shared 
 across the commons-build.project.xml. I just want to let everyone know 
 before I commit. Here is a list of projects that will be effected and 
 not effected
 
 All the previous information in each project.xml is intact, I'm only 
 adding info that was previously inherited.
 
 Projects this change will update (these were extending the 
 commons-build/project.xml):
 beanutils
 betwixt
 cli
 codec
 collections
 configuration
 daemon
 dbcp
 dbutils
 digester
 discovery
 el
 fileupload
 io
 jxpath
 lang
 latka
 launcher
 logging
 math
 modeler
 net
 pool
 primitives
 validator
 
 Projects this change will not update (these were not extending the 
 commons-build/project.xml):
 httpclient
 jelly
 jexl
 
 I trying to verify that the change will not break builds, but you 
 probibly know your project better than I do. It would be helpful to 
 verify that you can still build properly.
 
 -Mark
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



Re: [all] maven build - help required

2004-04-09 Thread Mark R. Diggory
Ok, I went back in the resource histories of both the glocbal 
project.xml and codecs and found where srouce and test information was 
removed, I added it back in and all is well again. I'll commit it now 
and do the same for lang. then I'll go through each project and test the 
build as well.

-Mark

Mark R. Diggory wrote:

I'm here Gary, I'm working though it now too.

Gary Gregory wrote:

As far as I am concerned the builds for codec and lang are still broken.
Unit tests are not run, javadoc and clover not generated, etc, all due
to commons-build changes made to fix other components.
To make things more complicated, Maven RC-2 behaves subtly differently.
I think a 1st step would be to agree for all to use the same Maven
version.
Thank you,
Gary
 

-Original Message-
From: Rob Oxspring [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 06:30
To: Jakarta Commons Developers List
Subject: [all] maven build - help required
I've freshly set up my environment to do some work on commons-cli
(RESEARCH_CLI_2_ROXSPRING branch if that matters) and am really
struggling to get the build working.
Using a clean checkout of jakarta-commons, running maven (rc1) from
  
the
 

cli directory ends up failing to compile any of the java source
(although maven claims a successful build):
java:compile:
[echo] Compiling to
C:\Java\apache.org\jakarta-commons\cli/target/classes
[echo] No java source files to compile.
I tried a few other components at random and founnd that while codec,
collections and digester do the same; validator claims to be compiling
20 file.
Could anyone enlighten me as to what's gone wrong? is it my set up? is
it the new commons-build? is it just general maven black magic?
Thanks,

Rob

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



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


cvs commit: jakarta-commons/codec project.xml

2004-04-09 Thread mdiggory
mdiggory2004/04/09 10:49:24

  Modified:codecproject.xml
  Log:
  Removed extend and adjusted build settings appropriately.
  
  Revision  ChangesPath
  1.32  +73 -13jakarta-commons/codec/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/codec/project.xml,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- project.xml   29 Mar 2004 17:14:10 -  1.31
  +++ project.xml   9 Apr 2004 17:49:24 -   1.32
  @@ -15,18 +15,13 @@
   limitations under the License.
   --
   project
  -  extend../commons-build/project.xml/extend
  -  nameCodec/name
  +
  +  pomVersion3/pomVersion
  + 
 idcommons-codec/id
 currentVersion1.3-dev/currentVersion
  -
  -  organization
  -nameApache Software Foundation/name
  -urlhttp://www.apache.org/url
  -logohttp://jakarta.apache.org/images/jakarta-logo.gif/logo
  -  /organization
  -
 inceptionYear2002/inceptionYear
  +  nameCodec/name
 shortDescriptionSimple encoders and decoders/shortDescription
 description
  The codec package contains simple encoder and decoders for
  @@ -34,6 +29,51 @@
  widely used encoders and decoders, the codec package also maintains a
  collection of phonetic encoding utilities.
 /description
  +  logo/images/logo.png/logo
  +  
  +  urlhttp://jakarta.apache.org/commons/${pom.artifactId.substring(8)}//url
  +  packageorg.apache.commons.${pom.artifactId.substring(8)}/package
  +
  +  organization
  +nameThe Apache Software Foundation/name
  +urlhttp://jakarta.apache.org/url
  +logohttp://jakarta.apache.org/images/original-jakarta-logo.gif/logo
  +  /organization
  +  
  +  licenses
  + license
  + nameThe Apache Software License, Version 2.0/name
  + url/LICENSE.txt/url
  + distributionrepo/distribution
  + /license
  +  /licenses
  +  
  +  gumpRepositoryIdjakarta/gumpRepositoryId
  +  issueTrackingUrlhttp://issues.apache.org/bugzilla//issueTrackingUrl
  +  siteAddressjakarta.apache.org/siteAddress
  +  
siteDirectory/www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}//siteDirectory
  +  
distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}//distributionDirectory
  +  
  +  repository
  +connectionscm:cvs:pserver:[EMAIL 
PROTECTED]:/home/cvspublic:jakarta-commons/${pom.artifactId.substring(8)}/connection
  +
urlhttp://cvs.apache.org/viewcvs/jakarta-commons/${pom.artifactId.substring(8)}//url
  +  /repository
  +  
  +  mailingLists
  +mailingList
  +  nameCommons Dev List/name
  +  subscribe[EMAIL PROTECTED]/subscribe
  +  unsubscribe[EMAIL PROTECTED]/unsubscribe
  +  archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
  +/mailingList
  +mailingList
  +  nameCommons User List/name
  +  subscribe[EMAIL PROTECTED]/subscribe
  +  unsubscribe[EMAIL PROTECTED]/unsubscribe
  +  archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
  +/mailingList
  +  /mailingLists
  +  
   versions
   version
   id1.1-rc1/id
  @@ -149,9 +189,18 @@
  /dependency
   /dependencies
   
issueTrackingUrlhttp://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=NEWamp;bug_status=ASSIGNEDamp;bug_status=REOPENEDamp;email1=amp;emailtype1=substringamp;emailassigned_to1=1amp;email2=amp;emailtype2=substringamp;emailreporter2=1amp;bugidtype=includeamp;bug_id=amp;changedin=amp;votes=amp;chfieldfrom=amp;chfieldto=Nowamp;chfieldvalue=amp;product=Commonsamp;component=Codecamp;short_desc=amp;short_desc_type=allwordssubstramp;long_desc=amp;long_desc_type=allwordssubstramp;bug_file_loc=amp;bug_file_loc_type=allwordssubstramp;keywords=amp;keywords_type=anywordsamp;field0-0-0=noopamp;type0-0-0=noopamp;value0-0-0=amp;cmdtype=doitamp;newqueryname=amp;order=Reuse+same+sort+as+last+time/issueTrackingUrl
  +   
   build
  -unitTest
  -includes
  + nagEmailAddress[EMAIL PROTECTED]/nagEmailAddress
  + sourceDirectorysrc/java/sourceDirectory
  + unitTestSourceDirectorysrc/test/unitTestSourceDirectory
  + integrationUnitTestSourceDirectory/
  + aspectSourceDirectory/
  +
  + !-- Unit test classes --
  + unitTest
  + includes
  + include**/Test*.java/include
   include**/*Test.java/include
   /includes
   excludes
  @@ -165,8 +214,19 @@
   /includes
   /resource
   /resources
  -/unitTest
  -/build
  + /unitTest
  +
  + !-- Integration unit test classes --
  + integrationUnitTestPatterns/integrationUnitTestPatterns
  +
  + resources
  + includes
  + include**/*.properties/include
  + /includes
  + 

cvs commit: jakarta-commons/lang project.xml

2004-04-09 Thread mdiggory
mdiggory2004/04/09 10:51:54

  Modified:lang project.xml
  Log:
  Removed extend and adjusted build settings appropriately.
  
  Revision  ChangesPath
  1.33  +83 -21jakarta-commons/lang/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/lang/project.xml,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- project.xml   29 Mar 2004 17:10:36 -  1.32
  +++ project.xml   9 Apr 2004 17:51:53 -   1.33
  @@ -15,28 +15,64 @@
   limitations under the License.
   --
   project
  -  extend../commons-build/project.xml/extend
  +  pomVersion3/pomVersion
  +  
 idcommons-lang/id
 nameLang/name
 currentVersion2.1-dev/currentVersion
  -
  -  organization
  -nameApache Software Foundation/name
  -urlhttp://www.apache.org/url
  -logohttp://jakarta.apache.org/images/jakarta-logo.gif/logo
  -  /organization
  -
 inceptionYear2001/inceptionYear
  -
  -  logo/images/logo.png/logo
  -
  +  shortDescriptionJava Common Components/shortDescription
 description
   Commons.Lang, a package of Java utility classes for the
   classes that are in java.lang's hierarchy, or are considered to be so
   standard as to justify existence in java.lang.
 /description
 
  -  shortDescriptionJava Common Components/shortDescription
  +  logo/images/logo.png/logo
  +  
  +  urlhttp://jakarta.apache.org/commons/${pom.artifactId.substring(8)}//url
  +  packageorg.apache.commons.${pom.artifactId.substring(8)}/package
  +
  +  organization
  +nameThe Apache Software Foundation/name
  +urlhttp://jakarta.apache.org/url
  +logohttp://jakarta.apache.org/images/original-jakarta-logo.gif/logo
  +  /organization
  +
  +  licenses
  + license
  + nameThe Apache Software License, Version 2.0/name
  + url/LICENSE.txt/url
  + distributionrepo/distribution
  + /license
  +  /licenses
  +  
  +  gumpRepositoryIdjakarta/gumpRepositoryId
  +  issueTrackingUrlhttp://issues.apache.org/bugzilla//issueTrackingUrl
  +  siteAddressjakarta.apache.org/siteAddress
  +  
siteDirectory/www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}//siteDirectory
  +  
distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}//distributionDirectory
  +  
  +  repository
  +connectionscm:cvs:pserver:[EMAIL 
PROTECTED]:/home/cvspublic:jakarta-commons/${pom.artifactId.substring(8)}/connection
  +
urlhttp://cvs.apache.org/viewcvs/jakarta-commons/${pom.artifactId.substring(8)}//url
  +  /repository
  +  
  +  mailingLists
  +mailingList
  +  nameCommons Dev List/name
  +  subscribe[EMAIL PROTECTED]/subscribe
  +  unsubscribe[EMAIL PROTECTED]/unsubscribe
  +  archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
  +/mailingList
  +mailingList
  +  nameCommons User List/name
  +  subscribe[EMAIL PROTECTED]/subscribe
  +  unsubscribe[EMAIL PROTECTED]/unsubscribe
  +  archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
  +/mailingList
  +  /mailingLists
  +
   
 developers
   developer
  @@ -310,15 +346,41 @@
 /dependencies
   
 build
  -unitTest
  -  includes
  -include**/*TestSuite.java/include
  -  /includes
  -  excludes
  -exclude**/AllLangTestSuite.java/exclude
  -  /excludes
  -/unitTest 
  -  /build
  + nagEmailAddress[EMAIL PROTECTED]/nagEmailAddress
  + sourceDirectorysrc/java/sourceDirectory
  + unitTestSourceDirectorysrc/test/unitTestSourceDirectory
  + integrationUnitTestSourceDirectory/
  + aspectSourceDirectory/
  +
  + !-- Unit test classes --
  + unitTest
  + includes
  + include**/*TestSuite.java/include
  + /includes
  + excludes
  + exclude**/AllLangTestSuite.java/exclude
  + /excludes
  +resources
  +resource
  +directory${pom.build.unitTestSourceDirectory}/directory
  +includes
  +include**/*.xml/include
  +/includes
  +/resource
  +/resources
  + /unitTest
  +
  + !-- Integration unit test classes --
  + integrationUnitTestPatterns/integrationUnitTestPatterns
  +
  + resources
  + includes
  + include**/*.properties/include
  + /includes
  + /resources
  + jars/
  + /build
  + 
 
 reports
!-- reportmaven-changelog-plugin/report --
  
  
  

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



Re: [all] Stripping Excludes from project.xml (was Re: [all] Shared build causes issues in releases)

2004-04-09 Thread Mark R. Diggory
Yes, the following info has been added to each file (this is just CLI as 
an example):

pomVersion3/pomVersion

 !-- unique project info for each project was retained here --
 idcommons-cli/id
 nameCLI/name
 currentVersion1.0/currentVersion
 inceptionYear2002/inceptionYear
 shortDescriptionCommons CLI/shortDescription
 descriptionCommons CLI provides a simple API for working with the 
command line arguments and options./description
 logo/images/logo.png/logo

 
urlhttp://jakarta.apache.org/commons/${pom.artifactId.substring(8)}//url
 packageorg.apache.commons.${pom.artifactId.substring(8)}/package

 organization
   nameThe Apache Software Foundation/name
   urlhttp://jakarta.apache.org/url
   logohttp://jakarta.apache.org/images/original-jakarta-logo.gif/logo
 /organization
 licenses
   license
   nameThe Apache Software License, Version 2.0/name
   url/LICENSE.txt/url
   distributionrepo/distribution
   /license
 /licenses
 !-- if a project already had a gumpRepository id, it was used over 
this one --
 gumpRepositoryIdjakarta/gumpRepositoryId
 issueTrackingUrlhttp://issues.apache.org/bugzilla//issueTrackingUrl
 siteAddressjakarta.apache.org/siteAddress
 
siteDirectory/www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}//siteDirectory
 
distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}//distributionDirectory

 repository
   
connectionscm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-commons/${pom.artifactId.substring(8)}/connection
   
urlhttp://cvs.apache.org/viewcvs/jakarta-commons/${pom.artifactId.substring(8)}//url
 /repository

 mailingLists
   mailingList
 nameCommons Dev List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
 
archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
   /mailingList
   mailingList
 nameCommons User List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
 
archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
   /mailingList
 /mailingLists



David Graham wrote:

Can you be more specific about what changes you're proposing?

David

--- Mark R. Diggory [EMAIL PROTECTED] wrote:
 

This mostly a heads up. I've got a version of each projects project.xml 
minus the includes and with all the information that was being shared 
across the commons-build.project.xml. I just want to let everyone know 
before I commit. Here is a list of projects that will be effected and 
not effected

All the previous information in each project.xml is intact, I'm only 
adding info that was previously inherited.

Projects this change will update (these were extending the 
commons-build/project.xml):
beanutils
betwixt
cli
codec
collections
configuration
daemon
dbcp
dbutils
digester
discovery
el
fileupload
io
jxpath
lang
latka
launcher
logging
math
modeler
net
pool
primitives
validator

Projects this change will not update (these were not extending the 
commons-build/project.xml):
httpclient
jelly
jexl

I trying to verify that the change will not break builds, but you 
probibly know your project better than I do. It would be helpful to 
verify that you can still build properly.

-Mark

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



__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

-
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: [all] Stripping Excludes from project.xml (was Re: [all] Shared build causes issues in releases)

2004-04-09 Thread David Graham
Why do you want to duplicate this common info in each project.xml instead
of using commons-build/project.xml?  Isn't that the purpose of extending
the parent file?

David


--- Mark R. Diggory [EMAIL PROTECTED] wrote:
 Yes, the following info has been added to each file (this is just CLI as
 
 an example):
 
 pomVersion3/pomVersion
 
   !-- unique project info for each project was retained here --
   idcommons-cli/id
   nameCLI/name
   currentVersion1.0/currentVersion
   inceptionYear2002/inceptionYear
   shortDescriptionCommons CLI/shortDescription
   descriptionCommons CLI provides a simple API for working with the 
 command line arguments and options./description
   logo/images/logo.png/logo
  
   

urlhttp://jakarta.apache.org/commons/${pom.artifactId.substring(8)}//url
   packageorg.apache.commons.${pom.artifactId.substring(8)}/package
 
   organization
 nameThe Apache Software Foundation/name
 urlhttp://jakarta.apache.org/url

 logohttp://jakarta.apache.org/images/original-jakarta-logo.gif/logo
   /organization
  
   licenses
 license
 nameThe Apache Software License, Version 2.0/name
 url/LICENSE.txt/url
 distributionrepo/distribution
 /license
   /licenses
  
   !-- if a project already had a gumpRepository id, it was used over 
 this one --
   gumpRepositoryIdjakarta/gumpRepositoryId
  
 issueTrackingUrlhttp://issues.apache.org/bugzilla//issueTrackingUrl
   siteAddressjakarta.apache.org/siteAddress
   

siteDirectory/www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}//siteDirectory
   

distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}//distributionDirectory
  
   repository
 

connectionscm:cvs:pserver:[EMAIL 
PROTECTED]:/home/cvspublic:jakarta-commons/${pom.artifactId.substring(8)}/connection
 

urlhttp://cvs.apache.org/viewcvs/jakarta-commons/${pom.artifactId.substring(8)}//url
   /repository
  
   mailingLists
 mailingList
   nameCommons Dev List/name
   subscribe[EMAIL PROTECTED]/subscribe
  
 unsubscribe[EMAIL PROTECTED]/unsubscribe
   

archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
 /mailingList
 mailingList
   nameCommons User List/name
   subscribe[EMAIL PROTECTED]/subscribe
  
 unsubscribe[EMAIL PROTECTED]/unsubscribe
   

archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
 /mailingList
   /mailingLists
 
 
 
 
 David Graham wrote:
 
 Can you be more specific about what changes you're proposing?
 
 David
 
 --- Mark R. Diggory [EMAIL PROTECTED] wrote:
   
 
 This mostly a heads up. I've got a version of each projects
 project.xml 
 minus the includes and with all the information that was being shared 
 across the commons-build.project.xml. I just want to let everyone know
 
 before I commit. Here is a list of projects that will be effected and 
 not effected
 
 All the previous information in each project.xml is intact, I'm only 
 adding info that was previously inherited.
 
 Projects this change will update (these were extending the 
 commons-build/project.xml):
 beanutils
 betwixt
 cli
 codec
 collections
 configuration
 daemon
 dbcp
 dbutils
 digester
 discovery
 el
 fileupload
 io
 jxpath
 lang
 latka
 launcher
 logging
 math
 modeler
 net
 pool
 primitives
 validator
 
 Projects this change will not update (these were not extending the 
 commons-build/project.xml):
 httpclient
 jelly
 jexl
 
 I trying to verify that the change will not break builds, but you 
 probibly know your project better than I do. It would be helpful to 
 verify that you can still build properly.
 
 -Mark
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Small Business $15K Web Design Giveaway 
 http://promotions.yahoo.com/design_giveaway/
 
 -
 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!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



Re: [all] Stripping Excludes from project.xml (was Re: [all] Shared build causes issues in releases)

2004-04-09 Thread Mark R. Diggory
Because the 'pros' of extending the commons project.xml do not outweigh 
the 'cons'.

Pros:
remove some duplication of project.xml content across subprojects
Cons:
some conent can be inherited, some cannot.
solution does not work across all subprojects which may have unique needs.
Theres too much of a release manager level maven customization required 
to get the packaging right in src and build distributions. Its better to 
just have each project maintain its project.xml content, then just use 
basic search and replace strategies to update the contents. I'm using 
them now and its alot easier than forcing each release manager into a 
specific deployment strategy.

the current issue with the build tag is a strong example of how 
extending shoots the projects in the foot. I'm not convinced that the 
Maven folks have fully worked out the extend mechanism anyways, there 
are limitations in inhertiance of POM configuration, of properties and 
of maven.xml goals that just make this inhertance flimsy.

My opinion is that we should keep the customization to a minimum and try 
to use the Maven defaults wherever possible. This way we can get this 
over sooner and get back to developing components.

-Mark

David Graham wrote:

Why do you want to duplicate this common info in each project.xml instead
of using commons-build/project.xml?  Isn't that the purpose of extending
the parent file?
David

--- Mark R. Diggory [EMAIL PROTECTED] wrote:
 

Yes, the following info has been added to each file (this is just CLI as

an example):

pomVersion3/pomVersion

 !-- unique project info for each project was retained here --
 idcommons-cli/id
 nameCLI/name
 currentVersion1.0/currentVersion
 inceptionYear2002/inceptionYear
 shortDescriptionCommons CLI/shortDescription
 descriptionCommons CLI provides a simple API for working with the 
command line arguments and options./description
 logo/images/logo.png/logo

 

   

urlhttp://jakarta.apache.org/commons/${pom.artifactId.substring(8)}//url
 

 packageorg.apache.commons.${pom.artifactId.substring(8)}/package

 organization
   nameThe Apache Software Foundation/name
   urlhttp://jakarta.apache.org/url
  
logohttp://jakarta.apache.org/images/original-jakarta-logo.gif/logo
 /organization

 licenses
   license
   nameThe Apache Software License, Version 2.0/name
   url/LICENSE.txt/url
   distributionrepo/distribution
   /license
 /licenses
 !-- if a project already had a gumpRepository id, it was used over 
this one --
 gumpRepositoryIdjakarta/gumpRepositoryId

issueTrackingUrlhttp://issues.apache.org/bugzilla//issueTrackingUrl
 siteAddressjakarta.apache.org/siteAddress
 

   

siteDirectory/www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}//siteDirectory
 

 

   

distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}//distributionDirectory
 

 repository
   

   

connectionscm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-commons/${pom.artifactId.substring(8)}/connection
 

   

   

urlhttp://cvs.apache.org/viewcvs/jakarta-commons/${pom.artifactId.substring(8)}//url
 

 /repository

 mailingLists
   mailingList
 nameCommons Dev List/name
 subscribe[EMAIL PROTECTED]/subscribe

unsubscribe[EMAIL PROTECTED]/unsubscribe
 

   

archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
 

   /mailingList
   mailingList
 nameCommons User List/name
 subscribe[EMAIL PROTECTED]/subscribe

unsubscribe[EMAIL PROTECTED]/unsubscribe
 

   

archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
 

   /mailingList
 /mailingLists


David Graham wrote:

   

Can you be more specific about what changes you're proposing?

David

--- Mark R. Diggory [EMAIL PROTECTED] wrote:

 

This mostly a heads up. I've got a version of each projects
   

project.xml 
   

minus the includes and with all the information that was being shared 
across the commons-build.project.xml. I just want to let everyone know
   

before I commit. Here is a list of projects that will be effected and 
not effected

All the previous information in each project.xml is intact, I'm only 
adding info that was previously inherited.

Projects this change will update (these were extending the 
commons-build/project.xml):
beanutils
betwixt
cli
codec
collections
configuration
daemon
dbcp
dbutils
digester
discovery
el
fileupload
io
jxpath
lang
latka
launcher
logging
math
modeler
net
pool
primitives
validator

Projects this change will not update (these were not extending the 
commons-build/project.xml):
httpclient
jelly
jexl

I trying to verify that the change will not break builds, but you 
probibly know your project better than I do. It would be helpful to 
verify that you can still build properly.

-Mark

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

   


Re: [all] Stripping Excludes from project.xml (was Re: [all] Shared build causes issues in releases)

2004-04-09 Thread David Graham
The problems were caused only when the parent file declared a build
element.  The items you're proposing to remove from the parent and
duplicate in each child project don't break builds and are truly common to
all commons projects.  For example, do we really need to declare Apache as
the organization  in each project?

The efforts to produce a common project.xml are wasted if we start
duplicating data again.

David


--- Mark R. Diggory [EMAIL PROTECTED] wrote:
 Because the 'pros' of extending the commons project.xml do not outweigh 
 the 'cons'.
 
 Pros:
 remove some duplication of project.xml content across subprojects
 
 Cons:
 some conent can be inherited, some cannot.
 solution does not work across all subprojects which may have unique
 needs.
 
 Theres too much of a release manager level maven customization required 
 to get the packaging right in src and build distributions. Its better to
 
 just have each project maintain its project.xml content, then just use 
 basic search and replace strategies to update the contents. I'm using 
 them now and its alot easier than forcing each release manager into a 
 specific deployment strategy.
 
 the current issue with the build tag is a strong example of how 
 extending shoots the projects in the foot. I'm not convinced that the 
 Maven folks have fully worked out the extend mechanism anyways, there 
 are limitations in inhertiance of POM configuration, of properties and 
 of maven.xml goals that just make this inhertance flimsy.
 
 My opinion is that we should keep the customization to a minimum and try
 
 to use the Maven defaults wherever possible. This way we can get this 
 over sooner and get back to developing components.
 
 -Mark
 
 
 David Graham wrote:
 
 Why do you want to duplicate this common info in each project.xml
 instead
 of using commons-build/project.xml?  Isn't that the purpose of
 extending
 the parent file?
 
 David
 
 
 --- Mark R. Diggory [EMAIL PROTECTED] wrote:
   
 
 Yes, the following info has been added to each file (this is just CLI
 as
 
 an example):
 
 pomVersion3/pomVersion
 
   !-- unique project info for each project was retained here --
   idcommons-cli/id
   nameCLI/name
   currentVersion1.0/currentVersion
   inceptionYear2002/inceptionYear
   shortDescriptionCommons CLI/shortDescription
   descriptionCommons CLI provides a simple API for working with the 
 command line arguments and options./description
   logo/images/logo.png/logo
  
   
 
 
 

urlhttp://jakarta.apache.org/commons/${pom.artifactId.substring(8)}//url
   
 
   packageorg.apache.commons.${pom.artifactId.substring(8)}/package
 
   organization
 nameThe Apache Software Foundation/name
 urlhttp://jakarta.apache.org/url


logohttp://jakarta.apache.org/images/original-jakarta-logo.gif/logo
   /organization
  
   licenses
 license
 nameThe Apache Software License, Version 2.0/name
 url/LICENSE.txt/url
 distributionrepo/distribution
 /license
   /licenses
  
   !-- if a project already had a gumpRepository id, it was used over 
 this one --
   gumpRepositoryIdjakarta/gumpRepositoryId
  

issueTrackingUrlhttp://issues.apache.org/bugzilla//issueTrackingUrl
   siteAddressjakarta.apache.org/siteAddress
   
 
 
 

siteDirectory/www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}//siteDirectory
   
 
   
 
 
 

distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}//distributionDirectory
   
 
  
   repository
 
 
 
 

connectionscm:cvs:pserver:[EMAIL 
PROTECTED]:/home/cvspublic:jakarta-commons/${pom.artifactId.substring(8)}/connection
   
 
 
 
 
 

urlhttp://cvs.apache.org/viewcvs/jakarta-commons/${pom.artifactId.substring(8)}//url
   
 
   /repository
  
   mailingLists
 mailingList
   nameCommons Dev List/name
   subscribe[EMAIL PROTECTED]/subscribe
  
 unsubscribe[EMAIL PROTECTED]/unsubscribe
   
 
 
 

archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
   
 
 /mailingList
 mailingList
   nameCommons User List/name
   subscribe[EMAIL PROTECTED]/subscribe
  
 unsubscribe[EMAIL PROTECTED]/unsubscribe
   
 
 
 

archivehttp://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]/archive
   
 
 /mailingList
   /mailingLists
 
 
 
 
 David Graham wrote:
 
 
 
 Can you be more specific about what changes you're proposing?
 
 David
 
 --- Mark R. Diggory [EMAIL PROTECTED] wrote:
  
 
   
 
 This mostly a heads up. I've got a version of each projects
 
 
 project.xml 
 
 
 minus the includes and with all the information that was being
 shared 
 across the commons-build.project.xml. I just want to let everyone
 know
 
 
 before I commit. Here is a list of projects that will be effected
 and 
 not effected
 
 All the previous information in each project.xml is intact, I'm only
 
 adding info that was previously inherited.
 
 Projects this change will update 

Re: [all] Stripping Excludes from project.xml (was Re: [all] Shared build causes issues in releases)

2004-04-09 Thread Mark R. Diggory
David Graham wrote:

The problems were caused only when the parent file declared a build
element.  The items you're proposing to remove from the parent and
duplicate in each child project don't break builds and are truly common to
all commons projects.  For example, do we really need to declare Apache as
the organization  in each project?


More arise as time passes, now we have botht he build tag issue and the extend resolution issu in packaging.

In my opinion is a very small duplication, its an over-optimization to 
make this extension which adds termendous complexity downstream in the 
development process in both packaging (release managers need to worry 
about where the extends is pointing and the packaging goals maven 
provides have to be customized to facilitate this requirement) and in 
user compilation (users of the src and build packages need this issue 
resolved if they wish to use maven as the build environment).

The efforts to produce a common project.xml are wasted if we start
duplicating data again.
The commons-build.project.xml (IMHO) is there to provide the site 
information for the toplevel site.

The commons site characteristics across the subprojects are not provided 
by project.xml as much as they are provided by the the navigation entity 
include and the shared commons-site.jsl. I think we should be more 
interested in standardizing the coding, testing and packaging practices 
across the projects as being of greater priority than the duplication of 
what is considerably a small amount of metadata about the overal project.

-Mark


David

--- Mark R. Diggory [EMAIL PROTECTED] wrote:
 

Because the 'pros' of extending the commons project.xml do not outweigh 
the 'cons'.

Pros:
remove some duplication of project.xml content across subprojects
Cons:
some conent can be inherited, some cannot.
solution does not work across all subprojects which may have unique
needs.
Theres too much of a release manager level maven customization required 
to get the packaging right in src and build distributions. Its better to

just have each project maintain its project.xml content, then just use 
basic search and replace strategies to update the contents. I'm using 
them now and its alot easier than forcing each release manager into a 
specific deployment strategy.

the current issue with the build tag is a strong example of how 
extending shoots the projects in the foot. I'm not convinced that the 
Maven folks have fully worked out the extend mechanism anyways, there 
are limitations in inhertiance of POM configuration, of properties and 
of maven.xml goals that just make this inhertance flimsy.

My opinion is that we should keep the customization to a minimum and try

to use the Maven defaults wherever possible. This way we can get this 
over sooner and get back to developing components.

-Mark

David Graham wrote:

   

Why do you want to duplicate this common info in each project.xml
 

instead
   

of using commons-build/project.xml?  Isn't that the purpose of
 

extending
   

the parent file?

David

--- Mark R. Diggory [EMAIL PROTECTED] wrote:

 

Yes, the following info has been added to each file (this is just CLI
   

as
   

an example):

pomVersion3/pomVersion

!-- unique project info for each project was retained here --
idcommons-cli/id
nameCLI/name
currentVersion1.0/currentVersion
inceptionYear2002/inceptionYear
shortDescriptionCommons CLI/shortDescription
descriptionCommons CLI provides a simple API for working with the 
command line arguments and options./description
logo/images/logo.png/logo



  

   

urlhttp://jakarta.apache.org/commons/${pom.artifactId.substring(8)}//url
   



 

packageorg.apache.commons.${pom.artifactId.substring(8)}/package

organization
  nameThe Apache Software Foundation/name
  urlhttp://jakarta.apache.org/url
 
   

logohttp://jakarta.apache.org/images/original-jakarta-logo.gif/logo
 

/organization

licenses
  license
  nameThe Apache Software License, Version 2.0/name
  url/LICENSE.txt/url
  distributionrepo/distribution
  /license
/licenses
!-- if a project already had a gumpRepository id, it was used over 
this one --
gumpRepositoryIdjakarta/gumpRepositoryId

   

issueTrackingUrlhttp://issues.apache.org/bugzilla//issueTrackingUrl
 

siteAddressjakarta.apache.org/siteAddress

  

   

siteDirectory/www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}//siteDirectory
   



 



  

   

distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}//distributionDirectory
   



 

repository
  

  

   

connectionscm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-commons/${pom.artifactId.substring(8)}/connection
   



 

  

  

   

urlhttp://cvs.apache.org/viewcvs/jakarta-commons/${pom.artifactId.substring(8)}//url
   



 

/repository

mailingLists
  mailingList
nameCommons Dev List/name
subscribe[EMAIL 

Re: [all] Stripping Excludes from project.xml (was Re: [all] Shared build causes issues in releases)

2004-04-09 Thread Stephen Colebourne
If you read back to the start of the thread, you'll find that there are
issues at release time when we need each commons component to be completely
independent. Mark's strategy here is, IMHO, right. We have tried to get a
shared version working, and it sort of does. However it has too many issues.

Personally, I would have kept the extends, but had it as
extendsproject-commons.xml/extends. That way it would be simple to
update a shared base to each project simply by copying a whole file. But
thats by the by - the main task is to ensure we can all develop and release
as thats what we need to focus on ;-)

BTW, thanks to Mark for following this through.

Stephen

From: David Graham [EMAIL PROTECTED]
 The problems were caused only when the parent file declared a build
 element.  The items you're proposing to remove from the parent and
 duplicate in each child project don't break builds and are truly common to
 all commons projects.  For example, do we really need to declare Apache as
 the organization  in each project?

 The efforts to produce a common project.xml are wasted if we start
 duplicating data again.

 David


 --- Mark R. Diggory [EMAIL PROTECTED] wrote:
  Because the 'pros' of extending the commons project.xml do not outweigh
  the 'cons'.
 
  Pros:
  remove some duplication of project.xml content across subprojects
 
  Cons:
  some conent can be inherited, some cannot.
  solution does not work across all subprojects which may have unique
  needs.
 
  Theres too much of a release manager level maven customization required
  to get the packaging right in src and build distributions. Its better to
 
  just have each project maintain its project.xml content, then just use
  basic search and replace strategies to update the contents. I'm using
  them now and its alot easier than forcing each release manager into a
  specific deployment strategy.
 
  the current issue with the build tag is a strong example of how
  extending shoots the projects in the foot. I'm not convinced that the
  Maven folks have fully worked out the extend mechanism anyways, there
  are limitations in inhertiance of POM configuration, of properties and
  of maven.xml goals that just make this inhertance flimsy.
 
  My opinion is that we should keep the customization to a minimum and try
 
  to use the Maven defaults wherever possible. This way we can get this
  over sooner and get back to developing components.
 
  -Mark
 
 
  David Graham wrote:
 
  Why do you want to duplicate this common info in each project.xml
  instead
  of using commons-build/project.xml?  Isn't that the purpose of
  extending
  the parent file?
  
  David
  
  
  --- Mark R. Diggory [EMAIL PROTECTED] wrote:
  
  
  Yes, the following info has been added to each file (this is just CLI
  as
  
  an example):
  
  pomVersion3/pomVersion
  
!-- unique project info for each project was retained here --
idcommons-cli/id
nameCLI/name
currentVersion1.0/currentVersion
inceptionYear2002/inceptionYear
shortDescriptionCommons CLI/shortDescription
descriptionCommons CLI provides a simple API for working with the
  command line arguments and options./description
logo/images/logo.png/logo
  
  
  
  
  
 

urlhttp://jakarta.apache.org/commons/${pom.artifactId.substring(8)}//url

  
  
packageorg.apache.commons.${pom.artifactId.substring(8)}/package
  
organization
  nameThe Apache Software Foundation/name
  urlhttp://jakarta.apache.org/url
  
 
 logohttp://jakarta.apache.org/images/original-jakarta-logo.gif/logo
/organization
  
licenses
  license
  nameThe Apache Software License, Version 2.0/name
  url/LICENSE.txt/url
  distributionrepo/distribution
  /license
/licenses
  
!-- if a project already had a gumpRepository id, it was used over
  this one --
gumpRepositoryIdjakarta/gumpRepositoryId
  
 
 issueTrackingUrlhttp://issues.apache.org/bugzilla//issueTrackingUrl
siteAddressjakarta.apache.org/siteAddress
  
  
  
  
 

siteDirectory/www/jakarta.apache.org/commons/${pom.artifactId.substring(8
)}//siteDirectory
  
  
  
  
  
  
 

distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/${pom
.artifactId.substring(8)}//distributionDirectory
  
  
  
repository
  
  
  
  
 

connectionscm:cvs:pserver:[EMAIL PROTECTED]:/home/cvspublic:jakarta-
commons/${pom.artifactId.substring(8)}/connection
  
  
  
  
  
  
 

urlhttp://cvs.apache.org/viewcvs/jakarta-commons/${pom.artifactId.substri
ng(8)}//url
  
  
/repository
  
mailingLists
  mailingList
nameCommons Dev List/name
subscribe[EMAIL PROTECTED]/subscribe
  
  unsubscribe[EMAIL PROTECTED]/unsubscribe
  
  
  
  
 

archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listName=commons-
[EMAIL PROTECTED]/archive
  
  
  /mailingList
  mailingList
nameCommons User List/name
subscribe[EMAIL PROTECTED]/subscribe
  
  unsubscribe[EMAIL 

[beanutils][cli][dbcp][el][modeler] Build issues with Maven.

2004-04-09 Thread Mark R. Diggory
I successfully built almost all the commons projects for which I 
modified the project.xml files accept for the following errors in your 
projects. These however, do not look like issues arising fromt he 
configuration of the project.xml and its build as much as errors in the 
Tests or dependencies themselves.

beanutils: Junit test failure

   [junit] Running org.apache.commons.beanutils.BeanificationTestCase
   [junit] Tests run: 8, Failures: 0, Errors: 1, Time elapsed: 0.989 sec
   [junit] [ERROR] TEST 
org.apache.commons.beanutils.BeanificationTestCase FAILED

cli: Junit test failure

   [junit] Running org.apache.commons.cli.TestHelpFormatter
   [junit] Tests run: 4, Failures: 1, Errors: 0, Time elapsed: 0.039 sec
   [junit] [ERROR] TEST org.apache.commons.cli.TestHelpFormatter FAILED
dbcp: resolution jdbc dependency (I removed the dependency temporoarily 
and everything build fine)

   jdbc dependency isn't gotten, how is this gotten?

el: resolution of its dependencies is breaking

   servlet api 2.0, how is this gotten?
   jspapi api, how is this gotten?
modeler

   horrible heap dump alert of Fedora/Jpackage Sun JVM...attached file  

-thanks
Mark

Unexpected Signal : 11 occurred at PC=0x4029D100
Function=(null)+0x4029D100
Library=/usr/lib/jvm/java-1.4.2-sun-1.4.2.01/jre/lib/i386/client/libjvm.so

NOTE: We are unable to locate the function name symbol for the error
  just occurred. Please refer to release documentation for possible
  reason and solutions.


Current Java thread:
at 
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(MbeansDescriptorsDOMSource.java:89)
at 
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescriptors(MbeansDescriptorsDOMSource.java:77)
at org.apache.commons.modeler.Registry.load(Registry.java:776)
at org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:888)
at org.apache.commons.modeler.Registry.loadMetadata(Registry.java:266)
at org.apache.commons.modeler.Registry.loadRegistry(Registry.java:524)
at org.apache.commons.modeler.RegistryTestCase.setUp(RegistryTestCase.java:84)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:325)
at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask.java:848)
at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:556)
at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:532)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
at com.werken.werkz.Goal.attain(Goal.java:573)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:448)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
at org.apache.maven.cli.App.doMain(App.java:543)
at org.apache.maven.cli.App.main(App.java:1109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)

Dynamic libraries:
00101000-00116000 r-xp  03:03 753723 /lib/ld-2.3.2.so
00116000-00117000 rw-p 00015000 03:03 753723 /lib/ld-2.3.2.so
00119000-0024c000 r-xp 

cvs commit: jakarta-commons/commons-build/maven prep.xsl commonGoals.ent

2004-04-09 Thread mdiggory
mdiggory2004/04/09 12:40:30

  Removed: commons-build/maven prep.xsl commonGoals.ent
  Log:
  This was interesting, but things can be simpler, I'm removing this.

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



DO NOT REPLY [Bug 28002] - [Codec][Patch] RFC 1522 codecs: Q-codec B-codec

2004-04-09 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=28002.
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=28002

[Codec][Patch] RFC 1522 codecs: Q-codec  B-codec





--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 21:42 ---
Applied patch 04/03/04 14:39 Patch (100% clover coverage).
Thank you.

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



cvs commit: jakarta-commons/codec/src/java/org/apache/commons/codec/net BCodec.java

2004-04-09 Thread ggregory
ggregory2004/04/09 14:45:47

  Modified:codec/src/java/org/apache/commons/codec/net BCodec.java
  Log:
  Javadoc
  
  Revision  ChangesPath
  1.2   +9 -12 
jakarta-commons/codec/src/java/org/apache/commons/codec/net/BCodec.java
  
  Index: BCodec.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/net/BCodec.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BCodec.java   29 Mar 2004 07:59:57 -  1.1
  +++ BCodec.java   9 Apr 2004 21:45:47 -   1.2
  @@ -1,18 +1,15 @@
   /*
* Copyright 2001-2004 The Apache Software Foundation.
* 
  - * Licensed under the Apache License, Version 2.0 (the License);
  - * you may not use this file except in compliance with the License.
  - * You may obtain a copy of the License at
  + * Licensed under the Apache License, Version 2.0 (the License); you may not use 
this file except in compliance with
  + * the License. You may obtain a copy of the License at
* 
  - *  http://www.apache.org/licenses/LICENSE-2.0
  + * http://www.apache.org/licenses/LICENSE-2.0
* 
  - * Unless required by applicable law or agreed to in writing, software
  - * distributed under the License is distributed on an AS IS BASIS,
  - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - * See the License for the specific language governing permissions and
  - * limitations under the License.
  - */ 
  + * Unless required by applicable law or agreed to in writing, software distributed 
under the License is distributed on
  + * an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied. See the License for the
  + * specific language governing permissions and limitations under the License.
  + */
   
   package org.apache.commons.codec.net;
   
  @@ -62,7 +59,7 @@
*  the default string charset to use.
* 
* @see a 
href=http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc;JRE
 character
  - *  encoding names/a
  + *  encoding names /a
*/
   public BCodec(final String charset) {
   super();
  
  
  

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



cvs commit: jakarta-commons/codec/src/java/org/apache/commons/codec/net QCodec.java

2004-04-09 Thread ggregory
ggregory2004/04/09 14:46:27

  Modified:codec/src/java/org/apache/commons/codec/net QCodec.java
  Log:
  Javadoc
  
  Revision  ChangesPath
  1.2   +10 -12
jakarta-commons/codec/src/java/org/apache/commons/codec/net/QCodec.java
  
  Index: QCodec.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/net/QCodec.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- QCodec.java   29 Mar 2004 07:59:57 -  1.1
  +++ QCodec.java   9 Apr 2004 21:46:27 -   1.2
  @@ -1,23 +1,21 @@
   /*
* Copyright 2001-2004 The Apache Software Foundation.
* 
  - * Licensed under the Apache License, Version 2.0 (the License);
  - * you may not use this file except in compliance with the License.
  - * You may obtain a copy of the License at
  + * Licensed under the Apache License, Version 2.0 (the License); you may not use 
this file except in compliance with
  + * the License. You may obtain a copy of the License at
* 
  - *  http://www.apache.org/licenses/LICENSE-2.0
  + * http://www.apache.org/licenses/LICENSE-2.0
* 
  - * Unless required by applicable law or agreed to in writing, software
  - * distributed under the License is distributed on an AS IS BASIS,
  - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - * See the License for the specific language governing permissions and
  - * limitations under the License.
  - */ 
  + * Unless required by applicable law or agreed to in writing, software distributed 
under the License is distributed on
  + * an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied. See the License for the
  + * specific language governing permissions and limitations under the License.
  + */
   
   package org.apache.commons.codec.net;
   
   import java.io.UnsupportedEncodingException;
   import java.util.BitSet;
  +
   import org.apache.commons.codec.DecoderException;
   import org.apache.commons.codec.EncoderException;
   import org.apache.commons.codec.StringDecoder;
  @@ -117,7 +115,7 @@
*  the default string charset to use.
* 
* @see a 
href=http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc;JRE
 character
  - *  encoding names/a
  + *  encoding names /a
*/
   public QCodec(final String charset) {
   super();
  
  
  

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



[site] Gump Builds

2004-04-09 Thread Mark R. Diggory
Lets push this to another thread because its such a great topic in and 
of itself.

So I think we have several needs here:

1.) nightly builds of jars that can be available to developers

2.) Integration testing across all the commons

3.) Automated Site updating/generation.

Adam R. B. Jack wrote:

Mark,

Have you thought about enlisting the help of Gump for the manual effort
here?  We are trying to allow Gump to be able to use Maven (instead of Ant)
for projects that prefer builds this way. We are making progress (with the
mechanics) but [don't know if you've read the list/archive] the main
sticking point seems to be group/artefact ids (something you know plenty
about.)
 

Can you outline what you finally resolved to concerning what the 
artifact/group ids should be for gump builds which use maven?

If you are interested, Gump ought be able to make this task a bit easier on
you, and automatically (nightly or more) do fresh runs (in clean
environments) for you.
Just a thought.

regards

Adam
 

I'm just mostly unsure where to begin with getting with the Gump. I 
suspect we would register each project with gump and let them get built 
separately?

-Mark

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


cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map AbstractHashedMap.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 15:14:09

  Modified:collections/src/java/org/apache/commons/collections/map
AbstractHashedMap.java
  Log:
  Javadoc
  
  Revision  ChangesPath
  1.15  +4 -1  
jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractHashedMap.java
  
  Index: AbstractHashedMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractHashedMap.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- AbstractHashedMap.java1 Apr 2004 22:18:12 -   1.14
  +++ AbstractHashedMap.java9 Apr 2004 22:14:09 -   1.15
  @@ -279,6 +279,9 @@
   
   /**
* Puts all the values from the specified map into this map.
  + * p
  + * This implementation iterates around the specified map and
  + * uses [EMAIL PROTECTED] #put(Object, Object)}.
* 
* @param map  the map to add
* @throws NullPointerException if the map is null
  
  
  

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



cvs commit: jakarta-commons/codec/src/java/org/apache/commons/codec/net StringEncodings.java QCodec.java BCodec.java QuotedPrintableCodec.java

2004-04-09 Thread ggregory
ggregory2004/04/09 15:21:07

  Modified:codec/src/java/org/apache/commons/codec/net
StringEncodings.java QCodec.java BCodec.java
QuotedPrintableCodec.java
  Log:
  Fix headers.
  
  Revision  ChangesPath
  1.2   +12 -9 
jakarta-commons/codec/src/java/org/apache/commons/codec/net/StringEncodings.java
  
  Index: StringEncodings.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/net/StringEncodings.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringEncodings.java  29 Mar 2004 07:59:00 -  1.1
  +++ StringEncodings.java  9 Apr 2004 22:21:07 -   1.2
  @@ -1,15 +1,18 @@
   /*
  - * Copyright 2004 The Apache Software Foundation.
  + * Copyright 2001-2004 The Apache Software Foundation.
* 
  - * Licensed under the Apache License, Version 2.0 (the License); you may not use 
this file except in compliance with
  - * the License. You may obtain a copy of the License at
  + * Licensed under the Apache License, Version 2.0 (the License);
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
* 
  - * http://www.apache.org/licenses/LICENSE-2.0
  + *  http://www.apache.org/licenses/LICENSE-2.0
* 
  - * Unless required by applicable law or agreed to in writing, software distributed 
under the License is distributed on
  - * an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied. See the License for the
  - * specific language governing permissions and limitations under the License.
  - */
  + * Unless required by applicable law or agreed to in writing, software
  + * distributed under the License is distributed on an AS IS BASIS,
  + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + * See the License for the specific language governing permissions and
  + * limitations under the License.
  + */ 
   
   package org.apache.commons.codec.net;
   
  
  
  
  1.3   +11 -8 
jakarta-commons/codec/src/java/org/apache/commons/codec/net/QCodec.java
  
  Index: QCodec.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/net/QCodec.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- QCodec.java   9 Apr 2004 21:46:27 -   1.2
  +++ QCodec.java   9 Apr 2004 22:21:07 -   1.3
  @@ -1,15 +1,18 @@
   /*
* Copyright 2001-2004 The Apache Software Foundation.
* 
  - * Licensed under the Apache License, Version 2.0 (the License); you may not use 
this file except in compliance with
  - * the License. You may obtain a copy of the License at
  + * Licensed under the Apache License, Version 2.0 (the License);
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
* 
  - * http://www.apache.org/licenses/LICENSE-2.0
  + *  http://www.apache.org/licenses/LICENSE-2.0
* 
  - * Unless required by applicable law or agreed to in writing, software distributed 
under the License is distributed on
  - * an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
or implied. See the License for the
  - * specific language governing permissions and limitations under the License.
  - */
  + * Unless required by applicable law or agreed to in writing, software
  + * distributed under the License is distributed on an AS IS BASIS,
  + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + * See the License for the specific language governing permissions and
  + * limitations under the License.
  + */ 
   
   package org.apache.commons.codec.net;
   
  
  
  
  1.3   +11 -8 
jakarta-commons/codec/src/java/org/apache/commons/codec/net/BCodec.java
  
  Index: BCodec.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/net/BCodec.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BCodec.java   9 Apr 2004 21:45:47 -   1.2
  +++ BCodec.java   9 Apr 2004 22:21:07 -   1.3
  @@ -1,15 +1,18 @@
   /*
* Copyright 2001-2004 The Apache Software Foundation.
* 
  - * Licensed under the Apache License, Version 2.0 (the License); you may not use 
this file except in compliance with
  - * the License. You may obtain a copy of the License at
  + * Licensed under the Apache License, Version 2.0 (the License);
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
* 
  - * http://www.apache.org/licenses/LICENSE-2.0
  + *  http://www.apache.org/licenses/LICENSE-2.0
* 
  - * Unless 

cvs commit: jakarta-commons/codec/src/java/org/apache/commons/codec/net RFC1522Codec.java

2004-04-09 Thread ggregory
ggregory2004/04/09 15:21:43

  Modified:codec/src/java/org/apache/commons/codec/net
RFC1522Codec.java
  Log:
  Make this class package private for now.
  
  Revision  ChangesPath
  1.2   +7 -7  
jakarta-commons/codec/src/java/org/apache/commons/codec/net/RFC1522Codec.java
  
  Index: RFC1522Codec.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/net/RFC1522Codec.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RFC1522Codec.java 29 Mar 2004 07:59:57 -  1.1
  +++ RFC1522Codec.java 9 Apr 2004 22:21:43 -   1.2
  @@ -99,19 +99,22 @@
   return null;
   }
   if ((!text.startsWith(=?)) || (!text.endsWith(?=))) {
  -throw new DecoderException(RFC 1521 violation: malformed encoded 
content);
  +throw new DecoderException(RFC 1522 violation: malformed encoded 
content);
   }
   int termnator = text.length() - 2;
   int from = 2;
   int to = text.indexOf(?, from);
   if ((to == -1) || (to == termnator)) {
  -throw new DecoderException(RFC 1521 violation: charset token not 
found);
  +throw new DecoderException(RFC 1522 violation: charset token not 
found);
   }
   String charset = text.substring(from, to);
  +if (charset.equals()) {
  +throw new DecoderException(RFC 1522 violation: charset not specified);
  +}
   from = to + 1;
   to = text.indexOf(?, from);
   if ((to == -1) || (to == termnator)) {
  -throw new DecoderException(RFC 1521 violation: encoding token not 
found);
  +throw new DecoderException(RFC 1522 violation: encoding token not 
found);
   }
   String encoding = text.substring(from, to);
   if (!getEncoding().equalsIgnoreCase(encoding)) {
  @@ -120,9 +123,6 @@
   }
   from = to + 1;
   to = text.indexOf(?, from);
  -if ((to == -1) || (to != termnator)) {
  -throw new DecoderException(RFC 1521 violation: encoded content not 
found);
  -}
   byte[] data = text.substring(from, to).getBytes(StringEncodings.US_ASCII);
   data = doDecoding(data); 
   return new String(data, charset);
  
  
  

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



cvs commit: jakarta-commons/codec/src/java/org/apache/commons/codec overview.html

2004-04-09 Thread ggregory
ggregory2004/04/09 15:24:08

  Modified:codec/src/java/org/apache/commons/codec overview.html
  Log:
  version 1.3-dev
  
  Revision  ChangesPath
  1.5   +2 -2  
jakarta-commons/codec/src/java/org/apache/commons/codec/overview.html
  
  Index: overview.html
  ===
  RCS file: 
/home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/overview.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- overview.html 23 Feb 2004 07:32:49 -  1.4
  +++ overview.html 9 Apr 2004 22:24:08 -   1.5
  @@ -17,7 +17,7 @@
   html
   body
   p
  -This document is the API specification for the Apache Jakarta Commons Codec 
Library, version 1.2.
  +This document is the API specification for the Apache Jakarta Commons Codec 
Library, version 1.3-dev.
   /p
   p
   This library requires a JRE version of 1.2.2 or greater.
  
  
  

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



RE: [all] maven build - help required

2004-04-09 Thread Gary Gregory
All is well with local Maven (RC-2) [codec] builds again.

Thank you Mark!
Gary 

 -Original Message-
 From: Mark R. Diggory [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 09, 2004 10:39
 To: Jakarta Commons Developers List
 Subject: Re: [all] maven build - help required
 
 I'm here Gary, I'm working though it now too.
 
 Gary Gregory wrote:
 
 As far as I am concerned the builds for codec and lang are still
broken.
 Unit tests are not run, javadoc and clover not generated, etc, all
due
 to commons-build changes made to fix other components.
 
 To make things more complicated, Maven RC-2 behaves subtly
differently.
 I think a 1st step would be to agree for all to use the same Maven
 version.
 
 Thank you,
 Gary
 
 
 
 -Original Message-
 From: Rob Oxspring [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 09, 2004 06:30
 To: Jakarta Commons Developers List
 Subject: [all] maven build - help required
 
 I've freshly set up my environment to do some work on commons-cli
 (RESEARCH_CLI_2_ROXSPRING branch if that matters) and am really
 struggling to get the build working.
 
 Using a clean checkout of jakarta-commons, running maven (rc1) from
 
 
 the
 
 
 cli directory ends up failing to compile any of the java source
 (although maven claims a successful build):
 
 java:compile:
  [echo] Compiling to
 C:\Java\apache.org\jakarta-commons\cli/target/classes
  [echo] No java source files to compile.
 
 I tried a few other components at random and founnd that while
codec,
 collections and digester do the same; validator claims to be
compiling
 20 file.
 
 Could anyone enlighten me as to what's gone wrong? is it my set up?
is
 it the new commons-build? is it just general maven black magic?
 
 Thanks,
 
 Rob
 

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



cvs commit: jakarta-commons/codec/src/test/org/apache/commons/codec/language SoundexTest.java

2004-04-09 Thread ggregory
ggregory2004/04/09 15:46:08

  Modified:codec/src/test/org/apache/commons/codec/language
SoundexTest.java
  Log:
  Broken link has no new equivalent on new site.
  
  Revision  ChangesPath
  1.15  +1 -3  
jakarta-commons/codec/src/test/org/apache/commons/codec/language/SoundexTest.java
  
  Index: SoundexTest.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/codec/src/test/org/apache/commons/codec/language/SoundexTest.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- SoundexTest.java  17 Mar 2004 19:28:37 -  1.14
  +++ SoundexTest.java  9 Apr 2004 22:46:08 -   1.15
  @@ -264,8 +264,6 @@
   /**
 * Consonants from the same code group separated by W or H are treated as
 * one.
  -  * 
  -  * Test data from http://www.myatt.demon.co.uk/sxalg.htm
 */
   public void testHWRuleEx3() {
   assertEquals(S460, this.getEncoder().encode(Sgler));
  
  
  

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



cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map AbstractHashedMap.java AbstractLinkedMap.java Flat3Map.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 15:52:48

  Modified:collections/src/java/org/apache/commons/collections/iterators
SingletonIterator.java
   collections/src/java/org/apache/commons/collections/map
AbstractHashedMap.java AbstractLinkedMap.java
Flat3Map.java
  Log:
  Add since tags
  
  Revision  ChangesPath
  1.14  +2 -1  
jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/SingletonIterator.java
  
  Index: SingletonIterator.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/SingletonIterator.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SingletonIterator.java9 Apr 2004 14:38:47 -   1.13
  +++ SingletonIterator.java9 Apr 2004 22:52:48 -   1.14
  @@ -59,6 +59,7 @@
*
* @param object  the single object to return from the iterator
* @param removeAllowed  true if remove is allowed
  + * @since Commons Collections 3.1
*/
   public SingletonIterator(Object object, boolean removeAllowed) {
   super();
  
  
  
  1.16  +5 -1  
jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractHashedMap.java
  
  Index: AbstractHashedMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractHashedMap.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- AbstractHashedMap.java9 Apr 2004 22:14:09 -   1.15
  +++ AbstractHashedMap.java9 Apr 2004 22:52:48 -   1.16
  @@ -654,6 +654,7 @@
* @param entry  the entry to query, must not be null
* @return the codenext/code field of the entry
* @throws NullPointerException if the entry is null
  + * @since Commons Collections 3.1
*/
   protected HashEntry entryNext(HashEntry entry) {
   return entry.next;
  @@ -666,6 +667,7 @@
* @param entry  the entry to query, must not be null
* @return the codehashCode/code field of the entry
* @throws NullPointerException if the entry is null
  + * @since Commons Collections 3.1
*/
   protected int entryHashCode(HashEntry entry) {
   return entry.hashCode;
  @@ -678,6 +680,7 @@
* @param entry  the entry to query, must not be null
* @return the codekey/code field of the entry
* @throws NullPointerException if the entry is null
  + * @since Commons Collections 3.1
*/
   protected Object entryKey(HashEntry entry) {
   return entry.key;
  @@ -690,6 +693,7 @@
* @param entry  the entry to query, must not be null
* @return the codevalue/code field of the entry
* @throws NullPointerException if the entry is null
  + * @since Commons Collections 3.1
*/
   protected Object entryValue(HashEntry entry) {
   return entry.value;
  
  
  
  1.11  +3 -1  
jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractLinkedMap.java
  
  Index: AbstractLinkedMap.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractLinkedMap.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AbstractLinkedMap.java13 Mar 2004 15:54:34 -  1.10
  +++ AbstractLinkedMap.java9 Apr 2004 22:52:48 -   1.11
  @@ -299,6 +299,7 @@
* @param entry  the entry to query, must not be null
* @return the codebefore/code field of the entry
* @throws NullPointerException if the entry is null
  + * @since Commons Collections 3.1
*/
   protected LinkEntry entryBefore(LinkEntry entry) {
   return entry.before;
  @@ -311,6 +312,7 @@
* @param entry  the entry to query, must not be null
* @return the codeafter/code field of the entry
* @throws NullPointerException if the entry is null
  + * @since Commons Collections 3.1
*/
   protected LinkEntry entryAfter(LinkEntry entry) {
   return entry.after;
  
  
  
  1.16  +3 -1  
jakarta-commons/collections/src/java/org/apache/commons/collections/map/Flat3Map.java
  
  Index: Flat3Map.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/Flat3Map.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Flat3Map.java 9 Apr 2004 14:42:36 -   1.15
  +++ Flat3Map.java 9 Apr 2004 22:52:48 -   1.16
  @@ -374,6 +374,7 @@
* This can 

cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections IteratorUtils.java

2004-04-09 Thread scolebourne
scolebourne2004/04/09 15:53:27

  Modified:collections/src/java/org/apache/commons/collections
IteratorUtils.java
  Log:
  Add since tags and Javadoc
  
  Revision  ChangesPath
  1.24  +15 -2 
jakarta-commons/collections/src/java/org/apache/commons/collections/IteratorUtils.java
  
  Index: IteratorUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/IteratorUtils.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- IteratorUtils.java20 Mar 2004 00:21:08 -  1.23
  +++ IteratorUtils.java9 Apr 2004 22:53:27 -   1.24
  @@ -556,7 +556,8 @@
* 
* @param root  the root object to start iterating from, null results in an 
empty iterator
* @param transformer  the transformer to use, see above, null uses no effect 
transformer
  - * @return
  + * @return a new object graph iterator
  + * @since Commons Collections 3.1
*/
   public static Iterator objectGraphIterator(Object root, Transformer 
transformer) {
   return new ObjectGraphIterator(root, transformer);
  @@ -572,6 +573,7 @@
*
* @param iterator  the iterator to use, not null
* @param transform  the transform to use, not null
  + * @return a new transforming iterator
* @throws NullPointerException if either parameter is null
*/
   public static Iterator transformedIterator(Iterator iterator, Transformer 
transform) {
  @@ -594,6 +596,7 @@
*
* @param iterator  the iterator to use, not null
* @param predicate  the predicate to use as a filter, not null
  + * @return a new filtered iterator
* @throws NullPointerException if either parameter is null
*/
   public static Iterator filteredIterator(Iterator iterator, Predicate predicate) 
{
  @@ -614,6 +617,7 @@
*
* @param listIterator  the list iterator to use, not null
* @param predicate  the predicate to use as a filter, not null
  + * @return a new filtered iterator
* @throws NullPointerException if either parameter is null
*/
   public static ListIterator filteredListIterator(ListIterator listIterator, 
Predicate predicate) {
  @@ -636,6 +640,7 @@
* to start with.
*
* @param coll  the collection to iterate over, not null
  + * @return a new looping iterator
* @throws NullPointerException if the collection is null
*/
   public static ResettableIterator loopingIterator(Collection coll) {
  @@ -651,6 +656,7 @@
* Gets an iterator that provides an iterator view of the given enumeration.
*
* @param enumeration  the enumeration to use
  + * @return a new iterator
*/
   public static Iterator asIterator(Enumeration enumeration) {
   if (enumeration == null) {
  @@ -665,6 +671,7 @@
*
* @param enumeration  the enumeration to use
* @param removeCollection  the collection to remove elements from
  + * @return a new iterator
*/
   public static Iterator asIterator(Enumeration enumeration, Collection 
removeCollection) {
   if (enumeration == null) {
  @@ -680,6 +687,7 @@
* Gets an enumeration that wraps an iterator.
*
* @param iterator  the iterator to use, not null
  + * @return a new enumeration
* @throws NullPointerException if iterator is null
*/
   public static Enumeration asEnumeration(Iterator iterator) {
  @@ -696,6 +704,7 @@
* cached, permitting all required operations of ListIterator.
*
* @param iterator  the iterator to use, not null
  + * @return a new iterator
* @throws NullPointerException if iterator parameter is null
*/
   public static ListIterator toListIterator(Iterator iterator) {
  @@ -712,6 +721,7 @@
* created. At the end, this is converted to an array.
*
* @param iterator  the iterator to use, not null
  + * @return an array of the iterator contents
* @throws NullPointerException if iterator parameter is null
*/
   public static Object[] toArray(Iterator iterator) {
  @@ -730,6 +740,7 @@
*
* @param iterator  the iterator to use, not null
* @param arrayClass  the class of array to create
  + * @return an array of the iterator contents
* @throws NullPointerException if iterator parameter is null
* @throws NullPointerException if arrayClass is null
* @throws ClassCastException if the arrayClass is invalid
  @@ -752,6 +763,7 @@
* created. At the end, the list is returned.
*
* @param iterator  the iterator to use, not null
  + * @return a list of the iterator contents
* @throws NullPointerException if iterator 

cvs commit: jakarta-commons/collections .cvsignore

2004-04-09 Thread scolebourne
scolebourne2004/04/09 15:54:59

  Modified:collections .cvsignore
  Log:
  Ignore jdiff files
  
  Revision  ChangesPath
  1.15  +3 -0  jakarta-commons/collections/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/jakarta-commons/collections/.cvsignore,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- .cvsignore25 Jan 2004 01:22:06 -  1.14
  +++ .cvsignore9 Apr 2004 22:54:59 -   1.15
  @@ -14,3 +14,6 @@
   build2.xml
   release
   build
  +COLLECTIONS_2_1.xml
  +COLLECTIONS_3_0.xml
  +HEAD.xml
  
  
  

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



cvs commit: jakarta-commons/collections project.properties

2004-04-09 Thread scolebourne
scolebourne2004/04/09 15:55:44

  Modified:collections project.properties
  Log:
  Enable jdiff report
  
  Revision  ChangesPath
  1.12  +6 -9  jakarta-commons/collections/project.properties
  
  Index: project.properties
  ===
  RCS file: /home/cvs/jakarta-commons/collections/project.properties,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- project.properties7 Apr 2004 22:40:00 -   1.11
  +++ project.properties9 Apr 2004 22:55:44 -   1.12
  @@ -29,12 +29,14 @@
   # Uncomment to generate old javadoc using  maven javadoc:generate
   # These must be used one at a time
   # The maven xml also has full support for tags as part of site generation
  -#collections.javadoc.tag = COLLECTIONS_2_1
  -#collections.javadoc.tag.windowtitle =Collections 2.1 release API
  -#collections.javadoc.tag = COLLECTIONS_3_0
  -#collections.javadoc.tag.windowtitle =Collections 3.0 release API
  +#collections.javadoc.tag=COLLECTIONS_2_1
  +#collections.javadoc.tag.windowtitle=Collections 2.1 release API
  +#collections.javadoc.tag=COLLECTIONS_3_0
  +#collections.javadoc.tag.windowtitle=Collections 3.0 release API
   collections.javadoc.tag.access=public
   
  +maven.jdiff.old.tag=COLLECTIONS_3_0
  +
   maven.compile.debug=on
   maven.compile.deprecation=off
   maven.compile.optimize=off
  @@ -44,8 +46,3 @@
   maven.junit.fork=true
   
   clover.excludes=**/Test*.java
  -
  -# For active development
  -common.project.xml.file=../commons-build/project.xml
  -# For released code
  -#common.project.xml.file=commons.xml
  
  
  

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



cvs commit: jakarta-commons/collections RELEASE-NOTES.html

2004-04-09 Thread scolebourne
scolebourne2004/04/09 15:56:00

  Modified:collections RELEASE-NOTES.html
  Log:
  Extract AbstractReferenceMap from ReferenceMap
  
  Revision  ChangesPath
  1.34  +2 -1  jakarta-commons/collections/RELEASE-NOTES.html
  
  Index: RELEASE-NOTES.html
  ===
  RCS file: /home/cvs/jakarta-commons/collections/RELEASE-NOTES.html,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- RELEASE-NOTES.html9 Apr 2004 14:57:41 -   1.33
  +++ RELEASE-NOTES.html9 Apr 2004 22:56:00 -   1.34
  @@ -28,11 +28,12 @@
   liSingletonMap - fully featured singleton Map implementation/li
   liTransformedPredicate - A predicate where the input object is transformed 
[26946]/li
   liObjectGraphIterator - An iterator that can iterate over a graph of objects/li
  +liAbstractReferenceMap - New base class for reference maps [26503]/li
   /ul
   
   centerh3ENHANCEMENTS/h3/center
   ul
  -liReferenceMap - Changed to extend AbstractHashedMap, thus gaining a 
mapIterator() and subclassability/li
  +liReferenceMap - Changed to extend AbstractReferenceMap, thus gaining a 
mapIterator() and subclassability [26503]/li
   liFast3Map - Add clone() method/li
   liMultiKey - Add getKey(index) and size() methods and make constructor public/li
   liMultiHashMap - Add five methods to improve the API/li
  
  
  

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



[GUMP@lsd]: jakarta-commons/commons-collections failed

2004-04-09 Thread Ted Husted
To whom it may engage...

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

Project commons-collections has an issue affecting its community integration. This 
issue affects 206 projects. The current state is 'Failed', for reason 'Build Failed'

Full details are available at: 
http://lsd.student.utwente.nl/gump/jakarta-commons/commons-collections/index.html, 
however some snippets follow:

-  -  -  -  - -- --  G U M P

Gump provided these annotations:

 - Info - Sole jar [commons-collections-20040410.jar] identifier set to project name
 - Info - Failed with reason build failed
 - Info - Enable debug output, due to build failure.


-  -  -  -  - -- --  G U M P
Gump performed this work:

http://lsd.student.utwente.nl/gump/jakarta-commons/commons-collections/gump_work/build_jakarta-commons_commons-collections.html
Work Name: build_jakarta-commons_commons-collections (Type: Build)
State: Failed
Elapsed: 0 hours, 0 minutes, 45 seconds
Command Line: java -Djava.awt.headless=true 
-Xbootclasspath/p:/data3/gump/xml-xerces2/java/build/xercesImpl.jar:/data3/gump/xml-xerces2/java/build/xml-apis.jar
 org.apache.tools.ant.Main -Dgump.merge=/data3/gump/gump-install/work/merge.xml 
-Dbuild.sysclasspath=only -Dcomponent.version=20040410 dist 
[Working Directory: /data3/gump/jakarta-commons/collections]
-
[javac] ^
[javac] 
/data3/gump/jakarta-commons/collections/src/java/org/apache/commons/collections/CursorableLinkedList.java:1201:
 warning: org.apache.commons.collections.CursorableLinkedList in 
org.apache.commons.collections has been deprecated
[javac] CursorableSubList(CursorableLinkedList list, int from, int to) {
[javac]   ^
[javac] 
/data3/gump/jakarta-commons/collections/src/java/org/apache/commons/collections/CursorableLinkedList.java:1455:
 warning: org.apache.commons.collections.CursorableLinkedList in 
org.apache.commons.collections has been deprecated
[javac] protected CursorableLinkedList _list = null;
[javac]   ^
[javac] 
/data3/gump/jakarta-commons/collections/src/java/org/apache/commons/collections/SynchronizedPriorityQueue.java:44:
 warning: org.apache.commons.collections.PriorityQueue in 
org.apache.commons.collections has been deprecated
[javac] public SynchronizedPriorityQueue(final PriorityQueue priorityQueue) {
[javac]^
[javac] 
/data3/gump/jakarta-commons/collections/src/java/org/apache/commons/collections/CursorableLinkedList.java:1201:
 warning: org.apache.commons.collections.CursorableLinkedList in 
org.apache.commons.collections has been deprecated
[javac] CursorableSubList(CursorableLinkedList list, int from, int to) {
[javac]   ^
[javac] 
/data3/gump/jakarta-commons/collections/src/java/org/apache/commons/collections/DefaultMapBag.java:143:
 warning: org.apache.commons.collections.HashBag in org.apache.commons.collections has 
been deprecated
[javac] return containsAll(new HashBag(coll));
[javac]^
[javac] 
/data3/gump/jakarta-commons/collections/src/java/org/apache/commons/collections/DefaultMapBag.java:291:
 warning: org.apache.commons.collections.HashBag in org.apache.commons.collections has 
been deprecated
[javac] return retainAll(new HashBag(coll));
[javac]  ^
[javac] 
/data3/gump/jakarta-commons/collections/src/java/org/apache/commons/collections/DefaultMapBag.java:304:
 warning: org.apache.commons.collections.HashBag in org.apache.commons.collections has 
been deprecated
[javac] Bag excess = new HashBag();
[javac]  ^
[javac] 
/data3/gump/jakarta-commons/collections/src/java/org/apache/commons/collections/SynchronizedPriorityQueue.java:44:
 warning: org.apache.commons.collections.PriorityQueue in 
org.apache.commons.collections has been deprecated
[javac] public SynchronizedPriorityQueue(final PriorityQueue priorityQueue) {
[javac]^
[javac] 9 warnings

jar:
[mkdir] Created dir: /data3/gump/jakarta-commons/collections/build/classes/META-INF
 [copy] Copying 1 file to 
/data3/gump/jakarta-commons/collections/build/classes/META-INF
 [copy] Copying 1 file to 
/data3/gump/jakarta-commons/collections/build/classes/META-INF
[mkdir] Created dir: /data3/gump/jakarta-commons/collections/build/conf
 [copy] Copying 1 file to /data3/gump/jakarta-commons/collections/build/conf
  [jar] Building jar: 
/data3/gump/jakarta-commons/collections/build/commons-collections-20040410.jar

compile.tests:
[mkdir] Created dir: 

RE: question about performance

2004-04-09 Thread Alvarez, Gil
Ok, but I do need to have a timeout in my request, especially a
connection timeout. That's one of the reasons for using this library.
The only setTimeout() calls that I can find are in HttpClient, but I'll
have multiple concurrent requests that will want different timeouts. How
do I set a timeout per request?

-Original Message-
From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 08, 2004 1:20 PM
To: Commons HttpClient Project
Subject: RE: question about performance

Gil,
HttpClient#getHost / HttpClient#getPort return the DEFAULT host and port
used when only relative request path is given

HttpClient agent = new HttpClient();
GetMethod get1 = new GetMethod(/relative/whatever.html);
// default host configuration applies
GetMethod get2 = new
GetMethod(http://www.whatever.com/absolute/whatever.html;);

Oleg



On Thu, 2004-04-08 at 22:01, Alvarez, Gil wrote:
 Ok, I considered reusing HttpClient, but when I saw methods such as
 HttpClient.getHost() and getPort(), they implied that at the very
least
 it's not a thread safe class to use. If i have multiple threads
 executing within one HttpClient object at the same time, and I call
 HttpClient.getHost(), what's going to happen?
 
 -Original Message-
 From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 08, 2004 12:23 PM
 To: Commons HttpClient Project
 Subject: Re: question about performance
 
 Gil,
 (1) First and foremost DO reuse HttpClient instances when using
 multi-threaded connection manager. HttpClient class is thread-safe. In
 fact there are no known problems with having just one instance of
 HttpClient per application. Using a new instance of HttpClient for
 processing each request totally defeats all the performance
 optimizations we have built into HttpClient
 
 (2) Use multi-threaded connection manager in case you do not
 
 (3) Disable stale connection check
 
 (4) Do not use connect timeout which causes a controller thread to be
 spawned per connection attempt
 
 Oleg
 
 On Thu, 2004-04-08 at 21:02, Alvarez, Gil wrote:
  We recently ported our url-hitting code from using java.net.* code
to
  httpclient code. We use it in a high-volume environment (20 machines
 are
  hitting an external 3rd party to retrieve images).
  
   
  
  
  
  After the port, we saw a significant increase in cycles used by the
  machines, about 2-3 times (ie, the load on the boxes increased from
  using up 20% of the cpu, to about 50%-60% of the cpu.
  
   
  
  For each request, we instantiate an HttpClient object, and a
GetMethod
  object, and shut things down afterwards.
  
   
  
  In order to reduce the use of cycles, what is the recommended
 approach?
  
   
  
  Thank you.
  
 
 
 -
 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]
 


-
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 NOT REPLY [Bug 28303] - [PATCH] HttpClient#getHost HttpClient#getPort methods are misleading

2004-04-09 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=28303.
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=28303

[PATCH] HttpClient#getHost  HttpClient#getPort methods are misleading

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 12:06 ---
Committed to CVS HEAD and 2.0

Oleg

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



DO NOT REPLY [Bug 28302] - [PATCH] Wirelog corrections

2004-04-09 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=28302.
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=28302

[PATCH] Wirelog corrections





--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 12:23 ---
You are right. It did not occur to me that certain logging kits may have INFO
verbosity per default (jdk14 for instance). I like your suggestion.
Alternatively we may reduce the priority of request/response content logging to
TRACE. That will require virtually no changes in the code. Let me know if you
think this is acceptable

Oleg

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



DO NOT REPLY [Bug 28302] - [PATCH] Wirelog corrections

2004-04-09 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=28302.
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=28302

[PATCH] Wirelog corrections





--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 12:23 ---
Created an attachment (id=11197)
Patch (take 2)

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



DO NOT REPLY [Bug 25372] - auto close idle connections

2004-04-09 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=25372.
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=25372

auto close idle connections





--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 13:26 ---
Mike, I understand that 'elegancy' is a matter of personal preference and is
subjective, so all I am trying is to see if there's another way to approach the
problem, which may not necessarily better or feasible at all.

Important question here if tcp/ip sockets stay open when java Socket instance
garbage-collected or not. I believe the socket should be closed when GCed.
That's why I feel I'd rather have the idle connection handler hold onto
connection managers than individual connections, thus allowing connections to be
GCed when no longer in use. All I am saying that my guts tell me that
IdleConnectionManager / HttpConnectionManager coupling seems (to me) slightly
more elegant than IdleConnectionManager / HttpConnection coupling.

Oleg

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



RE: question about performance

2004-04-09 Thread Oleg Kalnichevski
Gil,
The problem is that until Java 1.4 there has simply been no way to
ensure connection timeout. HttpClient only 'mimics' connect timeout at
the expense of having a controller thread watch over the process of
socket initialization. The controller thread attempts to instantiate a
socket for a given period time, and if that fails, the controller thread
simply drops the socket on the floor, leaving it up to the garbage
collector to clean up the mess. This all is very expensive in terms of
resource consumption / memory allocation / garbage collection. Knowing
well about this problem we have put a lot of effects into trying to
reuse connections as much as possible. This approach works only if you
keep HttpClient along with its connection manager alive. Creating an
HttpClient instance per request completely defeats connection re-use and
results in excessive creation/garbage-collection of objects. 

 The only setTimeout() calls that I can find are in HttpClient, but I'll
 have multiple concurrent requests that will want different timeouts. How
 do I set a timeout per request?
 

The problem is that 2.0 API does not allow to control timeouts on per
request basis. There's an open ticket for this bug

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24154

We are planning to fix the problem for the 3.0 release. You are
absolutely certain you do need different timeout values on per request
basis I can even provide a fix for it this weekend. There are also plans
to add support for 1.4 connect timeout through reflection to circumvent
the problem by eliminating the controller thread when running in newer
JDKs. The catch there you'd have to use unstable branch of HttpClient
which still in pre Alpha1 state.

Oleg


 -Original Message-
 From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 08, 2004 1:20 PM
 To: Commons HttpClient Project
 Subject: RE: question about performance
 
 Gil,
 HttpClient#getHost / HttpClient#getPort return the DEFAULT host and port
 used when only relative request path is given
 
 HttpClient agent = new HttpClient();
 GetMethod get1 = new GetMethod(/relative/whatever.html);
 // default host configuration applies
 GetMethod get2 = new
 GetMethod(http://www.whatever.com/absolute/whatever.html;);
 
 Oleg
 
 
 
 On Thu, 2004-04-08 at 22:01, Alvarez, Gil wrote:
  Ok, I considered reusing HttpClient, but when I saw methods such as
  HttpClient.getHost() and getPort(), they implied that at the very
 least
  it's not a thread safe class to use. If i have multiple threads
  executing within one HttpClient object at the same time, and I call
  HttpClient.getHost(), what's going to happen?
  
  -Original Message-
  From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, April 08, 2004 12:23 PM
  To: Commons HttpClient Project
  Subject: Re: question about performance
  
  Gil,
  (1) First and foremost DO reuse HttpClient instances when using
  multi-threaded connection manager. HttpClient class is thread-safe. In
  fact there are no known problems with having just one instance of
  HttpClient per application. Using a new instance of HttpClient for
  processing each request totally defeats all the performance
  optimizations we have built into HttpClient
  
  (2) Use multi-threaded connection manager in case you do not
  
  (3) Disable stale connection check
  
  (4) Do not use connect timeout which causes a controller thread to be
  spawned per connection attempt
  
  Oleg
  
  On Thu, 2004-04-08 at 21:02, Alvarez, Gil wrote:
   We recently ported our url-hitting code from using java.net.* code
 to
   httpclient code. We use it in a high-volume environment (20 machines
  are
   hitting an external 3rd party to retrieve images).
   

   
   
   
   After the port, we saw a significant increase in cycles used by the
   machines, about 2-3 times (ie, the load on the boxes increased from
   using up 20% of the cpu, to about 50%-60% of the cpu.
   

   
   For each request, we instantiate an HttpClient object, and a
 GetMethod
   object, and shut things down afterwards.
   

   
   In order to reduce the use of cycles, what is the recommended
  approach?
   

   
   Thank you.
   
  
  
  -
  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]
  
 
 
 -
 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 NOT REPLY [Bug 25372] - auto close idle connections

2004-04-09 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=25372.
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=25372

auto close idle connections





--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 16:51 ---
 I believe the socket should be closed when GCed.
Be very careful here. Sockets are not closed when GC'ed. They're closed when
finalized (as implemented in java.net.PlainSocket). Yes, the distinction is
subtle, but an important one.
You can somewhat rely on an object being GC'ed, but you absolutely cannot rely
on an object being finalized (in a timeframe that matters).
I'm not sure if this is the right place to go into the details, but if the
statement above is not clear, I'll be happy to demonstrate with a piece of code.
In short, I think it would be a very bad idea not to close the socket explicitly.

Thanks
Moh

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



DO NOT REPLY [Bug 25372] - auto close idle connections

2004-04-09 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=25372.
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=25372

auto close idle connections





--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 17:24 ---
Mohammad,
You may find it shocking, but to me an object may not be considered fully
disposed of or garbage-collected until its finalizer has been executed. My
apologies if that was not clear.

Oleg

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



DO NOT REPLY [Bug 25372] - auto close idle connections

2004-04-09 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=25372.
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=25372

auto close idle connections





--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 17:37 ---
Oleg, you're correct, at least according to the java language spec.
Unfortunately, the VM implementation seems to cause some serious issues. The
following code does nothing, as it should:

while(true) new Object();

The next piece of code, however, dies with an out of memory exception:

while(true) new java.util.zip.Deflater();

Deflater has a finalizer that frees up memory. For the life of me, I can't
reconcile this fact with the wording of the language spec. Sun has refused to
fix the above:
http://developer.java.sun.com/developer/bugParade/bugs/4094554.html
It's also odd that System.gc() is a different call than System.runFinalization()
(from the spec wording, you wouldn't expect that).
I believe this is the reason SWT component have to be disposed and don't rely on
finalizers. The situation is even trickier with sockets, because even after a
socket is closed, it has to go into TIME-WAIT. 


Thanks
Moh

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



RE: question about performance

2004-04-09 Thread Alvarez, Gil
How about this, it turns out that the different timeouts are a small
set, some want 10 secs, others 30 secs, others 1 minute. So I can keep a
pool of HttpClient objects, one per timeout. This way, each HttpClient
object can be configured with its own timeout.

But will I still get performance benefits if I use HttpClient in this
way? And will it behave correctly? I do require a timeout to be set, and
I will have multiple concurrent requests executing within one
HttpClient. Will the behavior be as if I specified a timeout per
request, or am I going to get weird behavior (eg, I set a timeout of 10,
request R1 starts at T1, R2 starts at T1+5, and R2 times out at T1+10,
which would be wrong). Basically do you fire up that controller thread
per request, or is there just one per HttpClient object?

-Original Message-
From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 09, 2004 6:58 AM
To: Commons HttpClient Project
Subject: RE: question about performance

Gil,
The problem is that until Java 1.4 there has simply been no way to
ensure connection timeout. HttpClient only 'mimics' connect timeout at
the expense of having a controller thread watch over the process of
socket initialization. The controller thread attempts to instantiate a
socket for a given period time, and if that fails, the controller thread
simply drops the socket on the floor, leaving it up to the garbage
collector to clean up the mess. This all is very expensive in terms of
resource consumption / memory allocation / garbage collection. Knowing
well about this problem we have put a lot of effects into trying to
reuse connections as much as possible. This approach works only if you
keep HttpClient along with its connection manager alive. Creating an
HttpClient instance per request completely defeats connection re-use and
results in excessive creation/garbage-collection of objects. 

 The only setTimeout() calls that I can find are in HttpClient, but
I'll
 have multiple concurrent requests that will want different timeouts.
How
 do I set a timeout per request?
 

The problem is that 2.0 API does not allow to control timeouts on per
request basis. There's an open ticket for this bug

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24154

We are planning to fix the problem for the 3.0 release. You are
absolutely certain you do need different timeout values on per request
basis I can even provide a fix for it this weekend. There are also plans
to add support for 1.4 connect timeout through reflection to circumvent
the problem by eliminating the controller thread when running in newer
JDKs. The catch there you'd have to use unstable branch of HttpClient
which still in pre Alpha1 state.

Oleg


 -Original Message-
 From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 08, 2004 1:20 PM
 To: Commons HttpClient Project
 Subject: RE: question about performance
 
 Gil,
 HttpClient#getHost / HttpClient#getPort return the DEFAULT host and
port
 used when only relative request path is given
 
 HttpClient agent = new HttpClient();
 GetMethod get1 = new GetMethod(/relative/whatever.html);
 // default host configuration applies
 GetMethod get2 = new
 GetMethod(http://www.whatever.com/absolute/whatever.html;);
 
 Oleg
 
 
 
 On Thu, 2004-04-08 at 22:01, Alvarez, Gil wrote:
  Ok, I considered reusing HttpClient, but when I saw methods such as
  HttpClient.getHost() and getPort(), they implied that at the very
 least
  it's not a thread safe class to use. If i have multiple threads
  executing within one HttpClient object at the same time, and I call
  HttpClient.getHost(), what's going to happen?
  
  -Original Message-
  From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, April 08, 2004 12:23 PM
  To: Commons HttpClient Project
  Subject: Re: question about performance
  
  Gil,
  (1) First and foremost DO reuse HttpClient instances when using
  multi-threaded connection manager. HttpClient class is thread-safe.
In
  fact there are no known problems with having just one instance of
  HttpClient per application. Using a new instance of HttpClient for
  processing each request totally defeats all the performance
  optimizations we have built into HttpClient
  
  (2) Use multi-threaded connection manager in case you do not
  
  (3) Disable stale connection check
  
  (4) Do not use connect timeout which causes a controller thread to
be
  spawned per connection attempt
  
  Oleg
  
  On Thu, 2004-04-08 at 21:02, Alvarez, Gil wrote:
   We recently ported our url-hitting code from using java.net.* code
 to
   httpclient code. We use it in a high-volume environment (20
machines
  are
   hitting an external 3rd party to retrieve images).
   

   
   
   
   After the port, we saw a significant increase in cycles used by
the
   machines, about 2-3 times (ie, the load on the boxes increased
from
   using up 20% of the cpu, to about 50%-60% of the cpu.
   

   
   For each request, we 

RE: question about performance

2004-04-09 Thread Oleg Kalnichevski
Gil,

 How about this, it turns out that the different timeouts are a small
 set, some want 10 secs, others 30 secs, others 1 minute. So I can keep a
 pool of HttpClient objects, one per timeout. This way, each HttpClient
 object can be configured with its own timeout.
 

Are you talking about connect timeouts or socket (read) timeouts, or
both?


 But will I still get performance benefits if I use HttpClient in this
 way?

Sounds plausible. Would you be accessing different hosts with those
HttpClient instances?


  And will it behave correctly? I do require a timeout to be set, and
 I will have multiple concurrent requests executing within one
 HttpClient. Will the behavior be as if I specified a timeout per
 request, or am I going to get weird behavior (eg, I set a timeout of 10,
 request R1 starts at T1, R2 starts at T1+5, and R2 times out at T1+10,
 which would be wrong). 

That should not be the case.


 Basically do you fire up that controller thread
 per request, or is there just one per HttpClient object?
 

The controller thread is started per connect attempt. If it takes a new
connection per request, that basically means a controller thread per
request. The trick is to reuse connections as much as possible.

Another idea:

If you can live with one set of connection/socket timeout values per
target host, you may also do all the threads management yourself,
keeping an instance of HttpClient per worker thread. Just make sure you
reuse HttpClient instances that may already have a connection to the
target host open. Do not let it get GCed

Oleg

 -Original Message-
 From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
 Sent: Friday, April 09, 2004 6:58 AM
 To: Commons HttpClient Project
 Subject: RE: question about performance
 
 Gil,
 The problem is that until Java 1.4 there has simply been no way to
 ensure connection timeout. HttpClient only 'mimics' connect timeout at
 the expense of having a controller thread watch over the process of
 socket initialization. The controller thread attempts to instantiate a
 socket for a given period time, and if that fails, the controller thread
 simply drops the socket on the floor, leaving it up to the garbage
 collector to clean up the mess. This all is very expensive in terms of
 resource consumption / memory allocation / garbage collection. Knowing
 well about this problem we have put a lot of effects into trying to
 reuse connections as much as possible. This approach works only if you
 keep HttpClient along with its connection manager alive. Creating an
 HttpClient instance per request completely defeats connection re-use and
 results in excessive creation/garbage-collection of objects. 
 
  The only setTimeout() calls that I can find are in HttpClient, but
 I'll
  have multiple concurrent requests that will want different timeouts.
 How
  do I set a timeout per request?
  
 
 The problem is that 2.0 API does not allow to control timeouts on per
 request basis. There's an open ticket for this bug
 
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24154
 
 We are planning to fix the problem for the 3.0 release. You are
 absolutely certain you do need different timeout values on per request
 basis I can even provide a fix for it this weekend. There are also plans
 to add support for 1.4 connect timeout through reflection to circumvent
 the problem by eliminating the controller thread when running in newer
 JDKs. The catch there you'd have to use unstable branch of HttpClient
 which still in pre Alpha1 state.
 
 Oleg
 
 
  -Original Message-
  From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, April 08, 2004 1:20 PM
  To: Commons HttpClient Project
  Subject: RE: question about performance
  
  Gil,
  HttpClient#getHost / HttpClient#getPort return the DEFAULT host and
 port
  used when only relative request path is given
  
  HttpClient agent = new HttpClient();
  GetMethod get1 = new GetMethod(/relative/whatever.html);
  // default host configuration applies
  GetMethod get2 = new
  GetMethod(http://www.whatever.com/absolute/whatever.html;);
  
  Oleg
  
  
  
  On Thu, 2004-04-08 at 22:01, Alvarez, Gil wrote:
   Ok, I considered reusing HttpClient, but when I saw methods such as
   HttpClient.getHost() and getPort(), they implied that at the very
  least
   it's not a thread safe class to use. If i have multiple threads
   executing within one HttpClient object at the same time, and I call
   HttpClient.getHost(), what's going to happen?
   
   -Original Message-
   From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
   Sent: Thursday, April 08, 2004 12:23 PM
   To: Commons HttpClient Project
   Subject: Re: question about performance
   
   Gil,
   (1) First and foremost DO reuse HttpClient instances when using
   multi-threaded connection manager. HttpClient class is thread-safe.
 In
   fact there are no known problems with having just one instance of
   HttpClient per application. Using a new instance of 

DO NOT REPLY [Bug 28322] New: - Connection timeout logic redesign

2004-04-09 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=28322.
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=28322

Connection timeout logic redesign

   Summary: Connection timeout logic redesign
   Product: Commons
   Version: 2.0 Final
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: HttpClient
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Changelog:

* CreateSocket method with timeout parameter added to the ProtocolSocketFactory
interface

* TimeoutController related code factored out of HttpConnection class and moved
into ControllerThreadSocketFactory helper class

* ReflectionSocketFactory helper class added. This factory encapsulates
reflection code to call JDK 1.4 Socket#connect method if supported

* All protocol socket factories now attempt to initially use
ReflectionSocketFactory if required to create a socket within a given limit of
time. If reflection fails protocol socket factories fall back onto the good ol'
ControllerThreadSocketFactory

Benefits:

* HttpConnection code got a lot cleaner
* When running in modern JREs expensive timeout controller thread per connection
attempt is no longer needed
* Ugly code intended to work around limitations of the older JREs is now
confined to a few helper classes that can be easily thrown away once we move
onto Java 1.4

Let me know what you think

Oleg

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



DO NOT REPLY [Bug 28322] - Connection timeout logic redesign

2004-04-09 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=28322.
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=28322

Connection timeout logic redesign





--- Additional Comments From [EMAIL PROTECTED]  2004-04-09 23:08 ---
Created an attachment (id=11204)
Patch (take 1)

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