svn commit: r471138 - in /jakarta/commons/proper/beanutils/trunk/src: java/org/apache/commons/beanutils/PropertyUtilsBean.java test/org/apache/commons/beanutils/DynaPropertyUtilsTestCase.java test/org

2006-11-04 Thread bayard
Author: bayard
Date: Sat Nov  4 00:06:03 2006
New Revision: 471138

URL: http://svn.apache.org/viewvc?view=revrev=471138
Log:
Applying improved messages for unknown properties in setSimpleProperty and 
getSimpleProperty to resolve issue #BEANUTILS-30

Modified:

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/DynaPropertyUtilsTestCase.java

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/PropertyUtilsTestCase.java

Modified: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java?view=diffrev=471138r1=471137r2=471138
==
--- 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java
 (original)
+++ 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/PropertyUtilsBean.java
 Sat Nov  4 00:06:03 2006
@@ -1249,7 +1249,8 @@
 ((DynaBean) bean).getDynaClass().getDynaProperty(name);
 if (descriptor == null) {
 throw new NoSuchMethodException(Unknown property ' +
-name + ');
+name + ' on dynaclass ' + 
+((DynaBean) bean).getDynaClass() + ' );
 }
 return (((DynaBean) bean).get(name));
 }
@@ -1259,12 +1260,12 @@
 getPropertyDescriptor(bean, name);
 if (descriptor == null) {
 throw new NoSuchMethodException(Unknown property ' +
-name + ');
+name + ' on class ' + bean.getClass() + ' );
 }
 Method readMethod = getReadMethod(descriptor);
 if (readMethod == null) {
 throw new NoSuchMethodException(Property ' + name +
-' has no getter method);
+' has no getter method in class ' + bean.getClass() + 
');
 }
 
 // Call the property getter and return the value
@@ -1946,7 +1947,8 @@
 ((DynaBean) bean).getDynaClass().getDynaProperty(name);
 if (descriptor == null) {
 throw new NoSuchMethodException(Unknown property ' +
-name + ');
+name + ' on dynaclass ' + 
+((DynaBean) bean).getDynaClass() + ' );
 }
 ((DynaBean) bean).set(name, value);
 return;
@@ -1957,12 +1959,12 @@
 getPropertyDescriptor(bean, name);
 if (descriptor == null) {
 throw new NoSuchMethodException(Unknown property ' +
-name + ');
+name + ' on class ' + bean.getClass() + ' );
 }
 Method writeMethod = getWriteMethod(descriptor);
 if (writeMethod == null) {
 throw new NoSuchMethodException(Property ' + name +
-' has no setter method);
+' has no setter method in class ' + bean.getClass() + 
');
 }
 
 // Call the property setter method

Modified: 
jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/DynaPropertyUtilsTestCase.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/DynaPropertyUtilsTestCase.java?view=diffrev=471138r1=471137r2=471138
==
--- 
jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/DynaPropertyUtilsTestCase.java
 (original)
+++ 
jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/DynaPropertyUtilsTestCase.java
 Sat Nov  4 00:06:03 2006
@@ -1442,6 +1442,8 @@
 fail(InvocationTargetException);
 } catch (NoSuchMethodException e) {
 // Correct result for this test
+assertEquals(Unknown property 'unknown' on dynaclass ' +
+ ((DynaBean) bean).getDynaClass() + ', 
e.getMessage() );
 }
 
 }
@@ -2592,6 +2594,8 @@
 fail(InvocationTargetException);
 } catch (NoSuchMethodException e) {
 // Correct result for this test
+assertEquals(Unknown property 'unknown' on dynaclass ' +
+ ((DynaBean) bean).getDynaClass() + ', 
e.getMessage() );
 }
 
 }

Modified: 
jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/PropertyUtilsTestCase.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/PropertyUtilsTestCase.java?view=diffrev=471138r1=471137r2=471138

[jira] Resolved: (BEANUTILS-30) [beanutils] Improve message for Unknown property

2006-11-04 Thread Henri Yandell (JIRA)
 [ http://issues.apache.org/jira/browse/BEANUTILS-30?page=all ]

Henri Yandell resolved BEANUTILS-30.


Resolution: Fixed

svn ci -m Applying improved messages for unknown properties in 
setSimpleProperty and getSimpleProperty to resolve issue #BEANUTILS-30

Sendingsrc/java/org/apache/commons/beanutils/PropertyUtilsBean.java
Sending
src/test/org/apache/commons/beanutils/DynaPropertyUtilsTestCase.java
Sendingsrc/test/org/apache/commons/beanutils/PropertyUtilsTestCase.java
Transmitting file data ...
Committed revision 471138.

 [beanutils] Improve message for Unknown property
 --

 Key: BEANUTILS-30
 URL: http://issues.apache.org/jira/browse/BEANUTILS-30
 Project: Commons BeanUtils
  Issue Type: Bug
Affects Versions: 1.6
 Environment: Operating System: other
 Platform: Other
Reporter: Barry Kaplan
 Fix For: 1.8.0


 When PropertyUtilsBean attempts to set/get a property it throws an exception
 with the following message:
 Caused by: java.lang.NoSuchMethodException: Unknown property 'name'
   at
 org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:1741)
   at
 org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:577)
   at
 com.sun.faces.config.ManagedBeanFactory.setPropertiesIntoBean(ManagedBeanFactory.java:558)
 Its nice to know the name of the property, but it would be even nicer to know
 the class. 
 (Yes, this is also a problem with the calling code, JSF FI in this case, which
 even knows instance and bean name, yet chooses to leave tha a secret.)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



svn commit: r471163 - in /jakarta/commons/proper/collections/branches/collections_jdk5_branch: ./ src/java/org/apache/commons/collections/ src/test/org/apache/commons/collections/

2006-11-04 Thread scolebourne
Author: scolebourne
Date: Sat Nov  4 02:56:39 2006
New Revision: 471163

URL: http://svn.apache.org/viewvc?view=revrev=471163
Log:
Remove FastArrayList, FastHashMap, FastTreeMap

Removed:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/FastArrayList.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/FastHashMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/FastTreeMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestFastArrayList.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestFastArrayList1.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestFastHashMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestFastHashMap1.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestFastTreeMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestFastTreeMap1.java
Modified:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/MapPerformance.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestAll.java

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt?view=diffrev=471163r1=471162r2=471163
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt
 Sat Nov  4 02:56:39 2006
@@ -28,6 +28,13 @@
 
 - Removed all deprecated classes and methods
 
+- Removed FastArrayList
+  - use CopyOnWriteList
+- Removed FastHashMap
+  - use ConcurrentHashMap, but beware null keys and values
+- Removed FastTreeSet
+  - no direct replacement - use ConcurrentHashMap or synchronized TreeMap
+
 
 Feedback
 

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/MapPerformance.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/MapPerformance.java?view=diffrev=471163r1=471162r2=471163
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/MapPerformance.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/MapPerformance.java
 Sat Nov  4 02:56:39 2006
@@ -52,7 +52,7 @@
 Map flatMap = new Flat3Map(hashMap);
 System.out.println(flatMap);
 Map unmodHashMap = Collections.unmodifiableMap(new HashMap(hashMap));
-Map fastHashMap = new FastHashMap(hashMap);
+//Map fastHashMap = new FastHashMap(hashMap);
 Map treeMap = new TreeMap(hashMap);
 //Map linkedMap = new LinkedHashMap(hashMap);
 //Map syncMap = Collections.unmodifiableMap(new HashMap(hashMap));

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestAll.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestAll.java?view=diffrev=471163r1=471162r2=471163
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestAll.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestAll.java
 Sat Nov  4 02:56:39 2006
@@ -50,15 +50,9 @@
 
 suite.addTest(TestArrayStack.suite());
 suite.addTest(TestExtendedProperties.suite());
-suite.addTest(TestFastArrayList.suite());
-suite.addTest(TestFastArrayList1.suite());
-suite.addTest(TestFastHashMap.suite());
-suite.addTest(TestFastHashMap1.suite());
-suite.addTest(TestFastTreeMap.suite());
-suite.addTest(TestFastTreeMap1.suite());
 return 

[collections-generics] [PROPOSAL] Remove all author and since version tags

2006-11-04 Thread Stephen Colebourne

As this is a 'new' project, I propose that we:

- remove all @author tags - this complies with previous ASF board 
suggestions


- remove all @since tags - as its incompatible anyway, and will probably 
end up in a separate package, these have no real meaning


Any dissenting opinions?
First commits on this topic won't be until after 18th November 2006.

Stephen

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



Re: TLS for FTP

2006-11-04 Thread Niklas Gustavsson

Rory,

Niklas Gustavsson wrote:

Niklas Gustavsson wrote:

Rory Winston wrote:

The FTPSClient needs the have a SSL enabled ServerSocketFactory set, e.g.:
client.setServerSocketFactory(SSLServerSocketFactory.getDefault());


I believe that the following patch which sets the server socket factory 
to one that is SSL enabled solves the bug where commons-net FTPSClient 
will fail on entering PROT P mode in active mode.


If you rather would like this as a JIRA issue, please tell me and I'll 
create an issue.


/niklas
Index: src/main/java/org/apache/commons/net/ftp/FTPSClient.java
===
--- src/main/java/org/apache/commons/net/ftp/FTPSClient.java(revision 
468975)
+++ src/main/java/org/apache/commons/net/ftp/FTPSClient.java(working copy)
@@ -25,6 +25,7 @@
 
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLServerSocketFactory;
 import javax.net.ssl.SSLSocket;
 import javax.net.ssl.SSLSocketFactory;
 import javax.net.ssl.TrustManager;
@@ -380,8 +381,10 @@
 throw new SSLException(getReplyString());
 if (DEFAULT_PROT.equals(prot)) {
 setSocketFactory(null);
+setServerSocketFactory(null);
 } else {
 setSocketFactory(new FTPSSocketFactory(context));
+setServerSocketFactory(SSLServerSocketFactory.getDefault());
 }
 }
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

svn commit: r471166 - in /jakarta/commons/proper/collections/branches/collections_jdk5_branch: ./ src/java/org/apache/commons/collections/ src/java/org/apache/commons/collections/bag/ src/java/org/apa

2006-11-04 Thread scolebourne
Author: scolebourne
Date: Sat Nov  4 03:33:22 2006
New Revision: 471166

URL: http://svn.apache.org/viewvc?view=revrev=471166
Log:
Removed Typed* containers such as TypedList and TypedMap as generics now 
provides type safety

Removed:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/TypedBag.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/TypedSortedBag.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/TypedBuffer.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/TypedCollection.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/TypedList.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/TypedMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/TypedSortedMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/TypedSet.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/TypedSortedSet.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/bag/TestTypedBag.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/bag/TestTypedSortedBag.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/list/TestTypedList.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/set/TestTypedSet.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/set/TestTypedSortedSet.java
Modified:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/BagUtils.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/BufferUtils.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/CollectionUtils.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/ListUtils.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/MapUtils.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/SetUtils.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestBagUtils.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestCollectionUtils.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/TestMapUtils.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/bag/TestAll.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/list/TestAll.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/set/TestAll.java

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt?view=diffrev=471166r1=471165r2=471166
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt
 Sat Nov  4 03:33:22 2006
@@ -35,6 +35,9 @@
 - Removed FastTreeSet
   - no direct replacement - use ConcurrentHashMap or synchronized TreeMap
 
+- Removed Typed* containers such as TypedList and TypedMap
+  - use generics for type safety, or Collections.checked*()
+
 
 Feedback
 

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/BagUtils.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/BagUtils.java?view=diffrev=471166r1=471165r2=471166

svn commit: r471173 - in /jakarta/commons/proper/collections/branches/collections_jdk5_branch: ./ src/java/org/apache/commons/collections/buffer/ src/java/org/apache/commons/collections/collection/ sr

2006-11-04 Thread scolebourne
Author: scolebourne
Date: Sat Nov  4 04:07:39 2006
New Revision: 471173

URL: http://svn.apache.org/viewvc?view=revrev=471173
Log:
Abstract*Decorator - Generify and use covariant return types

Modified:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/AbstractBufferDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/AbstractCollectionDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/AbstractListDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSetDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSortedSetDecorator.java

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt?view=diffrev=471173r1=471172r2=471173
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/RELEASE-NOTES.txt
 Sat Nov  4 04:07:39 2006
@@ -38,6 +38,10 @@
 - Removed Typed* containers such as TypedList and TypedMap
   - use generics for type safety, or Collections.checked*()
 
+- Switch Abstract*Decorator classes to expose decorated() protected method
+  instead of the decorated collection directly. Each class overrides 
decorated()
+  to add its type covariantly, thus getList()/getSet() etc. methods are removed
+
 
 Feedback
 

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/AbstractBufferDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/AbstractBufferDecorator.java?view=diffrev=471173r1=471172r2=471173
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/AbstractBufferDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/AbstractBufferDecorator.java
 Sat Nov  4 04:07:39 2006
@@ -53,18 +53,28 @@
  * Gets the buffer being decorated.
  * 
  * @return the decorated buffer
+ * @deprecated use decorated()
  */
 protected Buffer getBuffer() {
-return (Buffer) getCollection();
+return decorated();
+}
+
+/**
+ * Gets the buffer being decorated.
+ * 
+ * @return the decorated buffer
+ */
+protected Buffer decorated() {
+return (Buffer) super.decorated();
 }
 
 //---
 public Object get() {
-return getBuffer().get();
+return decorated().get();
 }
 
 public Object remove() {
-return getBuffer().remove();
+return decorated().remove();
 }
 
 }

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/AbstractCollectionDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/AbstractCollectionDecorator.java?view=diffrev=471173r1=471172r2=471173
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/AbstractCollectionDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/AbstractCollectionDecorator.java
 Sat Nov  4 04:07:39 2006
@@ -34,16 +34,17 @@
  * wrapped collection. This may be undesirable, for example if you are trying
  * to write an unmodifiable implementation it might provide a loophole.
  *
+ * @param E the type of the elements in the collection
  * @since Commons Collections 3.0
  * @version $Revision$ $Date$
  * 
  * @author Stephen Colebourne
  * @author Paul Jack
  */
-public abstract class AbstractCollectionDecorator implements Collection {
+public abstract class AbstractCollectionDecoratorE implements CollectionE {
 
 /** The collection being decorated */
-protected Collection collection;
+protected CollectionE 

svn commit: r471180 - in /jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections: bidimap/ map/

2006-11-04 Thread scolebourne
Author: scolebourne
Date: Sat Nov  4 05:27:44 2006
New Revision: 471180

URL: http://svn.apache.org/viewvc?view=revrev=471180
Log:
Abstract*Decorator - Generify and use covariant return types

Modified:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bidimap/AbstractBidiMapDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractMapDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractOrderedMapDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bidimap/AbstractBidiMapDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bidimap/AbstractBidiMapDecorator.java?view=diffrev=471180r1=471179r2=471180
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bidimap/AbstractBidiMapDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bidimap/AbstractBidiMapDecorator.java
 Sat Nov  4 05:27:44 2006
@@ -38,8 +38,9 @@
  * @author Stephen Colebourne
  */
 public abstract class AbstractBidiMapDecorator
-extends AbstractMapDecorator implements BidiMap {
-
+extends AbstractMapDecorator
+implements BidiMap {
+
 /**
  * Constructor that wraps (not copies).
  *
@@ -54,26 +55,36 @@
  * Gets the map being decorated.
  * 
  * @return the decorated map
+ * @deprecated use decorated()
  */
 protected BidiMap getBidiMap() {
-return (BidiMap) map;
+return decorated();
+}
+
+/**
+ * Gets the map being decorated.
+ * 
+ * @return the decorated map
+ */
+protected BidiMap decorated() {
+return (BidiMap) super.decorated();
 }
 
 //---
 public MapIterator mapIterator() {
-return getBidiMap().mapIterator();
+return decorated().mapIterator();
 }
 
 public Object getKey(Object value) {
-return getBidiMap().getKey(value);
+return decorated().getKey(value);
 }
 
 public Object removeValue(Object value) {
-return getBidiMap().removeValue(value);
+return decorated().removeValue(value);
 }
 
 public BidiMap inverseBidiMap() {
-return getBidiMap().inverseBidiMap();
+return decorated().inverseBidiMap();
 }
 
 }

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecorator.java?view=diffrev=471180r1=471179r2=471180
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bidimap/AbstractOrderedBidiMapDecorator.java
 Sat Nov  4 05:27:44 2006
@@ -37,8 +37,9 @@
  * @author Stephen Colebourne
  */
 public abstract class AbstractOrderedBidiMapDecorator
-extends AbstractBidiMapDecorator implements OrderedBidiMap {
-
+extends AbstractBidiMapDecorator
+implements OrderedBidiMap {
+
 /**
  * Constructor that wraps (not copies).
  *
@@ -53,34 +54,44 @@
  * Gets the map being decorated.
  * 
  * @return the decorated map
+ * @deprecated use decorated()
  */
 protected OrderedBidiMap getOrderedBidiMap() {
-return (OrderedBidiMap) map;
+return decorated();
+}
+
+/**
+ * Gets the map being decorated.
+ * 
+ * @return the decorated map
+ */
+protected OrderedBidiMap decorated() {
+return (OrderedBidiMap) super.decorated();
 }
 
 

svn commit: r471186 - in /jakarta/commons/proper/collections/branches/collections_jdk5_branch/src: java/org/apache/commons/collections/set/ test/org/apache/commons/collections/set/

2006-11-04 Thread scolebourne
Author: scolebourne
Date: Sat Nov  4 05:47:51 2006
New Revision: 471186

URL: http://svn.apache.org/viewvc?view=revrev=471186
Log:
Remove getSet() and getSortedSet() - use decorated()

Modified:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSetDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSortedSetDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/UnmodifiableSortedSet.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/set/TestListOrderedSet.java

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSetDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSetDecorator.java?view=diffrev=471186r1=471185r2=471186
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSetDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSetDecorator.java
 Sat Nov  4 05:47:51 2006
@@ -57,16 +57,6 @@
  * Gets the set being decorated.
  * 
  * @return the decorated set
- * @deprecated use decorated()
- */
-protected SetE getSet() {
-return decorated();
-}
-
-/**
- * Gets the set being decorated.
- * 
- * @return the decorated set
  */
 protected SetE decorated() {
 return (SetE) super.decorated();

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSortedSetDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSortedSetDecorator.java?view=diffrev=471186r1=471185r2=471186
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSortedSetDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/AbstractSortedSetDecorator.java
 Sat Nov  4 05:47:51 2006
@@ -54,16 +54,6 @@
 }
 
 /**
- * Gets the sorted set being decorated.
- * 
- * @return the decorated set
- * @deprecated use decorated()
- */
-protected SortedSetE getSortedSet() {
-return decorated();
-}
-
-/**
  * Gets the set being decorated.
  * 
  * @return the decorated set

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/UnmodifiableSortedSet.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/UnmodifiableSortedSet.java?view=diffrev=471186r1=471185r2=471186
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/UnmodifiableSortedSet.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/UnmodifiableSortedSet.java
 Sat Nov  4 05:47:51 2006
@@ -123,17 +123,17 @@
 
 //---
 public SortedSet subSet(Object fromElement, Object toElement) {
-SortedSet sub = getSortedSet().subSet(fromElement, toElement);
+SortedSet sub = decorated().subSet(fromElement, toElement);
 return new UnmodifiableSortedSet(sub);
 }
 
 public SortedSet headSet(Object toElement) {
-SortedSet sub = getSortedSet().headSet(toElement);
+SortedSet sub = decorated().headSet(toElement);
 return new UnmodifiableSortedSet(sub);
 }
 
 public SortedSet tailSet(Object fromElement) {
-SortedSet sub = getSortedSet().tailSet(fromElement);
+SortedSet sub = decorated().tailSet(fromElement);
 return new UnmodifiableSortedSet(sub);
 }
 

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/set/TestListOrderedSet.java
URL: 

svn commit: r471189 - /jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/

2006-11-04 Thread scolebourne
Author: scolebourne
Date: Sat Nov  4 05:57:57 2006
New Revision: 471189

URL: http://svn.apache.org/viewvc?view=revrev=471189
Log:
Remove getMap(), getOrderedMap() and getSortedMap() - use decorated()

Modified:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractMapDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractOrderedMapDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/ListOrderedMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/MultiValueMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/TransformedMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/TransformedSortedMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/UnmodifiableOrderedMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/UnmodifiableSortedMap.java

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractMapDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractMapDecorator.java?view=diffrev=471189r1=471188r2=471189
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractMapDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractMapDecorator.java
 Sat Nov  4 05:57:57 2006
@@ -71,16 +71,6 @@
  * Gets the map being decorated.
  * 
  * @return the decorated map
- * @deprecated use decorated()
- */
-protected MapK, V getMap() {
-return decorated();
-}
-
-/**
- * Gets the map being decorated.
- * 
- * @return the decorated map
  */
 protected MapK, V decorated() {
 return map;

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractOrderedMapDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractOrderedMapDecorator.java?view=diffrev=471189r1=471188r2=471189
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractOrderedMapDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractOrderedMapDecorator.java
 Sat Nov  4 05:57:57 2006
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.collections.map;
 
-import java.util.Map;
-
 import org.apache.commons.collections.MapIterator;
 import org.apache.commons.collections.OrderedMap;
 import org.apache.commons.collections.OrderedMapIterator;
@@ -59,16 +57,6 @@
  */
 public AbstractOrderedMapDecorator(OrderedMap map) {
 super(map);
-}
-
-/**
- * Gets the map being decorated.
- * 
- * @return the decorated map
- * @deprecated use decorated()
- */
-protected OrderedMap getOrderedMap() {
-return decorated();
 }
 
 /**

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java?view=diffrev=471189r1=471188r2=471189
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/map/AbstractSortedMapDecorator.java
 Sat Nov  4 05:57:57 2006
@@ -64,16 +64,6 @@
  * Gets the map being decorated.
  * 
  * @return the decorated map
- * @deprecated use decorated()
- */
-protected SortedMapK, V 

svn commit: r471192 - in /jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list: AbstractListDecorator.java FixedSizeList.java GrowthList.jav

2006-11-04 Thread scolebourne
Author: scolebourne
Date: Sat Nov  4 06:04:46 2006
New Revision: 471192

URL: http://svn.apache.org/viewvc?view=revrev=471192
Log:
Remove getList() - use decorated()

Modified:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/AbstractListDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/FixedSizeList.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/GrowthList.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/LazyList.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/UnmodifiableList.java

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/AbstractListDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/AbstractListDecorator.java?view=diffrev=471192r1=471191r2=471192
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/AbstractListDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/AbstractListDecorator.java
 Sat Nov  4 06:04:46 2006
@@ -59,16 +59,6 @@
  * Gets the list being decorated.
  * 
  * @return the decorated list
- * @deprecated use decorated()
- */
-protected ListE getList() {
-return decorated();
-}
-
-/**
- * Gets the list being decorated.
- * 
- * @return the decorated list
  */
 protected ListE decorated() {
 return (ListE) super.decorated();

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/FixedSizeList.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/FixedSizeList.java?view=diffrev=471192r1=471191r2=471192
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/FixedSizeList.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/FixedSizeList.java
 Sat Nov  4 06:04:46 2006
@@ -89,27 +89,27 @@
 }
 
 public Object get(int index) {
-return getList().get(index);
+return decorated().get(index);
 }
 
 public int indexOf(Object object) {
-return getList().indexOf(object);
+return decorated().indexOf(object);
 }
 
 public Iterator iterator() {
-return UnmodifiableIterator.decorate(getCollection().iterator());
+return UnmodifiableIterator.decorate(decorated().iterator());
 }
 
 public int lastIndexOf(Object object) {
-return getList().lastIndexOf(object);
+return decorated().lastIndexOf(object);
 }
 
 public ListIterator listIterator() {
-return new FixedSizeListIterator(getList().listIterator(0));
+return new FixedSizeListIterator(decorated().listIterator(0));
 }
 
 public ListIterator listIterator(int index) {
-return new FixedSizeListIterator(getList().listIterator(index));
+return new FixedSizeListIterator(decorated().listIterator(index));
 }
 
 public Object remove(int index) {
@@ -129,11 +129,11 @@
 }
 
 public Object set(int index, Object object) {
-return getList().set(index, object);
+return decorated().set(index, object);
 }
 
 public List subList(int fromIndex, int toIndex) {
-List sub = getList().subList(fromIndex, toIndex);
+List sub = decorated().subList(fromIndex, toIndex);
 return new FixedSizeList(sub);
 }
 

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/GrowthList.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/GrowthList.java?view=diffrev=471192r1=471191r2=471192
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/GrowthList.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/GrowthList.java
 Sat Nov  4 06:04:46 2006
@@ -118,11 

svn commit: r471201 - in /jakarta/commons/proper/collections/branches/collections_jdk5_branch/src: java/org/apache/commons/collections/bag/ test/org/apache/commons/collections/bag/

2006-11-04 Thread scolebourne
Author: scolebourne
Date: Sat Nov  4 06:17:26 2006
New Revision: 471201

URL: http://svn.apache.org/viewvc?view=revrev=471201
Log:
Remove getBag() - use covariant decorated()

Modified:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/AbstractBagDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/AbstractSortedBagDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/PredicatedBag.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/PredicatedSortedBag.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/UnmodifiableBag.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/UnmodifiableSortedBag.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/bag/TestPredicatedSortedBag.java

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/AbstractBagDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/AbstractBagDecorator.java?view=diffrev=471201r1=471200r2=471201
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/AbstractBagDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/AbstractBagDecorator.java
 Sat Nov  4 06:17:26 2006
@@ -57,25 +57,25 @@
  * 
  * @return the decorated bag
  */
-protected Bag getBag() {
-return (Bag) getCollection();
+protected Bag decorated() {
+return (Bag) super.decorated();
 }
 
 //---
 public int getCount(Object object) {
-return getBag().getCount(object);
+return decorated().getCount(object);
 }
 
 public boolean add(Object object, int count) {
-return getBag().add(object, count);
+return decorated().add(object, count);
 }
 
 public boolean remove(Object object, int count) {
-return getBag().remove(object, count);
+return decorated().remove(object, count);
 }
 
 public Set uniqueSet() {
-return getBag().uniqueSet();
+return decorated().uniqueSet();
 }
 
 }

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/AbstractSortedBagDecorator.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/AbstractSortedBagDecorator.java?view=diffrev=471201r1=471200r2=471201
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/AbstractSortedBagDecorator.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/AbstractSortedBagDecorator.java
 Sat Nov  4 06:17:26 2006
@@ -56,21 +56,21 @@
  * 
  * @return the decorated bag
  */
-protected SortedBag getSortedBag() {
-return (SortedBag) getCollection();
+protected SortedBag decorated() {
+return (SortedBag) super.decorated();
 }
 
 //---
 public Object first() {
-return getSortedBag().first();
+return decorated().first();
 }
 
 public Object last() {
-return getSortedBag().last();
+return decorated().last();
 }
 
 public Comparator comparator() {
-return getSortedBag().comparator();
+return decorated().comparator();
 }
 
 }

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/PredicatedBag.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/PredicatedBag.java?view=diffrev=471201r1=471200r2=471201
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/bag/PredicatedBag.java
 (original)
+++ 

svn commit: r471202 - in /jakarta/commons/proper/collections/branches/collections_jdk5_branch/src: java/org/apache/commons/collections/buffer/ java/org/apache/commons/collections/collection/ java/org/

2006-11-04 Thread scolebourne
Author: scolebourne
Date: Sat Nov  4 06:21:44 2006
New Revision: 471202

URL: http://svn.apache.org/viewvc?view=revrev=471202
Log:
Remove getCollection() - use covariant decorated()

Modified:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/PredicatedBuffer.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/UnmodifiableBuffer.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/AbstractCollectionDecorator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/PredicatedCollection.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/TransformedCollection.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/UnmodifiableBoundedCollection.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/UnmodifiableCollection.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/PredicatedList.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/list/UnmodifiableList.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/PredicatedSet.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/PredicatedSortedSet.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/UnmodifiableSet.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/set/UnmodifiableSortedSet.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/set/TestPredicatedSet.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/test/org/apache/commons/collections/set/TestPredicatedSortedSet.java

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/PredicatedBuffer.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/PredicatedBuffer.java?view=diffrev=471202r1=471201r2=471202
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/PredicatedBuffer.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/PredicatedBuffer.java
 Sat Nov  4 06:21:44 2006
@@ -81,17 +81,17 @@
  * 
  * @return the decorated buffer
  */
-protected Buffer getBuffer() {
-return (Buffer) getCollection();
+protected Buffer decorated() {
+return (Buffer) super.decorated();
 }
 
 //---
 public Object get() {
-return getBuffer().get();
+return decorated().get();
 }
 
 public Object remove() {
-return getBuffer().remove();
+return decorated().remove();
 }
 
 }

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/UnmodifiableBuffer.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/UnmodifiableBuffer.java?view=diffrev=471202r1=471201r2=471202
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/UnmodifiableBuffer.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/buffer/UnmodifiableBuffer.java
 Sat Nov  4 06:21:44 2006
@@ -97,7 +97,7 @@
 
 //---
 public Iterator iterator() {
-return UnmodifiableIterator.decorate(getCollection().iterator());
+return UnmodifiableIterator.decorate(decorated().iterator());
 }
 
 public boolean add(Object object) {

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/AbstractCollectionDecorator.java
URL: 

svn commit: r471203 - /jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/CompositeCollection.java

2006-11-04 Thread scolebourne
Author: scolebourne
Date: Sat Nov  4 06:28:02 2006
New Revision: 471203

URL: http://svn.apache.org/viewvc?view=revrev=471203
Log:
Whitespace change

Modified:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/CompositeCollection.java

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/CompositeCollection.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/CompositeCollection.java?view=diffrev=471203r1=471202r2=471203
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/CompositeCollection.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/collection/CompositeCollection.java
 Sat Nov  4 06:28:02 2006
@@ -41,13 +41,12 @@
  * @author Phil Steitz
  */
 public class CompositeCollection implements Collection {
-
+
 /** CollectionMutator to handle changes to the collection */
 protected CollectionMutator mutator;
-
 /** Collections in the composite */
 protected Collection[] all;
-
+
 /**
  * Create an empty CompositeCollection.
  */
@@ -55,7 +54,7 @@
 super();
 this.all = new Collection[0];
 }
-
+
 /**
  * Create a Composite Collection with only coll composited.
  * 
@@ -65,7 +64,7 @@
 this();
 this.addComposited(coll);
 }
-
+
 /**
  * Create a CompositeCollection with colls as the initial list of
  * composited collections.
@@ -76,7 +75,7 @@
 this();
 this.addComposited(colls);
 }
-
+
 //---
 /**
  * Gets the size of this composite collection.
@@ -92,7 +91,7 @@
 }
 return size;
 }
-
+
 /**
  * Checks whether this composite collection is empty.
  * p
@@ -108,7 +107,7 @@
 }
 return true;
 }
-
+
 /**
  * Checks whether this composite collection contains the object.
  * p
@@ -125,7 +124,7 @@
 }
 return false;
 }
-
+
 /**
  * Gets an iterator over all the collections in this composite.
  * p
@@ -146,7 +145,7 @@
 }
 return chain;
 }
-
+
 /**
  * Returns an array containing all of the elements in this composite.
  *
@@ -160,7 +159,7 @@
 }
 return result;
 }
-
+
 /**
  * Returns an object array, populating the supplied array if possible.
  * See codeCollection/code interface for full details.
@@ -173,8 +172,7 @@
 Object[] result = null;
 if (array.length = size) {
 result = array;
-}
-else {
+} else {
 result = (Object[]) 
Array.newInstance(array.getClass().getComponentType(), size);
 }
 
@@ -189,7 +187,7 @@
 }
 return result;
 }
-
+
 /**
  * Adds an object to the collection, throwing UnsupportedOperationException
  * unless a CollectionMutator strategy is specified.
@@ -209,7 +207,7 @@
 }
 return this.mutator.add(this, this.all, obj);
 }
-
+
 /**
  * Removes an object from the collection, throwing 
UnsupportedOperationException
  * unless a CollectionMutator strategy is specified.
@@ -228,7 +226,7 @@
 }
 return this.mutator.remove(this, this.all, obj);
 }
-
+
 /**
  * Checks whether this composite contains all the elements in the 
specified collection.
  * p
@@ -246,7 +244,7 @@
 }
 return true;
 }
-
+
 /**
  * Adds a collection of elements to this collection, throwing
  * UnsupportedOperationException unless a CollectionMutator strategy is 
specified.
@@ -266,7 +264,7 @@
 }
 return this.mutator.addAll(this, this.all, coll);
 }
-
+
 /**
  * Removes the elements in the specified collection from this composite 
collection.
  * p
@@ -286,7 +284,7 @@
 }
 return changed;
 }
-
+
 /**
  * Retains all the elements in the specified collection in this composite 
collection,
  * removing all others.
@@ -304,7 +302,7 @@
 }
 return changed;
 }
-
+
 /**
  * Removes all of the elements from this collection .
  * p
@@ -317,7 +315,7 @@
 this.all[i].clear();
 }
 }
-
+
 //---
 /**
  * Specify a CollectionMutator strategy instance to handle changes.
@@ -327,7 +325,7 @@
 public void setMutator(CollectionMutator mutator) {
 

svn commit: r471214 - /jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/

2006-11-04 Thread scolebourne
Author: scolebourne
Date: Sat Nov  4 07:21:01 2006
New Revision: 471214

URL: http://svn.apache.org/viewvc?view=revrev=471214
Log:
Generify

Modified:

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/Bag.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/BidiMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/Buffer.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/IterableMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/KeyValue.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/MapIterator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/OrderedBidiMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/OrderedIterator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/OrderedMap.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/OrderedMapIterator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/ResettableIterator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/ResettableListIterator.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/SortedBag.java

jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/SortedBidiMap.java

Modified: 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/Bag.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/Bag.java?view=diffrev=471214r1=471213r2=471214
==
--- 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/Bag.java
 (original)
+++ 
jakarta/commons/proper/collections/branches/collections_jdk5_branch/src/java/org/apache/commons/collections/Bag.java
 Sat Nov  4 07:21:01 2006
@@ -38,13 +38,14 @@
  * In an ideal world, the interface would be changed to fix the problems, 
however
  * it has been decided to maintain backwards compatibility instead.
  *
+ * @param E the type held in the bag
  * @since Commons Collections 2.0
  * @version $Revision$ $Date$
  * 
  * @author Chuck Burdick
  * @author Stephen Colebourne
  */
-public interface Bag extends Collection {
+public interface BagE extends CollectionE {
 
 /**
  * Returns the number of occurrences (cardinality) of the given
@@ -54,7 +55,7 @@
  * @param object  the object to search for
  * @return the number of occurrences of the object, zero if not found
  */
-int getCount(Object object);
+int getCount(E object);
 
 /**
  * i(Violation)/i
@@ -72,7 +73,7 @@
  * @param object  the object to add
  * @return codetrue/code if the object was not already in the 
codeuniqueSet/code
  */
-boolean add(Object object);
+boolean add(E object);
 
 /**
  * Adds codenCopies/code copies of the specified object to the Bag.
@@ -85,7 +86,7 @@
  * @param nCopies  the number of copies to add
  * @return codetrue/code if the object was not already in the 
codeuniqueSet/code
  */
-boolean add(Object object, int nCopies);
+boolean add(E object, int nCopies);
 
 /**
  * i(Violation)/i
@@ -111,7 +112,7 @@
  * @param nCopies  the number of copies to remove
  * @return codetrue/code if this call changed the collection
  */
-boolean remove(Object object, int nCopies);
+boolean remove(E object, int nCopies);
 
 /**
  * Returns a [EMAIL PROTECTED] Set} of unique elements in the Bag.
@@ -120,7 +121,7 @@
  * 
  * @return the Set of unique Bag elements
  */
-Set uniqueSet();
+SetE uniqueSet();
 
 /**
  * Returns the total number of items in the bag across all types.
@@ -145,7 +146,7 @@
  * @param coll  the collection to check against
  * @return codetrue/code if the Bag contains all the collection
  */
-boolean containsAll(Collection coll);
+boolean containsAll(Collection? coll);
 
 /**
  * i(Violation)/i
@@ -163,7 +164,7 @@
  * @param coll  the collection to remove
  * @return codetrue/code if this call changed the collection
  */
-boolean removeAll(Collection 

svn commit: r471219 - in /jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt: ElementDescriptor.java IntrospectionConfiguration.java

2006-11-04 Thread rdonkin
Author: rdonkin
Date: Sat Nov  4 07:40:34 2006
New Revision: 471219

URL: http://svn.apache.org/viewvc?view=revrev=471219
Log:
Fixed javadoc warnings

Modified:

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/ElementDescriptor.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java

Modified: 
jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/ElementDescriptor.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/ElementDescriptor.java?view=diffrev=471219r1=471218r2=471219
==
--- 
jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/ElementDescriptor.java
 (original)
+++ 
jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/ElementDescriptor.java
 Sat Nov  4 07:40:34 2006
@@ -309,8 +309,6 @@
 /**
  * Removes an element descriptor from this element descriptor. 
  * @param descriptor the codeElementDescriptor/code that will be 
removed.
- * 
- * @param descriptor
  */
 public void removeElementDescriptor(ElementDescriptor descriptor) {
 getElementList().remove(descriptor);

Modified: 
jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java?view=diffrev=471219r1=471218r2=471219
==
--- 
jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java
 (original)
+++ 
jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java
 Sat Nov  4 07:40:34 2006
@@ -483,7 +483,7 @@
  * This is used to suppress elements, e.g. for versioning.
  * 
  * @since 0.8
- * @param the strategy 
+ * @param elementSuppressionStrategy the strategy 
  */
 public void setElementSuppressionStrategy(
 ElementSuppressionStrategy elementSuppressionStrategy) {



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



svn commit: r471223 - /jakarta/commons/proper/betwixt/trunk/project.xml

2006-11-04 Thread rdonkin
Author: rdonkin
Date: Sat Nov  4 08:01:05 2006
New Revision: 471223

URL: http://svn.apache.org/viewvc?view=revrev=471223
Log:
Preparing for release candidate

Modified:
jakarta/commons/proper/betwixt/trunk/project.xml

Modified: jakarta/commons/proper/betwixt/trunk/project.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/betwixt/trunk/project.xml?view=diffrev=471223r1=471222r2=471223
==
--- jakarta/commons/proper/betwixt/trunk/project.xml (original)
+++ jakarta/commons/proper/betwixt/trunk/project.xml Sat Nov  4 08:01:05 2006
@@ -20,7 +20,7 @@
   nameBetwixt/name
   groupIdorg.apache.commons/groupId
   artifactIdcommons-betwixt/artifactId
-  currentVersion0.8-SNAPSHOT/currentVersion
+  currentVersion0.8-RC1/currentVersion
   inceptionYear2002/inceptionYear
   shortDescriptionCommons Betwixt/shortDescription
   descriptionCommons Betwixt: mapping beans to XML/description



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



RE: [collections-generics] [PROPOSAL] Remove all author and since version tags

2006-11-04 Thread Gary Gregory
 -Original Message-
 From: Stephen Colebourne [mailto:[EMAIL PROTECTED]
 Sent: Saturday, November 04, 2006 3:01 AM
 To: Jakarta Commons Developers List
 Subject: [collections-generics] [PROPOSAL] Remove all author and since
version
 tags
 
 As this is a 'new' project, I propose that we:
 
 - remove all @author tags - this complies with previous ASF board
 suggestions

+1

 - remove all @since tags - as its incompatible anyway, and will
probably
 end up in a separate package, these have no real meaning

If the plan is to put code that now has @since in a packages, then +1.

 Any dissenting opinions?
 First commits on this topic won't be until after 18th November 2006.
 
 Stephen
 
 -
 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]



svn commit: r471234 - in /jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt: ./ digester/ expression/ io/ io/read/ schema/ schema/strategy/ schema/strategy/impl/ strategy/ strat

2006-11-04 Thread rdonkin
Author: rdonkin
Date: Sat Nov  4 09:28:08 2006
New Revision: 471234

URL: http://svn.apache.org/viewvc?view=revrev=471234
Log:
Added @since tags based on clirr report.

Modified:

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/ElementDescriptor.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/IntrospectionConfiguration.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/Options.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/XMLIntrospector.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/digester/CommonRuleSet.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/expression/CollectionUpdater.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/expression/Context.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/expression/MethodExpression.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/io/BeanWriter.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/io/read/ElementMapping.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/io/read/ReadContext.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/schema/TranscriptionConfiguration.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/schema/strategy/SchemaTypeNamingStrategy.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/schema/strategy/impl/ClassNameSchemaNamingStrategy.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/schema/strategy/impl/ElementSchemaNamingStrategy.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/schema/strategy/impl/QualifiedPropertyTypeSchemaNamingStrategy.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/strategy/AttributeSuppressionStrategy.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/strategy/CapitalizeNameMapper.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/strategy/CollectiveTypeStrategy.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/strategy/DecapitalizeNameMapper.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/strategy/DefaultIdStoringStrategy.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/strategy/ElementSuppressionStrategy.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/strategy/HyphenatedNameMapper.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/strategy/IdStoringStrategy.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/strategy/ValueSuppressionStrategy.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/strategy/impl/OverrideCollectiveTypeStategy.java

jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/strategy/impl/propertysuppression/PackageSuppressor.java

Modified: 
jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/ElementDescriptor.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/ElementDescriptor.java?view=diffrev=471234r1=471233r2=471234
==
--- 
jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/ElementDescriptor.java
 (original)
+++ 
jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/ElementDescriptor.java
 Sat Nov  4 09:28:08 2006
@@ -235,6 +235,7 @@
 /**
  * Removes an attribute descriptor from this element descriptor. 
  * @param descriptor the codeAttributeDescriptor/code to be removed, 
not null
+ * @since 0.8
  */
 public void removeAttributeDescriptor(AttributeDescriptor descriptor) {
 getAttributeList().remove(descriptor);
@@ -267,6 +268,7 @@
  * @param name to search for; will be checked against the attributes' 
qualified name.
  * @return codeAttributeDescriptor/code with the given name,
  * or null if no descriptor has that name
+ * @since 0.8
  */
 public AttributeDescriptor getAttributeDescriptor(final String name) {
 for (int i = 0, size = attributeDescriptors.length; i  size; i++) {
@@ -309,6 +311,7 @@
 /**
  * Removes an element descriptor from this element descriptor. 
  * @param descriptor the codeElementDescriptor/code that will be 
removed.
+ * @since 0.8
  */
 public void removeElementDescriptor(ElementDescriptor descriptor) {
 getElementList().remove(descriptor);

Modified: 

[RESULT][VOTE] JCL dependency versions

2006-11-04 Thread Rahul Akolkar

This vote has failed.

-1 bayard, +1 rahul. No other votes.

It was suggested I should just dig in, which I shall, as time permits.

-Rahul


On 11/1/06, Rahul Akolkar [EMAIL PROTECTED] wrote:

Speaking of cross-commons, the JCL deps are all over the place. Which
is probably OK for now, since most variants are point releases (1.0,
1.0.2, 1.0.3, 1.0.4 being popular ATM).

Since JCL is the bottom rung of the ladder, we should do our bit and
move as one (i.e. if a component wants to up the JCL version, it
should be an [all] discussion, and all components should update trunk
such that their next RC matches up). We could restrict this to minor
or major release updates, but I don't see any harm in keeping the JCL
point release consistent as well.

[  ] +1 Sounds reasonable
[  ]  0
[  ] -1 Sounds unreasonable

-Rahul



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



svn commit: r471235 - /jakarta/commons/proper/betwixt/trunk/RELEASE-NOTES.txt

2006-11-04 Thread rdonkin
Author: rdonkin
Date: Sat Nov  4 09:42:26 2006
New Revision: 471235

URL: http://svn.apache.org/viewvc?view=revrev=471235
Log:
Added Java version to release notes.

Modified:
jakarta/commons/proper/betwixt/trunk/RELEASE-NOTES.txt

Modified: jakarta/commons/proper/betwixt/trunk/RELEASE-NOTES.txt
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/betwixt/trunk/RELEASE-NOTES.txt?view=diffrev=471235r1=471234r2=471235
==
--- jakarta/commons/proper/betwixt/trunk/RELEASE-NOTES.txt (original)
+++ jakarta/commons/proper/betwixt/trunk/RELEASE-NOTES.txt Sat Nov  4 09:42:26 
2006
@@ -5,7 +5,8 @@
 
 INTRODUCTION:
 
-Betwixt provides a flexible way to map beans into XML - and vice versa.
+Betwixt provides a flexible way to map beans into XML - and vice versa. Betwixt
+requires Java 1.3 or higher.
 
 Betwixt 0.8 is a feature release. Support for polymorphic mappings has been 
improved. 
 More flexible mapping are possible using new strategies.
@@ -52,4 +53,4 @@
  * ElementRule added forceAccessible attribute and configureDescriptor 
replaced by private method 
 with extra parameter
 
-   
\ No newline at end of file
+   



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



svn commit: r471236 - /jakarta/commons/proper/betwixt/trunk/build.xml

2006-11-04 Thread rdonkin
Author: rdonkin
Date: Sat Nov  4 09:43:03 2006
New Revision: 471236

URL: http://svn.apache.org/viewvc?view=revrev=471236
Log:
Regenerate ant build

Modified:
jakarta/commons/proper/betwixt/trunk/build.xml

Modified: jakarta/commons/proper/betwixt/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/betwixt/trunk/build.xml?view=diffrev=471236r1=471235r2=471236
==
--- jakarta/commons/proper/betwixt/trunk/build.xml (original)
+++ jakarta/commons/proper/betwixt/trunk/build.xml Sat Nov  4 09:43:03 2006
@@ -1,7 +1,7 @@
 ?xml version=1.0 encoding=UTF-8?
 
-!--build.xml generated by maven from project.xml version 0.8-SNAPSHOT
-  on date October 30 2006, time 1759--
+!--build.xml generated by maven from project.xml version 0.8-RC1
+  on date November 4 2006, time 1746--
 
 project default=jar name=commons-betwixt basedir=.
   property name=defaulttargetdir value=target
@@ -20,7 +20,7 @@
   /property
   property name=javadocdir value=dist/docs/api
   /property
-  property name=final.name value=commons-betwixt-0.8-SNAPSHOT
+  property name=final.name value=commons-betwixt-0.8-RC1
   /property
   path id=build.classpath
 fileset dir=${libdir}
@@ -152,7 +152,7 @@
 /tstamp
 property name=copyright value=Copyright amp;copy;  The Apache 
Software Foundation. All Rights Reserved.
 /property
-property name=title value=Betwixt 0.8-SNAPSHOT API
+property name=title value=Betwixt 0.8-RC1 API
 /property
 javadoc use=true private=true destdir=${javadocdir} author=true 
version=true sourcepath=src/java 
packagenames=org.apache.commons.betwixt.*
   classpath



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



svn commit: r471237 - /jakarta/commons/proper/betwixt/tags/BETWIXT_0_8_RC1/

2006-11-04 Thread rdonkin
Author: rdonkin
Date: Sat Nov  4 09:51:50 2006
New Revision: 471237

URL: http://svn.apache.org/viewvc?view=revrev=471237
Log:
Release candidate 1

Added:
jakarta/commons/proper/betwixt/tags/BETWIXT_0_8_RC1/
  - copied from r471236, jakarta/commons/proper/betwixt/trunk/


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



Re: [collections-generics] [PROPOSAL] Remove all author and since version tags

2006-11-04 Thread Sandy McArthur

On 11/4/06, Stephen Colebourne [EMAIL PROTECTED] wrote:

As this is a 'new' project, I propose that we:

- remove all @author tags - this complies with previous ASF board
suggestions


I maintain my position that if people didn't want their name there
they wouldn't have put it there and if someone put a non-trivial
amount of effort into something then they should receive credit. I
still think the ASF board's suggestion on this misguided unless they
are willing to anonymize the source repositories too.


- remove all @since tags - as its incompatible anyway, and will probably
end up in a separate package, these have no real meaning


I think all @since tags should be set to the first official release
they'll be in. While they provide little value for the first release
of code, their value increases over time as there are more official
releases. In a few years when my project at work is still using
collections 5.7 and collections 6.4 is the latest release it's nice to
be able to look at the Javadocs online and see if that method I want
to call has been around a while or in a newer release than the one
we're using.  If people never forgot to put them in it would be fine
to only have @since tags on code added since the beginning. Since
people do forget, if they are supposed to always be there then you can
use code inspection tools to check to see where they are missing when
preparing a release candidate.

--
Sandy McArthur

He who dares not offend cannot be honest.
- Thomas Paine

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



[all] The state of our dependency affairs

2006-11-04 Thread Rahul Akolkar

I scraped an alternative view of our repository, one where the
dependency is king, and our components are but minions:

 http://people.apache.org/~rahul/commons/DependencyCheck.html

At times, our trunks recommend differing major versions of our own
components. Minor mishaps aside. IMO, thats a good view to look at for
future releases.

I intend to indulge in a few changes that make me cringe less and less
when looking at that view, over the next few months, time permitting.
Feel free to join the cause (or, as is always an option, -1 individual
commits with good reason).

-Rahul

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



Re: [all] The state of our dependency affairs

2006-11-04 Thread Henri Yandell

Very nice :)

I'm all enthused with the nightly build stuff at the moment (which
makes it sucky that we don't actually have a machine to run it on
atm), this would be cool to run on the nightly build each night. Do
you have a script you can check in?

Hen

On 11/4/06, Rahul Akolkar [EMAIL PROTECTED] wrote:

I scraped an alternative view of our repository, one where the
dependency is king, and our components are but minions:

  http://people.apache.org/~rahul/commons/DependencyCheck.html

At times, our trunks recommend differing major versions of our own
components. Minor mishaps aside. IMO, thats a good view to look at for
future releases.

I intend to indulge in a few changes that make me cringe less and less
when looking at that view, over the next few months, time permitting.
Feel free to join the cause (or, as is always an option, -1 individual
commits with good reason).

-Rahul

-
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] The state of our dependency affairs

2006-11-04 Thread Rahul Akolkar

On 11/4/06, Henri Yandell [EMAIL PROTECTED] wrote:

Very nice :)

I'm all enthused with the nightly build stuff at the moment (which
makes it sucky that we don't actually have a machine to run it on
atm), this would be cool to run on the nightly build each night. Do
you have a script you can check in?


snip/

I only have a XP ThinkPad this weekend, so I hacked a Java class. Its
now posted here:

 http://people.apache.org/~rahul/commons/DependencyCheck.java

-Rahul



Hen

On 11/4/06, Rahul Akolkar [EMAIL PROTECTED] wrote:
 I scraped an alternative view of our repository, one where the
 dependency is king, and our components are but minions:

   http://people.apache.org/~rahul/commons/DependencyCheck.html

 At times, our trunks recommend differing major versions of our own
 components. Minor mishaps aside. IMO, thats a good view to look at for
 future releases.

 I intend to indulge in a few changes that make me cringe less and less
 when looking at that view, over the next few months, time permitting.
 Feel free to join the cause (or, as is always an option, -1 individual
 commits with good reason).

 -Rahul



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



[all] Nightly builds

2006-11-04 Thread Henri Yandell

Just as an fyi - I'm running the nightly builds on a home machine to
get a more recent snapshot out than the backups gave us. It's chugging
away at the moment, so we'll see how it goes.

Hen

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



[jira] Commented: (VFS-98) VFS causes deadlocks or is not thread-safe

2006-11-04 Thread Juha-Matti Toppinen (JIRA)
[ http://issues.apache.org/jira/browse/VFS-98?page=comments#action_12447180 
] 

Juha-Matti Toppinen commented on VFS-98:


Hi again.

I had some progress on this issue. The problem seems to occur only when a 
single FileObject is accessed from multiple threads. It works happily when 
using a single FileSystem, but accessing different files in it simultaneously.

For me the possible one-time errors caused by the lack of proper 
synchronization do not matter so much. But a deadlock on the FileSystem is 
really bad, causing may server to completely stop responding. So I played 
around trying to fix the problem by just commenting out syncronization stuff 
based on threaddump information. Not a the most professional method of working 
around a bug, but I desperately needed a workaround ;)

Eventually I got it working, and I'll just list the not-so-well-thought 
modifications I made, so you can maybe take a look at them and possibly use 
them as a basis for a proper fix...

AbstractFileProvider:
---
- replaced  private final Map fileSystems = new TreeMap(); with: private final 
Map fileSystems = java.util.Collections.synchronizedMap(new TreeMap()); in 
order to keep some thread-safety.
- commented out synchronization stuff from close(), addFileSystem(), 
findFileSystem() and freeUnusedResources()

These did not help yet, so I also made these modifications:

AbstractFileObject:
---
- commented out synchronization stuff from detach()

AbstractFileSystem:
---
- removed synchronized keywords from resolveFile(final FileName name) and 
resolveFile(final FileName name, final boolean useCache)

And no deadlocks anymore. Hope this helps!

 VFS causes deadlocks or is not thread-safe
 --

 Key: VFS-98
 URL: http://issues.apache.org/jira/browse/VFS-98
 Project: Commons VFS
  Issue Type: Bug
Affects Versions: Nightly Builds
 Environment: jdk1.5.0_07 / Linux
Reporter: Juha-Matti Toppinen
 Assigned To: Mario Ivankovits
 Attachments: vfs.dead.jstack.txt, 
 vfs.dead.threaddump.synchronizedfileobject.txt, vfs.dead.threaddump.txt


 Newer versions of VFS seems to be unusable in multithreading environments, 
 causing a deadlock of some kind. This causes my Java  web server application 
 to completely hang when there is many concurrent connections. My application 
 uses a single FileSystemManager instance, and makes quite heavy use of VFS; 
 opening many files from many threads simultaneously.
 I have tried, without success different workarounds based on some mailing 
 list threads:
 - Using both NullReferenceFilesCache and the default SoftReferenceFilesCache. 
 (SoftReferenceFilesCache seemed to sometimes cause some additional 
 thread-related exceptions under heavy load, but propably unrelated to this 
 issue)
 - Using the new SynchorizedFileObjectDecorator also did not help. On the 
 contrary, it seemed to trigger the deadlock more easily.
 The version I have problems with is a nightly build: commons-vfs-20060831
 The older version commons-vfs-20060115 works beautifully, but I would like to 
 use newer version because I want to be able to use FileObject.refresh() to 
 reset the internal state of files (specially, to get a fresh list of 
 children).
 I hope the threading issues are going to be resolved in near future, and I am 
 willing to help in any way. I do not have very deep experience about 
 multithreading applications, so I wasn't able to get more close to the roots 
 of the issue. Feel free to ask for more information.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[betwixt] please check RC1

2006-11-04 Thread robert burrell donkin
http://people.apache.org/~rdonkin/commons-betwixt

- robert



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



svn commit: r471316 - /jakarta/commons/proper/commons-build/trunk/nightly_wrapper.sh

2006-11-04 Thread psteitz
Author: psteitz
Date: Sat Nov  4 17:26:02 2006
New Revision: 471316

URL: http://svn.apache.org/viewvc?view=revrev=471316
Log:
Added wrapper for nightly build script kicked off by cron on vmbuild.

Added:
jakarta/commons/proper/commons-build/trunk/nightly_wrapper.sh   (with props)

Added: jakarta/commons/proper/commons-build/trunk/nightly_wrapper.sh
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/commons-build/trunk/nightly_wrapper.sh?view=autorev=471316
==
--- jakarta/commons/proper/commons-build/trunk/nightly_wrapper.sh (added)
+++ jakarta/commons/proper/commons-build/trunk/nightly_wrapper.sh Sat Nov  4 
17:26:02 2006
@@ -0,0 +1,30 @@
+#!/bin/sh
+#==
+# Wrapper for commons_nightly.sh
+# Updates build script, sets up environment, executes  and pipes output to log
+#==
+
+# Set up Java environment
+export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
+export ANT_HOME=/opt/apache-ant-1.6.5
+export JUNIT_HOME=$HOME/junit3.8.1
+export MAVEN_HOME=/opt/maven-1.0.2
+
+# Set Path
+export 
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:$HOME/bin:$JAVA_HOME/bin:$ANT_HOME/bin:$MAVEN_HOME/bin
+
+# Update script before executing
+cd /home/psteitz/trunks-proper/commons-build
+svn up commons_nightly.sh
+cp commons_nightly.sh /home/psteitz/bin
+chmod +x /home/psteitz/bin/commons_nightly.sh
+cd /home/psteitz
+
+time_stamp=`date +%Y%m%d` 
+# Execute script, piping output to log
+commons_nightly.sh  $HOME/log/commons_nightly.log 21
+
+# For now, scp the logs over to ~psteitz
+ssh people.apache.org mkdir 
/x1/home/psteitz/public_html/commons-nightlies/$time_stamp
+scp $HOME/log/* [EMAIL 
PROTECTED]:/x1/home/psteitz/public_html/commons-nightlies/$time_stamp
+

Propchange: jakarta/commons/proper/commons-build/trunk/nightly_wrapper.sh
--
svn:eol-style = native

Propchange: jakarta/commons/proper/commons-build/trunk/nightly_wrapper.sh
--
svn:executable = *



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



Re: [all] Nightly builds

2006-11-04 Thread Phil Steitz

Ugh.  I did not realize that vmbuild had taken a dive.  I just
committed the wrapper that I was using on vmbuild (nightly_wrapper.sh)
to commons-build.

Phil

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



Re: [all] Nightly builds

2006-11-04 Thread Henri Yandell

On 11/4/06, Henri Yandell [EMAIL PROTECTED] wrote:

Just as an fyi - I'm running the nightly builds on a home machine to
get a more recent snapshot out than the backups gave us. It's chugging
away at the moment, so we'll see how it goes.


beanutils - deployed 11:41am.

validator - deployed 17:41am.
vfs - building.

Damn - 6 hours and still going. Sandbox still to go. It's giving the
machine (a rather mundane 1Ghz P3) a definite workout.

Hen

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



Re: [all] The state of our dependency affairs

2006-11-04 Thread Craig McClanahan

On 11/4/06, Rahul Akolkar [EMAIL PROTECTED] wrote:


On 11/4/06, Henri Yandell [EMAIL PROTECTED] wrote:
 Very nice :)

 I'm all enthused with the nightly build stuff at the moment (which
 makes it sucky that we don't actually have a machine to run it on
 atm), this would be cool to run on the nightly build each night. Do
 you have a script you can check in?

snip/

I only have a XP ThinkPad this weekend, so I hacked a Java class. Its
now posted here:

  http://people.apache.org/~rahul/commons/DependencyCheck.java

-Rahul



How about setting up a jakarta zone on the Apache zones.apache.org machine?
That makes a nifty place for nightly builds for quite a few other projects.

Craig



Hen

 On 11/4/06, Rahul Akolkar [EMAIL PROTECTED] wrote:
  I scraped an alternative view of our repository, one where the
  dependency is king, and our components are but minions:
 
http://people.apache.org/~rahul/commons/DependencyCheck.html
 
  At times, our trunks recommend differing major versions of our own
  components. Minor mishaps aside. IMO, thats a good view to look at for
  future releases.
 
  I intend to indulge in a few changes that make me cringe less and less
  when looking at that view, over the next few months, time permitting.
  Feel free to join the cause (or, as is always an option, -1 individual
  commits with good reason).
 
  -Rahul
 

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




[jira] Created: (BEANUTILS-258) Improve Converter Implementations

2006-11-04 Thread Niall Pemberton (JIRA)
Improve Converter Implementations
-

 Key: BEANUTILS-258
 URL: http://issues.apache.org/jira/browse/BEANUTILS-258
 Project: Commons BeanUtils
  Issue Type: Improvement
Affects Versions: 1.7.0
Reporter: Niall Pemberton
 Assigned To: Niall Pemberton
Priority: Minor
 Fix For: 1.8.0


The Converter contract has the following signature

   public Object convert(Class, Object)

...which incudes the type (Class) that the value should be converted to. 
However all the Converter implementations in BeanUtils ignore this parameter 
and always convert to a specific type - for example IntegerConverter only ever 
converts to Integer values.

One of the weaknesses in BeanUtils is that conversion of an Object to a String 
is almost always done using the toString() method which, depending on the 
Class, can produce unhelpful values. IMO all Converter implementations should, 
at a minimum, support also support conversion from the type they handle to a 
String.

Theres two stages to this process:
1) Enhance Converter implementations to handle conversion to Strings.
2) Modify BeanUtils/PropertyUtils to delegate String conversion to the 
Converters.

In order to facilitate this, I'm adding a new AbstractConverter class which 
removes the need for duplciated boiler plate code. As well as providing a 
structure for conversion it also handles missing and invalid values in a 
uniform way.

I also have new NumberConverter and DateTimeConverter implementations which 
provide improved String conversion facilities:

1) Number Conversion
The existing number Converter implementations use String handling functions 
provided by the Number implementation. This has two main drawbacks - they don't 
handle String values containing thousand separators and they are fixed using a 
period (.) as the decimal separator making them only usable in Locales where 
that is the case. I'm adding a number Converter where a pattern can be 
specified for the format and/or a Locale specified to use different decimal 
symbols. This caters for the alternative Locale scenario and isn't intended to 
provide support for applications operating in a multiple Locale environment.

2) Date/Time Conversion
Currently there are only implementations for the java.sql.Date/Time/Timestamp 
types - java.util.Date and java.util.Calendar are not handled. I have a 
date/time Converter implementation that caters for all of these types. As 
people have indicated elsewhere converting from Strings to Date/Calendar poses 
problems. This implementation can be configured either to use the default 
format for a specified Locale or can be configured with a set of date 
patterns. This may not fully satisfy  String -- Date conversion 
requirements, but will at least provide something and importantly will provide 
Date conversion factilities where String is not involved (e.g. Date -- 
Calendar).

3) Array Conversion
I also have a generic array Converter implementation. It can convert to/from 
Arrays of any type. It does this by delegating the element conversion to a 
Converter of the appropriate type. As well as that it also caters for 
Collection -- Array conversion and provides addtiona configuraton options for 
parsing delimited String.

I'm going to start committing the changes to the Converters initially. If 
no-one objects to those, then I'll start looking at improving how 
BeanUtils/PropertyUtils uses/delegates to Converters.




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



svn commit: r471345 - /jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java

2006-11-04 Thread niallp
Author: niallp
Date: Sat Nov  4 18:49:09 2006
New Revision: 471345

URL: http://svn.apache.org/viewvc?view=revrev=471345
Log:
BEANUTILS-258 - Add new AbstractConverter base implementation

Added:

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java
   (with props)

Added: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java?view=autorev=471345
==
--- 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java
 (added)
+++ 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java
 Sat Nov  4 18:49:09 2006
@@ -0,0 +1,387 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.beanutils.converters;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.beanutils.ConversionException;
+import org.apache.commons.beanutils.Converter;
+
+/**
+ * Base [EMAIL PROTECTED] Converter} implementation that provides the structure
+ * for handling conversion bto/b and bfrom/b a specified type.
+ * p
+ * This implementation provides the basic structure for
+ * converting to/from a specified type optionally using a default
+ * value or throwing a [EMAIL PROTECTED] ConversionException} if a
+ * conversion error occurs.
+ * p
+ * Implementations should provide conversion to the specified
+ * type and from the specified type to a codeString/code value
+ * by implementing the following methods:
+ * ul
+ * licodeconvertToString(value)/code - convert to a String
+ *(default implementation uses the objects codetoString()/code
+ *method)./li
+ * licodeconvertToType(Class, value)/code - convert
+ * to the specified type/li
+ * /ul
+ *
+ * @version $Revision$ $Date$
+ * @since 1.8.0
+ */
+public abstract class AbstractConverter implements Converter {
+
+/**
+ * Logging for this instance.
+ */
+private Log log = LogFactory.getLog(getClass());
+
+/**
+ * The default type this codeConverter/code handles.
+ */
+private Class defaultType = null;
+
+/**
+ * Should we return the default value on conversion errors?
+ */
+private boolean useDefault = false;
+
+/**
+ * The default value specified to our Constructor, if any.
+ */
+private Object defaultValue = null;
+
+// --- Constructors
+
+/**
+ * Construct a iConverter/i that throws a
+ * codeConversionException/code if an error occurs.
+ *
+ * @param defaultType The default type this codeConverter/code
+ * handles
+ */
+public AbstractConverter(Class defaultType) {
+this.defaultType = defaultType;
+if (defaultType == null) {
+throw new IllegalArgumentException(Default type is missing.);
+}
+}
+
+/**
+ * Construct a iConverter/i that returns a default
+ * value if an error occurs.
+ *
+ * @param defaultType The default type this codeConverter/code
+ * handles
+ * @param defaultValue The default value to be returned
+ * if the value to be converted is missing or an error
+ * occurs converting the value.
+ */
+public AbstractConverter(Class defaultType, Object defaultValue) {
+this(defaultType);
+setDefaultValue(defaultValue);
+}
+
+// - Public Methods
+
+/**
+ * Set the default value, converting as required.
+ * p
+ * If the default value is different from the type the
+ * codeConverter/code handles, it will be converted
+ * to the handled type.
+ *
+ * @param defaultValue The default value to be returned
+ * if the value to be converted is missing or an error
+ * occurs converting the value.
+ * @throws ConversionException if 

svn commit: r471348 [2/2] - in /jakarta/commons/proper/beanutils/trunk/src: java/org/apache/commons/beanutils/ java/org/apache/commons/beanutils/converters/ test/org/apache/commons/beanutils/converter

2006-11-04 Thread niallp
Modified: 
jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/NumberConverterTestBase.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/NumberConverterTestBase.java?view=diffrev=471348r1=471347r2=471348
==
--- 
jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/NumberConverterTestBase.java
 (original)
+++ 
jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/NumberConverterTestBase.java
 Sat Nov  4 18:59:26 2006
@@ -17,10 +17,14 @@
 
 package org.apache.commons.beanutils.converters;
 
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Date;
+import java.util.Locale;
+
 import junit.framework.TestCase;
 
 import org.apache.commons.beanutils.ConversionException;
-import org.apache.commons.beanutils.Converter;
 
 
 /**
@@ -32,6 +36,9 @@
 
 public abstract class NumberConverterTestBase extends TestCase {
 
+/** Test Number values */
+protected Number[] numbers = new Number[4];
+
 // 
 
 public NumberConverterTestBase(String name) {
@@ -40,7 +47,8 @@
 
 // 
 
-protected abstract Converter makeConverter();
+protected abstract NumberConverter makeConverter();
+protected abstract NumberConverter makeConverter(Object defaultValue);
 protected abstract Class getExpectedType();
 
 // 
@@ -48,7 +56,7 @@
 /**
  * Assumes ConversionException in response to 
covert(getExpectedType(),null).
  */
-public void testConvertNull() throws Exception {
+public void testConvertNull() {
 try {
 makeConverter().convert(getExpectedType(),null);
 fail(Expected ConversionException);
@@ -61,14 +69,16 @@
  * Assumes convert(getExpectedType(),Number) returns some non-null
  * instance of getExpectedType().
  */
-public void testConvertNumber() throws Exception {
+public void testConvertNumber() {
 String[] message= { 
 from Byte,
 from Short,
 from Integer,
 from Long,
 from Float,
-from Double
+from Double,
+from BigDecimal,
+from BigInteger
 };
 
 Object[] number = {
@@ -77,7 +87,9 @@
 new Integer(9),
 new Long(10),
 new Float(11.1),
-new Double(12.2)
+new Double(12.2),
+new BigDecimal(17.2),
+new BigInteger(33)
 };
 
 for(int i=0;inumber.length;i++) {
@@ -86,6 +98,249 @@
 assertTrue(
 Convert  + message[i] +  should return a  + 
getExpectedType().getName(), 
 getExpectedType().isInstance(val));
+}
+}
+/**
+ * Convert Number -- String (using a Pattern, with default and specified 
Locales)  
+ */
+public void testNumberToStringPattern() {
+
+// Re-set the default Locale to Locale.US
+Locale defaultLocale = Locale.getDefault();
+Locale.setDefault(Locale.US);
+
+NumberConverter converter = makeConverter();
+converter.setPattern([0,0.0];(0,0.0));
+
+// Default Locale
+assertEquals(Default Locale  + numbers[0], (12.0), 
converter.convert(String.class, numbers[0]));
+assertEquals(Default Locale  + numbers[1], [13.0], 
converter.convert(String.class, numbers[1]));
+
+// Locale.GERMAN
+converter.setLocale(Locale.GERMAN);
+assertEquals(Locale.GERMAN  + numbers[2], (22,0), 
converter.convert(String.class, numbers[2]));
+assertEquals(Locale.GERMAN  + numbers[3], [23,0], 
converter.convert(String.class, numbers[3]));
+
+// Restore the default Locale
+Locale.setDefault(defaultLocale);
+}
+
+/**
+ * Convert Number -- String (using default and specified Locales)  
+ */
+public void testNumberToStringLocale() {
+
+// Re-set the default Locale to Locale.US
+Locale defaultLocale = Locale.getDefault();
+Locale.setDefault(Locale.US);
+
+NumberConverter converter = makeConverter();
+converter.setUseLocaleFormat(true);
+
+// Default Locale
+assertEquals(Default Locale  + numbers[0], -12, 
converter.convert(String.class, numbers[0]));
+assertEquals(Default Locale  + numbers[1], 13,  
converter.convert(String.class, numbers[1]));
+
+// Locale.GERMAN
+converter.setLocale(Locale.GERMAN);
+assertEquals(Locale.GERMAN  + numbers[2], -22, 
converter.convert(String.class, numbers[2]));
+assertEquals(Locale.GERMAN  + numbers[3], 

Re: [PROPOSAL] Major versions require package name change

2006-11-04 Thread Phil Steitz

On 11/1/06, Stephen Colebourne [EMAIL PROTECTED] wrote:

An attempt at a summary on this topic.

The majority view on the thread was that a major version should not be
mandated to mean a package rename. Instead, the view most widely
expressed was that this should be a component decision.

A second angle to emerge is that a 'large non-compatible change', as per
[collections] for generics, may in fact be a change larger than our
current major version number expresses. Going forward, this may argue
for a different component name, if package renaming does not have
widespread support.

I'm not planning on bringing this to a vote, as it would be defeated as is.

Stephen



Sorry to be late to the party on this.  I have been a little busy, but
honestly mostly just unable to make up my mind on where I come down on
the core issue. I agree that this is a very important issue and I
thank you for raising it.  While we have a long tradition of allowing
individual components to make their own decisions, I think that when
it comes to version numbering and compatibility rules, we really
should have a common strategy.  I like the rules that apr uses
(http://apr.apache.org/versioning.html), which (translated to Java)
are close to conventional practice in commons.

I agree with Niall that we should use deprecation and other means to
progress things while preserving compatibility, but understand that
there are situations where really significant incompatible change is
necessary.  In that case, I support the recommendation in the
proposal, and I would be +1 to requiring a package name change to
signal this.  One thing that we might consider, though, is allowing
the package name change to be only at the lowest level - i.e., the
subpackage containing the incompatible change, e.g.
org.apache.commons.math.linear2 as opposed to o.a.c.math2.  I would
still want to see the component version number moved a major increment
in this case.

Phil

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



svn commit: r471349 - in /jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters: CalendarConverter.java DateConverter.java DateTimeConverter.java

2006-11-04 Thread niallp
Author: niallp
Date: Sat Nov  4 19:03:59 2006
New Revision: 471349

URL: http://svn.apache.org/viewvc?view=revrev=471349
Log:
BEANUTILS-255 - add new Converter implementations to support java.util.Date and 
java.util.Calendar.
(I have test cases and also plan to switch the existing 
java.sql.Date/Time/Timestamp Converters to
use the new generic DateTimeConverter implementation. Holding them back for now 
to give time for comments)

Added:

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/CalendarConverter.java
   (with props)

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/DateConverter.java
   (with props)

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/DateTimeConverter.java
   (with props)

Added: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/CalendarConverter.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/CalendarConverter.java?view=autorev=471349
==
--- 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/CalendarConverter.java
 (added)
+++ 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/CalendarConverter.java
 Sat Nov  4 19:03:59 2006
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.beanutils.converters;
+
+import java.util.Calendar;
+
+/**
+ * [EMAIL PROTECTED] DateTimeConverter} implementation that handles conversion 
to
+ * and from bjava.util.Calendar/b objects.
+ * p
+ * This implementation can be configured to handle conversion either
+ * by using a Locale's default format or by specifying a set of format
+ * patterns (note, there is no default String conversion for Calendar).
+ * See the [EMAIL PROTECTED] DateTimeConverter} documentation for further 
details.
+ * p
+ * Can be configured to either return a idefault value/i or throw a
+ * codeConversionException/code if a conversion error occurs.
+ *
+ * @version $Revision$
+ * @since 1.8.0
+ */
+public final class CalendarConverter extends DateTimeConverter {
+
+/**
+ * Construct a bjava.util.Calendar/b iConverter/i that throws
+ * a codeConversionException/code if an error occurs.
+ */
+public CalendarConverter() {
+super(Calendar.class);
+}
+
+/**
+ * Construct a bjava.util.Calendar/b iConverter/i that returns
+ * a default value if an error occurs.
+ *
+ * @param defaultValue The default value to be returned
+ * if the value to be converted is missing or an error
+ * occurs converting the value.
+ */
+public CalendarConverter(Object defaultValue) {
+super(Calendar.class, defaultValue);
+}
+
+}

Propchange: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/CalendarConverter.java
--
svn:eol-style = native

Propchange: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/CalendarConverter.java
--
svn:keywords = Date Author Id Revision HeadURL

Added: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/DateConverter.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/DateConverter.java?view=autorev=471349
==
--- 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/DateConverter.java
 (added)
+++ 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/DateConverter.java
 Sat Nov  4 19:03:59 2006
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for 

svn commit: r471350 - in /jakarta/commons/proper/beanutils/trunk/src: java/org/apache/commons/beanutils/converters/ test/org/apache/commons/beanutils/converters/

2006-11-04 Thread niallp
Author: niallp
Date: Sat Nov  4 19:10:58 2006
New Revision: 471350

URL: http://svn.apache.org/viewvc?view=revrev=471350
Log:
BEANUTILS-258 - Switch other Converter implementations to use the new 
AbstractConverter class and add new JUnit tests for CharacterConverter and 
ClassConverter

Added:

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/CharacterConverterTestCase.java
   (with props)

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/ClassConverterTestCase.java
   (with props)
Modified:

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/BooleanConverter.java

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/CharacterConverter.java

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/ClassConverter.java

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/FileConverter.java

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/URLConverter.java

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/BooleanConverterTestCase.java

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/URLConverterTestCase.java

Modified: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/BooleanConverter.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/BooleanConverter.java?view=diffrev=471350r1=471349r2=471350
==
--- 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/BooleanConverter.java
 (original)
+++ 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/BooleanConverter.java
 Sat Nov  4 19:10:58 2006
@@ -14,21 +14,21 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */ 
-
-
 package org.apache.commons.beanutils.converters;
 
 import org.apache.commons.beanutils.ConversionException;
 import org.apache.commons.beanutils.Converter;
 
-
 /**
- * pStandard [EMAIL PROTECTED] Converter} implementation that converts an 
incoming
- * String into a codejava.lang.Boolean/code object, optionally using a
- * default value or throwing a [EMAIL PROTECTED] ConversionException} if a 
conversion
- * error occurs./p
- *
- * pBy default any object whose string representation is one of the values
+ * Generic [EMAIL PROTECTED] Converter} implementaion that handles conversion
+ * to and from barray/b objects.
+ * [EMAIL PROTECTED] org.apache.commons.beanutils.Converter} implementaion that
+ * handles conversion to and from bjava.lang.Boolean/b objects.
+ * p
+ * Can be configured to either return a idefault value/i or throw a
+ * codeConversionException/code if a conversion error occurs.
+ * p
+ * By default any object whose string representation is one of the values
  * {yes, y, true, on, 1} is converted to Boolean.TRUE, and 
  * string representations {no, n, false, off, 0} are converted
  * to Boolean.FALSE. The recognised true/false strings can be changed by:
@@ -53,8 +53,7 @@
  * @version $Revision$ $Date$
  * @since 1.3
  */
-
-public final class BooleanConverter implements Converter {
+public final class BooleanConverter extends AbstractConverter {
 
 
 // --- Constructors
@@ -66,9 +65,7 @@
  * not one of the known true strings, nor one of the known false strings.
  */
 public BooleanConverter() {
-
-this.useDefault = false;
-
+super(Boolean.class);
 }
 
 
@@ -85,14 +82,32 @@
  *  in which case this constructor acts like the no-argument one.
  */
 public BooleanConverter(Object defaultValue) {
-
-if (defaultValue == NO_DEFAULT) {
-this.useDefault = false;
-} else {
-this.defaultValue = defaultValue;
-this.useDefault = true;
+super(Boolean.class);
+if (defaultValue != NO_DEFAULT) {
+setDefaultValue(defaultValue);
 }
+}
 
+/**
+ * Create a [EMAIL PROTECTED] Converter} that will throw a [EMAIL 
PROTECTED] ConversionException}
+ * if a conversion error occurs, ie the string value being converted is
+ * not one of the known true strings, nor one of the known false strings.
+ * p
+ * The provided string arrays are copied, so that changes to the elements
+ * of the array after this call is made do not affect this object.
+ *
+ * @param trueStrings is the set of strings which should convert to the
+ *  value Boolean.TRUE. The value null must not be present. Case is
+ *  ignored.
+ *
+ * @param falseStrings is the 

svn commit: r471351 - in /jakarta/commons/proper/beanutils/trunk/src: java/org/apache/commons/beanutils/converters/ArrayConverter.java test/org/apache/commons/beanutils/converters/ArrayConverterTestCa

2006-11-04 Thread niallp
Author: niallp
Date: Sat Nov  4 19:13:20 2006
New Revision: 471351

URL: http://svn.apache.org/viewvc?view=revrev=471351
Log:
BEANUTILS-242 - Add generic ArrayConverter

Added:

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/ArrayConverter.java
   (with props)

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/ArrayConverterTestCase.java
   (with props)

Added: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/ArrayConverter.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/ArrayConverter.java?view=autorev=471351
==
--- 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/ArrayConverter.java
 (added)
+++ 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/ArrayConverter.java
 Sat Nov  4 19:13:20 2006
@@ -0,0 +1,352 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.beanutils.converters;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Collection;
+import java.io.StreamTokenizer;
+import java.io.StringReader;
+import java.io.IOException;
+import java.lang.reflect.Array;
+import org.apache.commons.beanutils.ConversionException;
+import org.apache.commons.beanutils.Converter;
+
+/**
+ * Generic [EMAIL PROTECTED] Converter} implementaion that handles conversion
+ * to and from barray/b objects.
+ * p
+ * Can be configured to either return a idefault value/i or throw a
+ * codeConversionException/code if a conversion error occurs.
+ * p
+ * The main features of this implementation are:
+ * ul
+ * libElement Conversion/b - delegates to a [EMAIL PROTECTED] 
Converter},
+ * appropriate for the type, to convert individual elements
+ * of the array. This leverages the power of existing converters
+ * without having to replicate their functionality for converting
+ * to the element type and removes the need to create a specifc
+ * array type converters./li
+ * libArrays or Collections/b - can convert from either arrays or
+ * Collections to an array, limited only by the capability
+ * of the delegate [EMAIL PROTECTED] Converter}./li
+ * libDelimited Lists/b - can Convert bto/b and bfrom/b a
+ * delimited list in String format./li
+ * libMulti Dimensional Arrays/b - its possible to convert to
+ * multi-dimensional arrays, by embedding [EMAIL PROTECTED] 
ArrayConverter}
+ * within each other - see example below./li
+ * /ul
+ *
+ * h3Parsing Delimited Lists/h3
+ * This implementation can convert a delimited list in codeString/code 
format
+ * into an array of the appropriate type. By default, it uses a comma as the 
delimiter
+ * but the following methods can be used to configure parsing:
+ * ul
+ * licodesetDelimiter(char)/code - allows the character used as
+ * the delimiter to be configured [default is a comma]./li
+ * licodesetAllowedChars(char[])/code - adds additional characters
+ * (to the default alphabetic/numeric) to those considered to be
+ * valid token characters.
+ * /ul
+ *
+ * h3Multi Dimensional Arrays/h3
+ * It is possible to convert to mulit-dimensional arrays by using
+ * [EMAIL PROTECTED] ArrayConverter} as the element [EMAIL PROTECTED] 
Converter}
+ * within another [EMAIL PROTECTED] ArrayConverter}.
+ * p
+ * For example, the following code demonstrates how to construct a [EMAIL 
PROTECTED] Converter}
+ * to convert a delimited codeString/code into a two dimensional integer 
array:
+ * p
+ * pre
+ *// Construct an Integer Converter
+ *IntegerConverter integerConverter = new IntegerConverter();
+ *
+ *// Construct an array Converter for an integer array (i.e. int[]) using
+ *// an IntegerConverter as the element converter.
+ *// N.B. Uses the default comma (i.e. ,) as the delimiter between 
individual numbers
+ *ArrayConverter 

[jira] Commented: (BEANUTILS-257) Many of the helper methods expose the java.lang exceptions. I'd like to convert them to RuntimeExceptions

2006-11-04 Thread Henri Yandell (JIRA)
[ 
http://issues.apache.org/jira/browse/BEANUTILS-257?page=comments#action_12447216
 ] 

Henri Yandell commented on BEANUTILS-257:
-

Hi Aaron,

It's probably better to bring this up as an email on commons-dev to see what 
people think. The danger of doing a patch at the moment is that we're just 
starting to get to work on a minor release containing the various fixes of the 
last couple of years and the mountain of issues in JIRA and your change would 
be a major release change. Any patch you make at the moment is likely to be too 
dated by the time it comes to apply it.

 Many of the helper methods expose the java.lang exceptions. I'd like to 
 convert them to RuntimeExceptions
 -

 Key: BEANUTILS-257
 URL: http://issues.apache.org/jira/browse/BEANUTILS-257
 Project: Commons BeanUtils
  Issue Type: Improvement
Affects Versions: 1.8.0
Reporter: Aaron Digulla

 Hello,
 A lot of the helper functions throw checked exceptions (mostly 
 IllegalAccessException, InvocationTargetException and NoSuchMethodException). 
 I'd like to write a patch which converts them all into RuntimeExceptions so 
 the code upstream doesn't have to handle them.
 Rationale: When working with properties, you usually expect the code to work. 
 When working with dynamic properties, you don't care about what went wrong 
 but only that something went wrong. In most cases, it's not possible to fix 
 the problem automatically but the code has to pass the exception up.
 This all calls for non-checked exceptions.
 My patch would be against the SVN version and contain these changes:
 - The old methods would still be there with an E at the end (for throws a 
 checked exception).
 - The new code would throw exceptions based on a common exception so you can 
 catch all the exceptions thrown in beanutils in one statement. IAE, ITE, etc. 
 would then be derived from this base class so you can still filter them.
 Since this is going to involve some work, I wanted to ask beforehand if you 
 would accept such a patch.
 Best regards.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Reopened: (BEANUTILS-66) [beanutils] MethodUtils.getAccessibleMethod does not work for enums

2006-11-04 Thread Henri Yandell (JIRA)
 [ http://issues.apache.org/jira/browse/BEANUTILS-66?page=all ]

Henri Yandell reopened BEANUTILS-66:


 
Re-opening to signify that there are problems with beanutils and enums.

 [beanutils] MethodUtils.getAccessibleMethod does not work for enums
 ---

 Key: BEANUTILS-66
 URL: http://issues.apache.org/jira/browse/BEANUTILS-66
 Project: Commons BeanUtils
  Issue Type: Bug
 Environment: Operating System: other
 Platform: Other
Reporter: Chris

 I dont know if this is supposed to work or not, but it would be nice if 
 MethodUtils.getAccessibleMethod correctly detected accessible enum methods.  
 I 
 am in the most recent production beanutils.jar (1.7.0).
 I have an enum like this in its own file:
 public enum DataEditDataType {
   /** string data type */
   STRING {
 @Override
 public String getValueName() {
   return string;
 }
 
   },  ...
 Then I am getting the property descriptor ok
 PropertyDescriptor propertyDescriptor = PropertyUtils.getPropertyDescriptor
 (DataEditDataType.STRING, valueName);
 Then the method is fine
 Method method = propertyDescriptor.getReadMethod();
 But then it is seen as not accessible
 Method method = MethodUtils.getAccessibleMethod(method);
 Which return null
 The problem is line 415 of MethodUtils
 // If the declaring class is public, we are done
 Class clazz = method.getDeclaringClass();
 if (Modifier.isPublic(clazz.getModifiers())) {
 return (method);
 }
 For some reason, Modifer.isPrivate(clazz.getModifiers()) returns true (since 
 STRING is a subclass of the DataEditDataType enum.  but this is an enum 
 (DataEditDataType) which is publicly available???   There could be a line 
 here 
 to see if it is an enum, then if the superclass is public in which case it is 
 ok?  Something like this
 if (Enum.class.isAssignableFrom(clazz)  
 Modifier.isPublic(clazz.getSuperclass
 ().getModifiers()) {
   return method;
 }
 That would work for me, but not sure if it would work in all cases or break 
 something else or if there is another workaround I can do for my enum code.
 Thanks!
 Chris

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



svn commit: r471352 - in /jakarta/commons/proper/beanutils/trunk/src: java/org/apache/commons/beanutils/converters/ test/org/apache/commons/beanutils/converters/

2006-11-04 Thread niallp
Author: niallp
Date: Sat Nov  4 19:34:09 2006
New Revision: 471352

URL: http://svn.apache.org/viewvc?view=revrev=471352
Log:
BEANUTILS-255 - Add new generic DateTimeConverter implementation which support 
java.util.Date and java.util.Calendar and switch exisiting java.sql.Date, 
java.sql.Time and java.sql.Timestamp to use the new implementation. There was 
some disagreement about whether we should have support for this in BeanUtils 
(sse comments on JIRA/mailing list) - however, thought I would commit it for 
review - easily reverted in SVN if there are objections.

Added:

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/CalendarConverterTestCase.java
   (with props)

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/DateConverterTestCase.java
   (with props)
Modified:

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/SqlDateConverter.java

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/SqlTimeConverter.java

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/SqlTimestampConverter.java

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/DateConverterTestBase.java

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/SqlDateConverterTestCase.java

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/SqlTimeConverterTestCase.java

jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/SqlTimestampConverterTestCase.java

Modified: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/SqlDateConverter.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/SqlDateConverter.java?view=diffrev=471352r1=471351r2=471352
==
--- 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/SqlDateConverter.java
 (original)
+++ 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/SqlDateConverter.java
 Sat Nov  4 19:34:09 2006
@@ -14,122 +14,46 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.apache.commons.beanutils.converters;
 
-
 import java.sql.Date;
-import java.util.Calendar;
-
-import org.apache.commons.beanutils.ConversionException;
-import org.apache.commons.beanutils.Converter;
-
 
 /**
- * pStandard [EMAIL PROTECTED] Converter} implementation that converts an 
incoming
- * String into a codejava.sql.Date/code object, optionally using a
- * default value or throwing a [EMAIL PROTECTED] ConversionException} if a 
conversion
- * error occurs./p
+ * [EMAIL PROTECTED] DateTimeConverter} implementation that handles conversion 
to
+ * and from bjava.sql.Date/b objects.
+ * p
+ * This implementation can be configured to handle conversion either
+ * by using java.sql.Date's default String conversion, or by using a
+ * Locale's default format or by specifying a set of format patterns.
+ * See the [EMAIL PROTECTED] DateTimeConverter} documentation for further 
details.
+ * p
+ * Can be configured to either return a idefault value/i or throw a
+ * codeConversionException/code if a conversion error occurs.
  *
  * @author Craig R. McClanahan
  * @version $Revision$ $Date$
  * @since 1.3
  */
-
-public final class SqlDateConverter implements Converter {
-
-
-// --- Constructors
-
+public final class SqlDateConverter extends DateTimeConverter {
 
 /**
- * Create a [EMAIL PROTECTED] Converter} that will throw a [EMAIL 
PROTECTED] ConversionException}
- * if a conversion error occurs.
+ * Construct a bjava.sql.Date/b iConverter/i that throws
+ * a codeConversionException/code if an error occurs.
  */
 public SqlDateConverter() {
-
-this.defaultValue = null;
-this.useDefault = false;
-
+super(Date.class);
 }
 
-
 /**
- * Create a [EMAIL PROTECTED] Converter} that will return the specified 
default value
- * if a conversion error occurs.
+ * Construct a bjava.sql.Date/b iConverter/i that returns
+ * a default value if an error occurs.
  *
  * @param defaultValue The default value to be returned
+ * if the value to be converted is missing or an error
+ * occurs converting the value.
  */
 public SqlDateConverter(Object defaultValue) {
-
-this.defaultValue = defaultValue;
-this.useDefault = true;
-
-}
-
-
-// - Instance Variables
-
-
-/**
- * The default value specified to our Constructor, if any.
- 

svn commit: r471353 - in /jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale: BaseLocaleConverter.java LocaleConvertUtilsBean.java LocaleConverter.java

2006-11-04 Thread niallp
Author: niallp
Date: Sat Nov  4 19:35:20 2006
New Revision: 471353

URL: http://svn.apache.org/viewvc?view=revrev=471353
Log:
minor javadoc changes

Modified:

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/BaseLocaleConverter.java

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleConvertUtilsBean.java

jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleConverter.java

Modified: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/BaseLocaleConverter.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/BaseLocaleConverter.java?view=diffrev=471353r1=471352r2=471353
==
--- 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/BaseLocaleConverter.java
 (original)
+++ 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/BaseLocaleConverter.java
 Sat Nov  4 19:35:20 2006
@@ -147,8 +147,9 @@
  *
  * @param value The input object to be converted
  * @param pattern The pattern is used for the convertion
+ * @return The converted value
  *
- * @exception ConversionException if conversion cannot be performed
+ * @exception ParseException if conversion cannot be performed
  *  successfully
  */
 
@@ -160,6 +161,7 @@
  * The default pattern is used for the convertion.
  *
  * @param value The input object to be converted
+ * @return The converted value
  *
  * @exception ConversionException if conversion cannot be performed
  *  successfully
@@ -173,6 +175,7 @@
  *
  * @param value The input object to be converted
  * @param pattern The pattern is used for the convertion
+ * @return The converted value
  *
  * @exception ConversionException if conversion cannot be performed
  *  successfully

Modified: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleConvertUtilsBean.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleConvertUtilsBean.java?view=diffrev=471353r1=471352r2=471353
==
--- 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleConvertUtilsBean.java
 (original)
+++ 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleConvertUtilsBean.java
 Sat Nov  4 19:35:20 2006
@@ -17,6 +17,7 @@
  
 package org.apache.commons.beanutils.locale;
 
+import org.apache.commons.beanutils.ConversionException;
 import 
org.apache.commons.beanutils.locale.converters.BigDecimalLocaleConverter;
 import 
org.apache.commons.beanutils.locale.converters.BigIntegerLocaleConverter;
 import org.apache.commons.beanutils.locale.converters.ByteLocaleConverter;

Modified: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleConverter.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleConverter.java?view=diffrev=471353r1=471352r2=471353
==
--- 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleConverter.java
 (original)
+++ 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/locale/LocaleConverter.java
 Sat Nov  4 19:35:20 2006
@@ -39,8 +39,8 @@
  * @param value The input value to be converted
  * @param pattern The user-defined pattern is used for the input object 
formatting.
  *
- * @exception ConversionException if conversion cannot be performed
- *  successfully
+ * @exception org.apache.commons.beanutils.ConversionException if 
conversion
+ * cannot be performed successfully
  */
 public Object convert(Class type, Object value, String pattern);
 }



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



svn commit: r471355 - /jakarta/commons/proper/beanutils/trunk/build.properties.sample

2006-11-04 Thread niallp
Author: niallp
Date: Sat Nov  4 19:38:41 2006
New Revision: 471355

URL: http://svn.apache.org/viewvc?view=revrev=471355
Log:
Add example of configuring Commons Logging in maven

Modified:
jakarta/commons/proper/beanutils/trunk/build.properties.sample

Modified: jakarta/commons/proper/beanutils/trunk/build.properties.sample
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/build.properties.sample?view=diffrev=471355r1=471354r2=471355
==
--- jakarta/commons/proper/beanutils/trunk/build.properties.sample (original)
+++ jakarta/commons/proper/beanutils/trunk/build.properties.sample Sat Nov  4 
19:38:41 2006
@@ -32,6 +32,12 @@
 # The pathname of the junit.jar JAR file
 junit.jar = ${junit.home}/junit.jar
 
+# Configuration Example for Commons Logging in maven
+maven.junit.fork=true
+maven.junit.sysproperties=org.apache.commons.logging.LogFactory 
org.apache.commons.logging.Log org.apache.commons.logging.simplelog.defaultlog
+org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
+org.apache.commons.logging.simplelog.defaultlog=debug
 
 # Maven properties (for web site build)
 # Those committers using agents may like to use



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



[jira] Commented: (BEANUTILS-242) Add general array type conversion

2006-11-04 Thread Niall Pemberton (JIRA)
[ 
http://issues.apache.org/jira/browse/BEANUTILS-242?page=comments#action_12447218
 ] 

Niall Pemberton commented on BEANUTILS-242:
---

I have just commited the generic array converter - also created a JIRA 
encompassing a whole load of Converter refactorings. See BEANUTILS-258

 Add general array type conversion
 -

 Key: BEANUTILS-242
 URL: http://issues.apache.org/jira/browse/BEANUTILS-242
 Project: Commons BeanUtils
  Issue Type: New Feature
Affects Versions: 1.7.0
Reporter: Kenny MacLeod

 When using a method such as BeanUtils.copyProperty(), it would be good if it 
 could automatically handle conversion between array types, rather than having 
 to explicitly write an array converter for each target type.
 For example, if I pass a String[] to BeanUtils to copy on to a property of 
 type Integer[], then it would recognise the presense of an array, and then 
 use the registered converters for the arrays' component types to decide how 
 to map them together.
 This would remove the need to essentially duplicate converters already 
 written, just to add array support.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Commented: (BEANUTILS-255) ConvertUtilsBean does not support converts to a java.util.Date

2006-11-04 Thread Niall Pemberton (JIRA)
[ 
http://issues.apache.org/jira/browse/BEANUTILS-255?page=comments#action_12447220
 ] 

Niall Pemberton commented on BEANUTILS-255:
---

I've added/updated support for java.util.Date and java.util.Calendar - 99% of 
the work is in the new DateTimeConverter implementation. I thought I do commit 
then review, rather than other way round - since its easily reverted in SVN if 
there are still objections.

http://svn.apache.org/viewvc?view=revrevision=471352

For java.util.Date and java.util.Calendar it can be configured to parse/format 
dates in one of two ways:

1) Use the default SHORT date format, either for the default Locale or a 
specified Locale
2) Use a set of Date patterns with which to try and parse the date

As Simon pointed out, this isn't going to work for an application that has to 
deal with multiple Locales - but thats true for all of the converters package 
- and the intention was for peole to use the locale.converters package for 
that scenario. I think providing functionality for single Locale scenarios is 
worth while though.

Also, its not just about conversion to and from Strings - these also provide 
conversion between the different date types - which if BeanUtils is copying 
properties and, for example, the source is a java.util.Calendar and target is 
java.util.Date - then going via a String, which is what it would do currently 
is really bad.

Finally, as I said before people can easily register/de-register converters - 
so if they don't want the functionality, they don't have to have it.

 ConvertUtilsBean does not support converts to a java.util.Date
 --

 Key: BEANUTILS-255
 URL: http://issues.apache.org/jira/browse/BEANUTILS-255
 Project: Commons BeanUtils
  Issue Type: Bug
Reporter: Henri Yandell
 Fix For: 1.8.0


 It's impossible to convert a String to a java.util.Date (see commons-user 
 mail thread 'Digester and using of java.util.Date').

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Commented: (BEANUTILS-258) Improve Converter Implementations

2006-11-04 Thread Niall Pemberton (JIRA)
[ 
http://issues.apache.org/jira/browse/BEANUTILS-258?page=comments#action_12447221
 ] 

Niall Pemberton commented on BEANUTILS-258:
---

I added the date/time converters under issue# BEANUTILS-255:
http://svn.apache.org/viewvc?view=revrevision=471349
http://svn.apache.org/viewvc?view=revrevision=471352

 and the generic array conversion under issue# BEANUTILS-242:
http://svn.apache.org/viewvc?view=revrevision=471351

 Improve Converter Implementations
 -

 Key: BEANUTILS-258
 URL: http://issues.apache.org/jira/browse/BEANUTILS-258
 Project: Commons BeanUtils
  Issue Type: Improvement
Affects Versions: 1.7.0
Reporter: Niall Pemberton
 Assigned To: Niall Pemberton
Priority: Minor
 Fix For: 1.8.0


 The Converter contract has the following signature
public Object convert(Class, Object)
 ...which incudes the type (Class) that the value should be converted to. 
 However all the Converter implementations in BeanUtils ignore this parameter 
 and always convert to a specific type - for example IntegerConverter only 
 ever converts to Integer values.
 One of the weaknesses in BeanUtils is that conversion of an Object to a 
 String is almost always done using the toString() method which, depending on 
 the Class, can produce unhelpful values. IMO all Converter implementations 
 should, at a minimum, support also support conversion from the type they 
 handle to a String.
 Theres two stages to this process:
 1) Enhance Converter implementations to handle conversion to Strings.
 2) Modify BeanUtils/PropertyUtils to delegate String conversion to the 
 Converters.
 In order to facilitate this, I'm adding a new AbstractConverter class which 
 removes the need for duplciated boiler plate code. As well as providing a 
 structure for conversion it also handles missing and invalid values in a 
 uniform way.
 I also have new NumberConverter and DateTimeConverter implementations which 
 provide improved String conversion facilities:
 1) Number Conversion
 The existing number Converter implementations use String handling functions 
 provided by the Number implementation. This has two main drawbacks - they 
 don't handle String values containing thousand separators and they are fixed 
 using a period (.) as the decimal separator making them only usable in 
 Locales where that is the case. I'm adding a number Converter where a pattern 
 can be specified for the format and/or a Locale specified to use different 
 decimal symbols. This caters for the alternative Locale scenario and isn't 
 intended to provide support for applications operating in a multiple Locale 
 environment.
 2) Date/Time Conversion
 Currently there are only implementations for the java.sql.Date/Time/Timestamp 
 types - java.util.Date and java.util.Calendar are not handled. I have a 
 date/time Converter implementation that caters for all of these types. As 
 people have indicated elsewhere converting from Strings to Date/Calendar 
 poses problems. This implementation can be configured either to use the 
 default format for a specified Locale or can be configured with a set of date 
 patterns. This may not fully satisfy  String -- Date conversion 
 requirements, but will at least provide something and importantly will 
 provide Date conversion factilities where String is not involved (e.g. Date 
 -- Calendar).
 3) Array Conversion
 I also have a generic array Converter implementation. It can convert to/from 
 Arrays of any type. It does this by delegating the element conversion to a 
 Converter of the appropriate type. As well as that it also caters for 
 Collection -- Array conversion and provides addtiona configuraton options 
 for parsing delimited String.
 I'm going to start committing the changes to the Converters initially. If 
 no-one objects to those, then I'll start looking at improving how 
 BeanUtils/PropertyUtils uses/delegates to Converters.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Commented: (CODEC-52) Digest on InputStreams

2006-11-04 Thread Henri Yandell (JIRA)
[ 
http://issues.apache.org/jira/browse/CODEC-52?page=comments#action_12447222 ] 

Henri Yandell commented on CODEC-52:


Any reason not to flag this for 1.4?

 Digest on InputStreams
 --

 Key: CODEC-52
 URL: http://issues.apache.org/jira/browse/CODEC-52
 Project: Commons Codec
  Issue Type: Improvement
Reporter: Niklas Gustavsson
 Attachments: CODEC-52-patch.diff


 When calculating digests on large amount of data (for example large files) 
 the current methods that takes a byte array or String in not sufficient. 
 MessageDigest supports getting a digest for a stream. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Resolved: (CODEC-48) [codec] Document how to print a QPDecoderStream with QCodec?

2006-11-04 Thread Henri Yandell (JIRA)
 [ http://issues.apache.org/jira/browse/CODEC-48?page=all ]

Henri Yandell resolved CODEC-48.


Resolution: Won't Fix

As far as I can tell this issue is resolved, with no action items for Codec.

 [codec] Document how to print a QPDecoderStream with QCodec?
 

 Key: CODEC-48
 URL: http://issues.apache.org/jira/browse/CODEC-48
 Project: Commons Codec
  Issue Type: Improvement
Affects Versions: 1.3
 Environment: Operating System: other
 Platform: Other
Reporter: Ralf Hauser
Priority: Minor
 Attachments: mimeInput.eml


 when just using sun's implemention and for example accessing a mime body part 
 of
 type text/x-vcard
 I get an object of type com.sun.mail.util.QPDecoderStream
 this seems to cause troubles for many people as per the above url.
 My stream claims to be 2k long, but when I do a reset, I get
 java.lang.NullPointerException
 at java.io.FilterInputStream.reset(FilterInputStream.java:204)
 at java.io.FilterInputStream.reset(FilterInputStream.java:204)
 I hope the apache implementation can help me here. If so, please document in 
 http://jakarta.apache.org/commons/codec/apidocs/org/apache/commons/codec/net/QCodec.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Updated: (IO-97) Trivial performance improvements to ByteArrayOutputStream

2006-11-04 Thread Henri Yandell (JIRA)
 [ http://issues.apache.org/jira/browse/IO-97?page=all ]

Henri Yandell updated IO-97:


Fix Version/s: 1.4

The diff is relatively involved, and as 1.3 looks pretty close I figure this 
will be looked at for the subsequent 1.4 release.

 Trivial performance improvements to ByteArrayOutputStream
 -

 Key: IO-97
 URL: http://issues.apache.org/jira/browse/IO-97
 Project: Commons IO
  Issue Type: Improvement
  Components: Streams/Writers
Affects Versions: 1.2
Reporter: Holger Hoffstätte
 Fix For: 1.4

 Attachments: BAOS.patch


 Found a few trivial ways to improve performance in ByteArrayOutputStream by 
 fast paths:
 - write(int) does not have to be synchronized
 - write(byte[]..) does not have to be synchronized as a whole either; it's 
 enough to synchonize the code that follows the first paramter-checking 
 if-then statement (so parameter checks can pop out quickly)
 - toByteArray() could just check if count == 0 and quickly return an empty 
 static final byte[] instead of returning a new zero-sized one, doing useless 
 System.arraycopy() etc.
 A somewhat more involved optimization would be to implement write(int) 
 without the new byte[1] since just poking the byte into the right page is 
 going to be much faster than what happens in write(byte[]..); I'll see if I 
 can do a patch for that.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



Re: [all] The state of our dependency affairs

2006-11-04 Thread Henri Yandell

On 11/4/06, Craig McClanahan [EMAIL PROTECTED] wrote:

On 11/4/06, Rahul Akolkar [EMAIL PROTECTED] wrote:

 On 11/4/06, Henri Yandell [EMAIL PROTECTED] wrote:
  Very nice :)
 
  I'm all enthused with the nightly build stuff at the moment (which
  makes it sucky that we don't actually have a machine to run it on
  atm), this would be cool to run on the nightly build each night. Do
  you have a script you can check in?
 
 snip/

 I only have a XP ThinkPad this weekend, so I hacked a Java class. Its
 now posted here:

   http://people.apache.org/~rahul/commons/DependencyCheck.java

 -Rahul


How about setting up a jakarta zone on the Apache zones.apache.org machine?
That makes a nifty place for nightly builds for quite a few other projects.


I think it's a bit pegged cpu-wise; but if the vmware one is not
upcoming at any point than requesting something on zones.apache seems
the next step. I've nudged on the vmware bit again, see if I can bring
the left hand and right hand into communicating well.

Hen

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



[jira] Commented: (BEANUTILS-258) Improve Converter Implementations

2006-11-04 Thread Niall Pemberton (JIRA)
[ 
http://issues.apache.org/jira/browse/BEANUTILS-258?page=comments#action_12447229
 ] 

Niall Pemberton commented on BEANUTILS-258:
---

There are a number of related issue tickets open around how BeanUtils handles 
conversion:

BEANUTILS-249 BeanUtilsBean does not convert objects using custom convertors 
properly
BEANUTILS-227 Register converters by both target class and source class
BEANUTILS-199 BeanUtils.setProperty is over-zealous at converting types
BEANUTILS-134 Call to toString() in should be replaced with 
getConvertUtils().convert(value)
BEANUTILS-86 StringArrayConverter does not handle long[] input
BEANUTILS-72 Problem with setting properties which are strings array.
BEANUTILS-65 ConvertUtils supports String-String[], but BeanUtils does not 
call the converter
BEANUTILS-35 Indexed properties with Array type cause IllegalArgumentException 
in setProperty/populate
BEANUTILS-206 ConvertUtils enhancements


 Improve Converter Implementations
 -

 Key: BEANUTILS-258
 URL: http://issues.apache.org/jira/browse/BEANUTILS-258
 Project: Commons BeanUtils
  Issue Type: Improvement
Affects Versions: 1.7.0
Reporter: Niall Pemberton
 Assigned To: Niall Pemberton
Priority: Minor
 Fix For: 1.8.0


 The Converter contract has the following signature
public Object convert(Class, Object)
 ...which incudes the type (Class) that the value should be converted to. 
 However all the Converter implementations in BeanUtils ignore this parameter 
 and always convert to a specific type - for example IntegerConverter only 
 ever converts to Integer values.
 One of the weaknesses in BeanUtils is that conversion of an Object to a 
 String is almost always done using the toString() method which, depending on 
 the Class, can produce unhelpful values. IMO all Converter implementations 
 should, at a minimum, support also support conversion from the type they 
 handle to a String.
 Theres two stages to this process:
 1) Enhance Converter implementations to handle conversion to Strings.
 2) Modify BeanUtils/PropertyUtils to delegate String conversion to the 
 Converters.
 In order to facilitate this, I'm adding a new AbstractConverter class which 
 removes the need for duplciated boiler plate code. As well as providing a 
 structure for conversion it also handles missing and invalid values in a 
 uniform way.
 I also have new NumberConverter and DateTimeConverter implementations which 
 provide improved String conversion facilities:
 1) Number Conversion
 The existing number Converter implementations use String handling functions 
 provided by the Number implementation. This has two main drawbacks - they 
 don't handle String values containing thousand separators and they are fixed 
 using a period (.) as the decimal separator making them only usable in 
 Locales where that is the case. I'm adding a number Converter where a pattern 
 can be specified for the format and/or a Locale specified to use different 
 decimal symbols. This caters for the alternative Locale scenario and isn't 
 intended to provide support for applications operating in a multiple Locale 
 environment.
 2) Date/Time Conversion
 Currently there are only implementations for the java.sql.Date/Time/Timestamp 
 types - java.util.Date and java.util.Calendar are not handled. I have a 
 date/time Converter implementation that caters for all of these types. As 
 people have indicated elsewhere converting from Strings to Date/Calendar 
 poses problems. This implementation can be configured either to use the 
 default format for a specified Locale or can be configured with a set of date 
 patterns. This may not fully satisfy  String -- Date conversion 
 requirements, but will at least provide something and importantly will 
 provide Date conversion factilities where String is not involved (e.g. Date 
 -- Calendar).
 3) Array Conversion
 I also have a generic array Converter implementation. It can convert to/from 
 Arrays of any type. It does this by delegating the element conversion to a 
 Converter of the appropriate type. As well as that it also caters for 
 Collection -- Array conversion and provides addtiona configuraton options 
 for parsing delimited String.
 I'm going to start committing the changes to the Converters initially. If 
 no-one objects to those, then I'll start looking at improving how 
 BeanUtils/PropertyUtils uses/delegates to Converters.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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

[jira] Updated: (BEANUTILS-243) BeanUtils fails to compile under 1.6

2006-11-04 Thread Henri Yandell (JIRA)
 [ http://issues.apache.org/jira/browse/BEANUTILS-243?page=all ]

Henri Yandell updated BEANUTILS-243:


Fix Version/s: 1.8.0

 BeanUtils fails to compile under 1.6
 

 Key: BEANUTILS-243
 URL: http://issues.apache.org/jira/browse/BEANUTILS-243
 Project: Commons BeanUtils
  Issue Type: Bug
Reporter: Henri Yandell
 Fix For: 1.8.0


 [javac] Compiling 86 source files to 
 /home/hen/apache/jakarta/commons-proper/beanutils/target/test-classes
 /home/hen/apache/jakarta/commons-proper/beanutils/src/test/org/apache/commons/beanutils/TestResultSet.java:49:
  org.apache.commons.beanutils.TestResultSet is not abstract and does not 
 override abstract method updateNClob(java.lang.String,java.io.Reader,long) in 
 java.sql.ResultSet
 public class TestResultSet implements ResultSet {
^
 /home/hen/apache/jakarta/commons-proper/beanutils/src/test/org/apache/commons/beanutils/TestResultSetMetaData.java:34:
  org.apache.commons.beanutils.TestResultSetMetaData is not abstract and does 
 not override abstract method isWrapperFor(java.lang.Class) in java.sql.Wrapper
 public class TestResultSetMetaData implements ResultSetMetaData {
^
 Note: Some input files use or override a deprecated API.
 Note: Recompile with -Xlint:deprecation for details.
 2 errors
 BUILD FAILED
 (Presumably a bunch of new methods have been added to that class in the JDBC 
 in 1.6)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Updated: (BEANUTILS-251) PropertyUtils.describe() returns wrong fields names

2006-11-04 Thread Henri Yandell (JIRA)
 [ http://issues.apache.org/jira/browse/BEANUTILS-251?page=all ]

Henri Yandell updated BEANUTILS-251:


Fix Version/s: 1.8.0

Make a FAQ by 1.8.

 PropertyUtils.describe() returns wrong fields names
 ---

 Key: BEANUTILS-251
 URL: http://issues.apache.org/jira/browse/BEANUTILS-251
 Project: Commons BeanUtils
  Issue Type: Bug
Affects Versions: 1.7.0
 Environment: WinXP SP2
Reporter: Oleg Timoshenko
 Assigned To: Henri Yandell
 Fix For: 1.8.0


 I have the following bean:
 public class SumTestBean2 {
   private int iVal;
   public int getIVal() {
   return iVal;
   }
   public void setIVal(int val) {
   iVal = val;
   }
 }
 ... and the following snippet of code:
 SumTestBean2 stb = new SumTestBean2();
 stb.setIVal(12);
 Map map = PropertyUtils.describe(stb);
 for(Object o : map.keySet()) System.out.println(o);
 .. prints out the following:
 IVal
 class
 
 Note that instead of IVal there should be iVal - uppercase letter appears 
 instead of lowercase. 
 This happens only when field has first letter - in lower case followed by 
 uppercase letter.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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