Re: [general] How much to focus on minimising dependencies Was: [lang] Re: cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang Validate.java
Henri Yandell wrote: Siblings sometimes have to depend on each other, but it's the same type of dependency as inter-project dependencies. Allowing for a single class to be copy and pasted is too much though. I agree with the above part. I don't see how that simply making this statement is inadequate, nor how the suggested package dependency rules better codify those goals. It's late for me though, so maybe I'm missing the point. -- Serge Knystautas Lokitech software . strategy . design http://www.lokitech.com p. 301.656.5501 e. [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[vfs] FileObject.delete
USING EXTERNAL EDITOR - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[vfs] FileObject.delete
FileObject.delete() calls FileObject.delete(Selectors.SELECT_SELF) So all the juice is in delete(FileSelector) There we find section SNIP // If the file is a folder, make sure all its children have been deleted if (file.type == FileType.FOLDER file.getChildren().length != 0) { // TODO - fail?? // Skip continue; } SNAP So the call to file.getChildren().length != 0 is already made during delete for every folder. Then a call to provider is made only after ensuring that folder does not have any children. The best way would be to move the children check to deleteSelf() method where the check for IMAGINARY is done. Then delete(FileSelector) could return the amount of files it deleted. And then delete() could return whatever it gets from delete(FileSelector). If it is 1 file was deleted otherwise it would be 0. -- Rami I will have a look at it, but i think i will implement it that way. Since I don't know the imlementations of the providers (yet) I can't say what would be the most efficient strategy but one idea could be that delete would return boolean that would tell whether something was deleted or not. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29356] New: - ListOrderedSet doesn't implements SortedSet
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29356. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29356 ListOrderedSet doesn't implements SortedSet Summary: ListOrderedSet doesn't implements SortedSet Product: Commons Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Collections AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Is it a good reason why ListOrderedSet implements Set but not SortedSet? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] FileObject.delete
[EMAIL PROTECTED] wrote: So the call to file.getChildren().length != 0 is already made during delete for every folder. This will be done AFTER the children are removed, just to check if the folder is really empty before deleting it. I think the indention was to check if any other process created a file within the folder structure - and thus to avoid a error message during recursive delete. Then delete(FileSelector) could return the amount of files it deleted. I already implemented a simple boolean, if you think this is not enough, please tell me ! I have had no time to checkin my changes as i have to write a test-case too, but you could expect it soon. -- Mario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] FileObject.delete
This will be done AFTER the children are removed, just to check if the folder is really empty before deleting it. I think the indention was to check if any other process created a file within the folder structure - and thus to avoid a error message during recursive delete. Not really. Think if you have structure dir1 dir1.1 a.txt dir1.2 b.txt Then calling [FileObject:dir1].delete() would not have deleted it's children. Because that is not the intention of this invocation. Further if you would have FilePattern selector **/*/b.txt Then dir1.1 would not be empty when trying to delete it Then delete(FileSelector) could return the amount of files it deleted. I already implemented a simple boolean, if you think this is not enough, please tell me ! I have had no time to checkin my changes as i have to write a test-case too, but you could expect it soon. I think it is common (for example in JDBC) to return so called delete count. I don't need this change but it is more like suggestion for improvement. And I don't think there is any hurry :) I can also send you a patch if that would help you. But maybe it is the writing of the test case that seems cumbersome. I tried to run the test cases but it did not seem to work. To me it seemed like build.xml was not running any of the tests. And when I changed it I got some errors and was discouraged to write test cases. So what is needed would be some kind of instructions of how to write and run succesfully junit tests. -- Rami - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Collections: MultiMap status?
Hi folks, Just wondering what the present preferred API for using maps that allow multiple keys is. The tasks list for Commons Collections says: MultiMap subpackage implementing a revised interface Where should i go if i want to work on this? And another small question: why the restriction on spaces rather than tabs in submitted code? Are you trying to torture everyone who uses vi correctly? :-) -- Paul http://paulgear.webhop.net -- Think context! Using accepted quoting conventions makes your email easier to understand. Learn how at http://www.netmeister.org/news/learn2quote.html. signature.asc Description: OpenPGP digital signature
RE: [betwixt] Writing Map entries issue
Please send me what ideas you had.. Thanks. -Original Message- From: robert burrell donkin [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 6:01 PM To: Jakarta Commons Developers List Subject: Re: [betwixt] Writing Map entries issue On 2 Jun 2004, at 22:27, Inger, Matthew wrote: PS: This is not that big of a deal to me, as i'm using betwixt in conjunction with XMLUnit to do regression testing. The basic thrust of what i'm doing: 1. Write control object to XML file using betwixt 2. Write test object to XML using betwixt 3. Compare the control and test object XML using XMLUnit, allowing exclusions of differences based on XPath expressions cool So, as long as the map writing is consistent, it doesn't affect what i'm doing, but fir betwixt, as a product, I think that issue (and the issue of subclasses in general) has to be addressed at some point. By subclasses I mean: 1. properties which have an abstract type, or return a different actual class than the declared type. +1 (for reasons i don't quite remember) this one is know as the derived beans problem. 2. Secondly, the inheritance issue, which you and i have been discussing. Perhaps it would be possible that if any object has a different actual type than what the property is declared a (Object is assumed for things like Map.Entry), then a class attribute is added: HashMap entry key class=java.lang.String6/key entry class=com.someone.MyBean.../entry /entry /HashMap a relatively clean approach IMHO. If these are not addressed, i don't see the read functionality being of much use for complex beans. the derived bean problem is one of the reasons why the older read design (which HEAD has) needed to be replaced. (it doesn't cope very well with changes of type at runtime.) added support for derived beans to the refactoring branch should be pretty easy (i can give good instructions) and it was one of things i would have implemented by now (were it not for the fact that other components need urgent attention). if you'd like to volunteer to give this one a shot, i'd be very grateful :) - robert - 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]
[Jakarta Commons Wiki] Updated: Lang
Date: 2004-06-03T06:25:48 Editor: 66.167.119.196 Wiki: Jakarta Commons Wiki Page: Lang URL: http://wiki.apache.org/jakarta-commons/Lang adding link to mutable numbers page Change Log: -- @@ -23,7 +23,7 @@ 5. 21663 [lang] Add support in ToStringStyle for DateFormat. 5. 22172 [lang] DateUtils.parseCVS behavior parsing h:mm z 5. 22692 StringUtils.split ignores empty items - 5. 22717 [lang] mutable numbers - '''Matt Hawthorne and Geronimo have implementations.''' + 5. 22717 [lang] MutableNumbers - '''Matt Hawthorne and Geronimo have implementations.''' 5. 23749 [lang] [PATCH] NumberRange - adds inclusive and exclusive end points 5. 24910 new StringUtils.split methods that split on the whole separator string 5. 25560 DateUtils.truncate() is off by one hour when using a date in DST switch 'zone' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/transaction/src/test/org/apache/commons/transaction/memory MapWrapperTest.java
ozeigermann2004/06/03 06:33:39 Modified:transaction/src/test/org/apache/commons/transaction/memory MapWrapperTest.java Log: Fixed wrong sync Revision ChangesPath 1.3 +5 -9 jakarta-commons-sandbox/transaction/src/test/org/apache/commons/transaction/memory/MapWrapperTest.java Index: MapWrapperTest.java === RCS file: /home/cvs/jakarta-commons-sandbox/transaction/src/test/org/apache/commons/transaction/memory/MapWrapperTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- MapWrapperTest.java 2 Jun 2004 20:59:23 - 1.2 +++ MapWrapperTest.java 3 Jun 2004 13:33:39 - 1.3 @@ -111,20 +111,16 @@ final RendezvousBarrier commitBarrier = new RendezvousBarrier(Commit, 2, BARRIER_TIMEOUT, sLogger); -final RendezvousBarrier startBarrier = -new RendezvousBarrier(Start, 2, BARRIER_TIMEOUT, sLogger); Thread thread1 = new Thread(new Runnable() { public void run() { txMap1.startTransaction(); try { txMap1.put(key1, value2); -startBarrier.meet(); txMap1.commitTransaction(); commitBarrier.meet(); } catch (InterruptedException e) { logger.log(Level.WARNING, Thread interrupted, e); - startBarrier.reset(); commitBarrier.reset(); } } @@ -132,10 +128,10 @@ txMap1.put(key1, value1); -thread1.start(); txMap1.startTransaction(); -startBarrier.meet(); + thread1.start(); + // before commit of other thread report(value1, (String) txMap1.get(key1)); commitBarrier.meet(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[collections] Re: [GUMP@brutus]: jakarta-commons/commons-collections failed
I looked into this wondering if somehow Gump had something 'stale' lying around that caused it, but I see it is writing to an in-memory buffer reading from same, so no (at least not there). Could there be some stray class lying around that could be out sync? I find that hard to imagine, but will look if it is likely. Also, since this is writing a class (behind a List interface) to bytes and then reading (hopefully) same class back, I'm somewhat at a loss to see how the problem can even occur. Any pointers? [junit] Testcase: testEmptyListCompatibility(org.apache.commons.collections.list.TestTransform edList) : Caused an ERROR [junit] org.apache.commons.collections.list.TransformedList; local class incompatible: stream classdesc serialVersionUID = 107719303513141, local class serialVersionUID = 368464020144282561 [...] [junit] Testcase: testFullListCompatibility(org.apache.commons.collections.list.TestTransforme dList) : Caused an ERROR [junit] org.apache.commons.collections.list.TransformedList; local class incompatible: stream classdesc serialVersionUID = 107719303513141, local class serialVersionUID = 368464020144282561 regards Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/memory TransactionalMapWrapper.java
ozeigermann2004/06/03 06:34:35 Modified:transaction/src/java/org/apache/commons/transaction/memory TransactionalMapWrapper.java Log: - Fixed wrong calculation of size - Made it more reuseable Revision ChangesPath 1.11 +224 -153 jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/memory/TransactionalMapWrapper.java Index: TransactionalMapWrapper.java === RCS file: /home/cvs/jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/memory/TransactionalMapWrapper.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- TransactionalMapWrapper.java 2 Jun 2004 21:54:04 - 1.10 +++ TransactionalMapWrapper.java 3 Jun 2004 13:34:35 - 1.11 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; @@ -57,39 +58,44 @@ protected ThreadLocal activeTx = new ThreadLocal(); - protected MapFactory mapFactory; - protected SetFactory setFactory; +protected MapFactory mapFactory; +protected SetFactory setFactory; - /** - * Creates a new transactional map wrapper. Temporary maps and sets to store transactional - * data will be instances of [EMAIL PROTECTED] HashMap} and [EMAIL PROTECTED] HashSet}. - * - * @param wrapped map to be wrapped - */ +/** + * Creates a new transactional map wrapper. Temporary maps and sets to store transactional + * data will be instances of [EMAIL PROTECTED] HashMap} and [EMAIL PROTECTED] HashSet}. + * + * @param wrapped map to be wrapped + */ public TransactionalMapWrapper(Map wrapped) { - this(wrapped, new HashMapFactory(), new HashSetFactory()); +this(wrapped, new HashMapFactory(), new HashSetFactory()); } - /** - * Creates a new transactional map wrapper. Temporary maps and sets to store transactional - * data will be created and disposed using [EMAIL PROTECTED] MapFactory} and [EMAIL PROTECTED] SetFactory}. - * - * @param wrapped map to be wrapped - * @param mapFactory factory for temporary maps - * @param setFactory factory for temporary sets - */ - public TransactionalMapWrapper(Map wrapped, MapFactory mapFactory, SetFactory setFactory) { - this.wrapped = wrapped; - this.mapFactory = mapFactory; - this.setFactory = setFactory; - } +/** + * Creates a new transactional map wrapper. Temporary maps and sets to store transactional + * data will be created and disposed using [EMAIL PROTECTED] MapFactory} and [EMAIL PROTECTED] SetFactory}. + * + * @param wrapped map to be wrapped + * @param mapFactory factory for temporary maps + * @param setFactory factory for temporary sets + */ +public TransactionalMapWrapper( +Map wrapped, +MapFactory mapFactory, +SetFactory setFactory) { +this.wrapped = wrapped; +this.mapFactory = mapFactory; +this.setFactory = setFactory; +} public synchronized boolean isReadOnly() { TxContext txContext = getActiveTx(); if (txContext == null) { throw new IllegalStateException( -Active thread + Thread.currentThread() + not associated with a transaction!); +Active thread ++ Thread.currentThread() ++ not associated with a transaction!); } return txContext.readOnly; @@ -100,7 +106,9 @@ if (txContext == null) { throw new IllegalStateException( -Active thread + Thread.currentThread() + not associated with a transaction!); +Active thread ++ Thread.currentThread() ++ not associated with a transaction!); } return txContext.rollbackOnly; @@ -111,7 +119,9 @@ if (txContext == null) { throw new IllegalStateException( -Active thread + Thread.currentThread() + not associated with a transaction!); +Active thread ++ Thread.currentThread() ++ not associated with a transaction!); } txContext.rollbackOnly = true; @@ -123,7 +133,9 @@ if (txContext == null) { throw new IllegalStateException( -Active thread + Thread.currentThread() + not associated with a transaction!); +Active thread ++
cvs commit: jakarta-commons-sandbox/transaction/src/test/org/apache/commons/transaction/memory MapWrapperTest.java
ozeigermann2004/06/03 07:04:31 Modified:transaction/src/test/org/apache/commons/transaction/memory MapWrapperTest.java Log: Sync was still wrong :( ... fixed again Revision ChangesPath 1.4 +16 -11 jakarta-commons-sandbox/transaction/src/test/org/apache/commons/transaction/memory/MapWrapperTest.java Index: MapWrapperTest.java === RCS file: /home/cvs/jakarta-commons-sandbox/transaction/src/test/org/apache/commons/transaction/memory/MapWrapperTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- MapWrapperTest.java 3 Jun 2004 13:33:39 - 1.3 +++ MapWrapperTest.java 3 Jun 2004 14:04:31 - 1.4 @@ -109,19 +109,24 @@ final TransactionalMapWrapper txMap1 = new TransactionalMapWrapper(map1); -final RendezvousBarrier commitBarrier = -new RendezvousBarrier(Commit, 2, BARRIER_TIMEOUT, sLogger); +final RendezvousBarrier beforeCommitBarrier = +new RendezvousBarrier(Before Commit, 2, BARRIER_TIMEOUT, sLogger); + + final RendezvousBarrier afterCommitBarrier = + new RendezvousBarrier(After Commit, 2, BARRIER_TIMEOUT, sLogger); Thread thread1 = new Thread(new Runnable() { public void run() { txMap1.startTransaction(); try { + beforeCommitBarrier.meet(); txMap1.put(key1, value2); txMap1.commitTransaction(); -commitBarrier.meet(); + afterCommitBarrier.call(); } catch (InterruptedException e) { logger.log(Level.WARNING, Thread interrupted, e); - commitBarrier.reset(); + afterCommitBarrier.reset(); + beforeCommitBarrier.reset(); } } }, Thread1); @@ -131,10 +136,10 @@ txMap1.startTransaction(); thread1.start(); - -// before commit of other thread -report(value1, (String) txMap1.get(key1)); -commitBarrier.meet(); + + report(value1, (String) txMap1.get(key1)); + beforeCommitBarrier.call(); + afterCommitBarrier.meet(); // we have read committed as isolation level, that's why I will see the new value of the other thread now report(value2, (String) txMap1.get(key1)); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestBaseConfiguration.java
ebourg 2004/06/03 07:04:52 Modified:configuration/src/test/org/apache/commons/configuration TestBaseConfiguration.java Log: Added a test for the AbstractConfiguration.processString() method Revision ChangesPath 1.10 +15 -2 jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestBaseConfiguration.java Index: TestBaseConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestBaseConfiguration.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- TestBaseConfiguration.java13 May 2004 12:19:16 - 1.9 +++ TestBaseConfiguration.java3 Jun 2004 14:04:52 - 1.10 @@ -481,6 +481,19 @@ fail(IllegalStateException should have been thrown for looped property references); } - +public void testProcessString() +{ +String s1 = abc,xyz; +List tokens = config.processString(s1); +assertEquals(number of tokens in ' + s1 + ', 2, tokens.size()); +assertEquals(1st token for ' + s1 + ', abc, tokens.get(0)); +assertEquals(2nd token for ' + s1 + ', xyz, tokens.get(1)); + +String s2 = abc\\,xyz; +tokens = config.processString(s2); +assertEquals(number of tokens in ' + s2 + ', 1, tokens.size()); +assertEquals(1st token for ' + s2 + ', abc,xyz, tokens.get(0)); +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] New: MutableNumbers
Date: 2004-06-03T07:08:24 Editor: 66.167.119.196 Wiki: Jakarta Commons Wiki Page: MutableNumbers URL: http://wiki.apache.org/jakarta-commons/MutableNumbers adding info on mutable numbers New Page: There have been a few threads about mutable numbers and I'll try to summarize the ideas. '''1) What package/project should these classes go in?''' My initial thought was lang.math, but if we create MutableByte, MutableString, or others non-numeric types, this isn't a good fit. lang.mutable may be a better fit. '''2) What type of naming scheme should we use?''' MutableInteger vs. MInteger vs. IntegerHolder vs. ? '''3) Comparision between my (matth) initial implementation vs. Geronimos''' I can't find the Mutable classes in Geronimo anymore. Perhaps they were removed? One of the primary differences I noted was that the Geromino classes containeed additional methods such add add(int), subtract(int), and things like that. I find this similar to Henri's suggestion that MutableString contain StringUtils-like methods (split(), capitalize(), etc). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/transaction/src/test/org/apache/commons/transaction/memory OptimisticMapWrapperTest.java
ozeigermann2004/06/03 07:09:40 Modified:transaction/src/java/org/apache/commons/transaction/memory OptimisticMapWrapper.java Added: transaction/src/test/org/apache/commons/transaction/memory OptimisticMapWrapperTest.java Log: Added initial version of optimistic serializable map plus test. *This is work in progress* Revision ChangesPath 1.2 +212 -28 jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/memory/OptimisticMapWrapper.java Index: OptimisticMapWrapper.java === RCS file: /home/cvs/jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/memory/OptimisticMapWrapper.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- OptimisticMapWrapper.java 2 Jun 2004 21:54:04 - 1.1 +++ OptimisticMapWrapper.java 3 Jun 2004 14:09:40 - 1.2 @@ -23,12 +23,16 @@ package org.apache.commons.transaction.memory; +import java.util.HashSet; +import java.util.Iterator; import java.util.Map; +import java.util.Set; /** * Wrapper that adds transactional control to all kinds of maps that implement the [EMAIL PROTECTED] Map} interface. By using - * optimistic transaction control this wrapper has better isolation than [EMAIL PROTECTED] TransactionalMapWrapper}, but + * a naive optimistic transaction control this wrapper has better isolation than [EMAIL PROTECTED] TransactionalMapWrapper}, but * may also fail to commit. + * * br * Start a transaction by calling [EMAIL PROTECTED] #startTransaction()}. Then perform the normal actions on the map and * finally either calls [EMAIL PROTECTED] #commitTransaction()} to make your changes permanent or [EMAIL PROTECTED] #rollbackTransaction()} to @@ -37,8 +41,9 @@ * emCaution:/em Do not modify values retrieved by [EMAIL PROTECTED] #get(Object)} as this will circumvent the transactional mechanism. * Rather clone the value or copy it in a way you see fit and store it back using [EMAIL PROTECTED] #put(Object, Object)}. * br - * emNote:/em This wrapper guarantees isolation levels codeREPEATABLE READ/code or codeSERIALIZABLE/code. - * + * emNote:/em This wrapper guarantees isolation level codeSERIALIZABLE/code. + * br + * emCaution:/em This implementation might be slow when large amounts of data is changed in a transaction as much references will need to be copied around. * @author a href=mailto:[EMAIL PROTECTED]Oliver Zeigermann/a * @version $Revision$ * @see TransactionalMapWrapper @@ -46,25 +51,204 @@ */ public class OptimisticMapWrapper extends TransactionalMapWrapper { - /** - * Creates a new optimistic transactional map wrapper. Temporary maps and sets to store transactional - * data will be instances of [EMAIL PROTECTED] HashMap} and [EMAIL PROTECTED] HashSet}. - * - * @param wrapped map to be wrapped - */ - public OptimisticMapWrapper(Map wrapped) { - super(wrapped, new HashMapFactory(), new HashSetFactory()); - } - - /** - * Creates a new optimistic transactional map wrapper. Temporary maps and sets to store transactional - * data will be created and disposed using [EMAIL PROTECTED] MapFactory} and [EMAIL PROTECTED] SetFactory}. - * - * @param wrapped map to be wrapped - * @param mapFactory factory for temporary maps - * @param setFactory factory for temporary sets - */ - public OptimisticMapWrapper(Map wrapped, MapFactory mapFactory, SetFactory setFactory) { - super(wrapped, mapFactory, setFactory); - } +protected Set activeTransactions; + +/** + * Creates a new optimistic transactional map wrapper. Temporary maps and sets to store transactional + * data will be instances of [EMAIL PROTECTED] HashMap} and [EMAIL PROTECTED] HashSet}. + * + * @param wrapped map to be wrapped + */ +public OptimisticMapWrapper(Map wrapped) { +this(wrapped, new HashMapFactory(), new HashSetFactory()); +} + +/** + * Creates a new optimistic transactional map wrapper. Temporary maps and sets to store transactional + * data will be created and disposed using [EMAIL PROTECTED] MapFactory} and [EMAIL PROTECTED] SetFactory}. + * + * @param wrapped map to be wrapped + * @param mapFactory factory for temporary maps + * @param setFactory factory for temporary sets + */ +public OptimisticMapWrapper( +Map wrapped, +MapFactory mapFactory, +SetFactory setFactory) { +super(wrapped, mapFactory, setFactory); +activeTransactions = new HashSet(); +} + +public synchronized void startTransaction() { +
cvs commit: jakarta-commons-sandbox/transaction/src/test/org/apache/commons/transaction/memory OptimisticMapWrapperTest.java
ozeigermann2004/06/03 07:15:31 Modified:transaction/src/java/org/apache/commons/transaction/memory OptimisticMapWrapper.java TransactionalMapWrapper.java PessimisticMapWrapper.java transaction/src/test/org/apache/commons/transaction/memory OptimisticMapWrapperTest.java Log: Unified format to 120 characters/line and no tabs Revision ChangesPath 1.3 +96 -111 jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/memory/OptimisticMapWrapper.java Index: OptimisticMapWrapper.java === RCS file: /home/cvs/jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/memory/OptimisticMapWrapper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- OptimisticMapWrapper.java 3 Jun 2004 14:09:40 - 1.2 +++ OptimisticMapWrapper.java 3 Jun 2004 14:15:31 - 1.3 @@ -71,10 +71,7 @@ * @param mapFactory factory for temporary maps * @param setFactory factory for temporary sets */ -public OptimisticMapWrapper( -Map wrapped, -MapFactory mapFactory, -SetFactory setFactory) { +public OptimisticMapWrapper(Map wrapped, MapFactory mapFactory, SetFactory setFactory) { super(wrapped, mapFactory, setFactory); activeTransactions = new HashSet(); } @@ -82,9 +79,7 @@ public synchronized void startTransaction() { if (getActiveTx() != null) { throw new IllegalStateException( -Active thread -+ Thread.currentThread() -+ already associated with a transaction!); +Active thread + Thread.currentThread() + already associated with a transaction!); } CopyingTxContext context = new CopyingTxContext(); activeTransactions.add(context); @@ -96,16 +91,11 @@ if (txContext == null) { throw new IllegalStateException( -Active thread -+ Thread.currentThread() -+ not associated with a transaction!); +Active thread + Thread.currentThread() + not associated with a transaction!); } if (txContext.rollbackOnly) { -throw new IllegalStateException( -Active thread -+ Thread.currentThread() -+ is marked for rollback!); +throw new IllegalStateException(Active thread + Thread.currentThread() + is marked for rollback!); } checkForConflicts(); @@ -118,7 +108,7 @@ } protected void checkForConflicts() { - // TODO +// TODO } protected void copyChangesToConcurrentTransactions() { @@ -127,35 +117,30 @@ for (Iterator it = activeTransactions.iterator(); it.hasNext();) { CopyingTxContext otherTxContext = (CopyingTxContext) it.next(); - // no need to copy data if the other transaction does not access global map anyway - if (otherTxContext.cleared) continue; - +// no need to copy data if the other transaction does not access global map anyway +if (otherTxContext.cleared) +continue; + if (thisTxContext.cleared) { // we will clear everything, so we have to copy everything before otherTxContext.externalChanges.putAll(wrapped); } else // no need to check if we have already copied everthing { - -for (Iterator it2 = thisTxContext.changes.entrySet().iterator(); -it2.hasNext(); -) { + +for (Iterator it2 = thisTxContext.changes.entrySet().iterator(); it2.hasNext();) { Map.Entry entry = (Map.Entry) it2.next(); Object value = wrapped.get(entry.getKey()); if (value != null) { - // undo change -otherTxContext.externalChanges.put( -entry.getKey(), -value); +// undo change +otherTxContext.externalChanges.put(entry.getKey(), value); } else { // undo add otherTxContext.externalDeletes.add(entry.getKey()); } } -for (Iterator it2 = thisTxContext.deletes.iterator(); -it2.hasNext(); -) { -
[Jakarta Commons Wiki] Updated: MutableNumbers
Date: 2004-06-03T07:24:34 Editor: 216.26.136.155 Wiki: Jakarta Commons Wiki Page: MutableNumbers URL: http://wiki.apache.org/jakarta-commons/MutableNumbers no comment Change Log: -- @@ -20,3 +20,9 @@ Henri's suggestion that MutableString contain StringUtils-like methods (split(), capitalize(), etc). +'''4) List of classes to have mutable versions of''' + + * String + * Long + * Double + * Character - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: MutableNumbers
Date: 2004-06-03T07:37:00 Editor: 216.26.136.155 Wiki: Jakarta Commons Wiki Page: MutableNumbers URL: http://wiki.apache.org/jakarta-commons/MutableNumbers no comment Change Log: -- @@ -15,10 +15,11 @@ I can't find the Mutable classes in Geronimo anymore. Perhaps they were removed? -One of the primary differences I noted was that the Geromino classes containeed additional +One of the primary differences I noted was that the Geromino classes contained additional methods such add add(int), subtract(int), and things like that. I find this similar to Henri's suggestion that MutableString contain StringUtils-like methods (split(), capitalize(), etc). +Another difference was the existence of a Mutable interface I (hen) think. '''4) List of classes to have mutable versions of''' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[lang] MutableXxx Was: [Jakarta Commons Wiki] New: MutableNumbers
Thanks Matt, 1 lang.mutable gets my vote. 2 MutableXxx gets my vote as a naming scheme. 3 I'm in favour of MutableXxx having instance links to XxxUtils to make them more powerful [and delegating calls to all Xxx methods]. This does make it a large lump of work though. 4 Do we need MutableInteger, MutableFloat etc, or can we just normalize on the main ones? MutableLong [which would handle ints, shorts] MutableString MutableDouble [which would handle float] MutableByte [assuming it is different to MutableLong] MutableCharacter MutableBoolean Hen On Thu, 3 Jun 2004 [EMAIL PROTECTED] wrote: Date: 2004-06-03T07:08:24 Editor: 66.167.119.196 Wiki: Jakarta Commons Wiki Page: MutableNumbers URL: http://wiki.apache.org/jakarta-commons/MutableNumbers adding info on mutable numbers New Page: There have been a few threads about mutable numbers and I'll try to summarize the ideas. '''1) What package/project should these classes go in?''' My initial thought was lang.math, but if we create MutableByte, MutableString, or others non-numeric types, this isn't a good fit. lang.mutable may be a better fit. '''2) What type of naming scheme should we use?''' MutableInteger vs. MInteger vs. IntegerHolder vs. ? '''3) Comparision between my (matth) initial implementation vs. Geronimos''' I can't find the Mutable classes in Geronimo anymore. Perhaps they were removed? One of the primary differences I noted was that the Geromino classes containeed additional methods such add add(int), subtract(int), and things like that. I find this similar to Henri's suggestion that MutableString contain StringUtils-like methods (split(), capitalize(), etc). - 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: [lang] [math] org.apache.commons.lang.math.Fraction class
On Thu, 3 Jun 2004, Stephen Colebourne wrote: I had a 5 second look yesterday, and realised how big the change is. My immediate concern is that the Fraction class has lost its final status, making it less immutable. The idea is to remove the deprecated methods in some future version of lang; at which point Fraction can be made final again (and BadFraction completely disappears). It would be harder to purge BadFraction if its code is mixed willy-nilly with the 'real' Fraction code. The constructor for Fraction is package-private (or should be!) so no one outside the lang package can create a subclass in any case. Also, I wasn't sure what 'relatively prime' actually meant. Its probably too mathematical for the target audience in [lang]. http://www.google.com/search?q=%22relatively%20prime%22btnI=yes It just means that the gcd(x,y)=1, or (equivalently) that the fraction is simplified. I'll be glad to add that to the javadoc. Finally, I believe that [lang] is the right place for these (including BigFraction). They represent missing parts of the JDK, so [lang] is appropriate. ok. --scott Waco, Texas nuclear AP kibo Treasury EZLN MI5 Minister UKUSA corporate globalization Bush President atomic Rijndael assassinate Qaddafi affinity group ( http://cscott.net/ ) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29366] New: - [configuration] Preserve interpolation tokens on saving
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29366. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29366 [configuration] Preserve interpolation tokens on saving Summary: [configuration] Preserve interpolation tokens on saving Product: Commons Version: Nightly Builds Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Configuration AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The interpolation tokens are not preserved when a PropertiesConfiguration is saved. If the .properties file contains initially the following keys: base=base base.reference=${base}extra on saving they'll turn into: base=base base.reference=baseextra - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestPropertiesConfiguration.java
ebourg 2004/06/03 08:32:46 Modified:configuration/src/java/org/apache/commons/configuration AbstractConfiguration.java BasePropertiesConfiguration.java configuration/conf test.properties configuration/src/test/org/apache/commons/configuration TestPropertiesConfiguration.java Log: Fixed Bug 27775, the list separator (comma) can be escaped with the \ character Revision ChangesPath 1.9 +7 -16 jakarta-commons/configuration/src/java/org/apache/commons/configuration/AbstractConfiguration.java Index: AbstractConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/AbstractConfiguration.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AbstractConfiguration.java4 May 2004 22:27:10 - 1.8 +++ AbstractConfiguration.java3 Jun 2004 15:32:46 - 1.9 @@ -42,18 +42,13 @@ /** how big the initial arraylist for splitting up name value pairs */ private static final int INITIAL_LIST_SIZE = 2; - /** start token */ protected static final String START_TOKEN = ${; /** end token */ protected static final String END_TOKEN = }; -/** - * Empty constructor. - */ -public AbstractConfiguration() -{ -} +/** The property delimiter used while parsing (a comma). */ +protected static final char DELIMITER = ','; /** * Add a property to the configuration. If it already exists then the value @@ -76,8 +71,7 @@ { if (token instanceof String) { -for(Iterator it = processString((String) token).iterator(); -it.hasNext();) +for(Iterator it = processString((String) token).iterator(); it.hasNext();) { addPropertyDirect(key, it.next()); } @@ -238,7 +232,7 @@ { List retList = new ArrayList(INITIAL_LIST_SIZE); -if (token.indexOf(PropertiesTokenizer.DELIMITER) 0) +if (token.indexOf(DELIMITER) 0) { PropertiesTokenizer tokenizer = new PropertiesTokenizer(token); @@ -1300,11 +1294,8 @@ * separator is , but commas into the property value are escaped * using the backslash in front. */ -class PropertiesTokenizer extends StringTokenizer +static class PropertiesTokenizer extends StringTokenizer { -/** The property delimiter used while parsing (a comma). */ -static final String DELIMITER = ,; - /** * Constructor. * @@ -1312,7 +1303,7 @@ */ public PropertiesTokenizer(String string) { -super(string, DELIMITER); +super(string, String.valueOf(DELIMITER)); } /** 1.8 +168 -56 jakarta-commons/configuration/src/java/org/apache/commons/configuration/BasePropertiesConfiguration.java Index: BasePropertiesConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/BasePropertiesConfiguration.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- BasePropertiesConfiguration.java 2 Jun 2004 16:42:24 - 1.7 +++ BasePropertiesConfiguration.java 3 Jun 2004 15:32:46 - 1.8 @@ -30,6 +30,7 @@ import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.exception.NestableRuntimeException; /** * loads the configuration from a properties file. p @@ -101,7 +102,7 @@ * * # commas may be escaped in tokens * commas.excaped = Hi\, what'up? - * + * * # properties can reference other properties * base.prop = /base * first.prop = ${base.prop}/first @@ -150,19 +151,17 @@ * encoding. * * @param input An InputStream. - * @param enc An encoding. + * @param encoding An encoding. * @exception ConfigurationException */ -public synchronized void load(InputStream input, String enc) -throws ConfigurationException +public synchronized void load(InputStream input, String encoding) throws ConfigurationException { PropertiesReader reader = null; -if (enc != null) +if (encoding != null) { try { -reader = - new PropertiesReader(new InputStreamReader(input, enc)); +reader = new PropertiesReader(new
cvs commit: jakarta-commons/configuration project.properties
ebourg 2004/06/03 09:13:01 Modified:configuration project.properties Log: Added javadoc links Revision ChangesPath 1.10 +2 -0 jakarta-commons/configuration/project.properties Index: project.properties === RCS file: /home/cvs/jakarta-commons/configuration/project.properties,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- project.properties4 May 2004 22:15:26 - 1.9 +++ project.properties3 Jun 2004 16:13:01 - 1.10 @@ -20,6 +20,8 @@ maven.junit.fork=true maven.test.failure.ignore=true +maven.javadoc.links=http://java.sun.com/j2se/1.5/docs/api/, http://jakarta.apache.org/commons/collections/apidocs/, http://jakarta.apache.org/commons/digester/apidocs/, http://jakarta.apache.org/commons/lang/apidocs/, http://www.dom4j.org/apidocs/ + #cactus settings. Make sure to point to your Tomcat! cactus.home.tomcat4x = c:/java/tomcat cactus.src.mergewebxml=src/test-cactus/testapp/WEB-INF/web.xml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/xdocs navigation.xml
ebourg 2004/06/03 09:31:07 Modified:configuration/xdocs navigation.xml Log: Added a direct link to the javadoc in the navigation Revision ChangesPath 1.8 +4 -4 jakarta-commons/configuration/xdocs/navigation.xml Index: navigation.xml === RCS file: /home/cvs/jakarta-commons/configuration/xdocs/navigation.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- navigation.xml13 Mar 2004 17:23:00 - 1.7 +++ navigation.xml3 Jun 2004 16:31:07 - 1.8 @@ -9,8 +9,7 @@ body links - item name=Jakarta Commons -href=http://jakarta.apache.org/commons// + item name=Jakarta Commons href=http://jakarta.apache.org/commons// /links menu name=Configuration @@ -20,11 +19,12 @@ item name=ConfigurationFactory Howto href=/howto_configurationfactory.html/ item name=XML Howtohref=/howto_xml.html/ item name=Composite Config Howto href=/howto_compositeconfiguration.html/ - item name=Roadmap href=/tasks-report.html/ + item name=Roadmap href=/tasks-report.html/ + item name=Javadoc href=/apidocs/index.html/ /menu menu name=Extensions item name=Avalon Component href=http://jakarta.apache.org/turbine/fulcrum/fulcrum-configuration/index.html/ -/menu +/menu common-menus; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27775] - [configuration] Comma-escaping in PropertiesConfiguration broken
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=27775. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=27775 [configuration] Comma-escaping in PropertiesConfiguration broken [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED Summary|[configuration] Comma- |[configuration] Comma- |escaping and backslash- |escaping in |parsing in |PropertiesConfiguration |PropertiesConfiguration |broken |broken | --- Additional Comments From [EMAIL PROTECTED] 2004-06-03 15:47 --- I fixed the comma escaping issue, let me know if it's ok now. I also changed the way lists are saved, previously they were written on a single line as comma separated values, now they are written on multiple lines, one element per line. I think the backslash escaping is needed for values like \home\new, otherwise the \n part will be parsed as a line feed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test ProviderDeleteTests.java
imario 2004/06/03 10:13:24 Modified:vfs/src/java/org/apache/commons/vfs/provider AbstractFileObject.java vfs/src/java/org/apache/commons/vfs FileObject.java Added: vfs/src/test/org/apache/commons/vfs/test ProviderDeleteTests.java Log: additional informations on delete: delete() returns true if a delete operation happens delete(FileSelector) returns the number of deleted files + Testcase Revision ChangesPath 1.45 +24 -9 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java Index: AbstractFileObject.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- AbstractFileObject.java 23 May 2004 18:34:33 - 1.44 +++ AbstractFileObject.java 3 Jun 2004 17:13:24 - 1.45 @@ -590,8 +590,10 @@ /** * Deletes this file, once all its children have been deleted + * + * @return true if this file has been deleted */ -private void deleteSelf() throws FileSystemException +private boolean deleteSelf() throws FileSystemException { if (!isWriteable()) { @@ -601,7 +603,7 @@ if (type == FileType.IMAGINARY) { // File does not exist -return; +return false; } try @@ -620,28 +622,36 @@ { throw new FileSystemException(vfs.provider/delete.error, new Object[]{name}, exc); } + +return true; } /** * Deletes this file. * + * @return true if this object has been deleted * @todo This will not fail if this is a non-empty folder. */ -public void delete() throws FileSystemException +public boolean delete() throws FileSystemException { -delete(Selectors.SELECT_SELF); +return delete(Selectors.SELECT_SELF) 0; } /** * Deletes this file, and all children. + * + * @return the number of deleted files */ -public void delete(final FileSelector selector) throws FileSystemException +public int delete(final FileSelector selector) throws FileSystemException { attach(); + +int nuofDeleted = 0; + if (type == FileType.IMAGINARY) { // File does not exist -return; +return nuofDeleted; } // Locate all the files to delete @@ -658,14 +668,19 @@ // If the file is a folder, make sure all its children have been deleted if (file.type == FileType.FOLDER file.getChildren().length != 0) { -// TODO - fail?? -// Skip +// Skip - as the selector forced us not to delete all files continue; } // Delete the file -file.deleteSelf(); +boolean deleted = file.deleteSelf(); +if (deleted) +{ +nuofDeleted++; +} } + +return nuofDeleted; } /** 1.26 +7 -5 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/FileObject.java Index: FileObject.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/FileObject.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- FileObject.java 10 May 2004 20:09:45 - 1.25 +++ FileObject.java 3 Jun 2004 17:13:24 - 1.26 @@ -189,14 +189,15 @@ FileObject[] findFiles(FileSelector selector) throws FileSystemException; /** - * Deletes this file. Does nothing if this file does not exist. Does - * not delete any descendents of this file, use [EMAIL PROTECTED] #delete(FileSelector)} - * for that. + * Deletes this file. Does nothing if this file does not exist of if it is a + * folder that has children. Does not delete any descendents of this file, + * use [EMAIL PROTECTED] #delete(FileSelector)} for that. * + * @return true if this object has been deleted * @throws FileSystemException If this file is a non-empty folder, or if this file is read-only, * or on error deleteing this file. */ -void delete() throws FileSystemException; +boolean delete() throws FileSystemException; /** * Deletes all descendents of this file that match a selector. Does
cvs commit: jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test ProviderRenameTests.java ProviderTestSuite.java ProviderWriteAppendTests.java ProviderWriteTests.java
imario 2004/06/03 10:14:17 Modified:vfs/src/test/org/apache/commons/vfs/test ProviderRenameTests.java ProviderTestSuite.java ProviderWriteAppendTests.java ProviderWriteTests.java Log: additional informations on delete: delete() returns true if a delete operation happens delete(FileSelector) returns the number of deleted files + Testcase Revision ChangesPath 1.4 +1 -1 jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/ProviderRenameTests.java Index: ProviderRenameTests.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/ProviderRenameTests.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ProviderRenameTests.java 24 May 2004 20:09:34 - 1.3 +++ ProviderRenameTests.java 3 Jun 2004 17:14:16 - 1.4 @@ -100,6 +100,6 @@ // Delete the file. assertTrue(fileMove.exists()); -fileMove.delete(); +assertTrue(fileMove.delete()); } } 1.20 +2 -1 jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/ProviderTestSuite.java Index: ProviderTestSuite.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/ProviderTestSuite.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- ProviderTestSuite.java10 May 2004 20:09:44 - 1.19 +++ ProviderTestSuite.java3 Jun 2004 17:14:16 - 1.20 @@ -55,6 +55,7 @@ addTests(ProviderWriteTests.class); addTests(ProviderWriteAppendTests.class); addTests(ProviderRenameTests.class); +addTests(ProviderDeleteTests.class); addTests(LastModifiedTests.class); addTests(UrlTests.class); addTests(UrlStructureTests.class); 1.4 +1 -1 jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/ProviderWriteAppendTests.java Index: ProviderWriteAppendTests.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/ProviderWriteAppendTests.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ProviderWriteAppendTests.java 24 May 2004 20:09:34 - 1.3 +++ ProviderWriteAppendTests.java 3 Jun 2004 17:14:16 - 1.4 @@ -107,6 +107,6 @@ // Delete the file. assertTrue(fileCopy.exists()); -fileCopy.delete(); +assertTrue(fileCopy.delete()); } } 1.18 +1 -1 jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/ProviderWriteTests.java Index: ProviderWriteTests.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/test/org/apache/commons/vfs/test/ProviderWriteTests.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- ProviderWriteTests.java 10 May 2004 20:09:44 - 1.17 +++ ProviderWriteTests.java 3 Jun 2004 17:14:16 - 1.18 @@ -401,7 +401,7 @@ // Delete the file. assertTrue(fileCopy.exists()); -fileCopy.delete(); +assertTrue(fileCopy.delete()); // Make sure we can copy the same new file to the same target file on the same filesystem assertTrue(!fileCopy.exists()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] FileObject.delete
[EMAIL PROTECTED] wrote: This will be done AFTER the children are removed, just to check if the folder is really empty before deleting it. I think the indention was to check if any other process created a file within the folder structure - and thus to avoid a error message during recursive delete. Not really. Think if you have structure dir1 dir1.1 a.txt dir1.2 b.txt Then calling [FileObject:dir1].delete() would not have deleted it's children. Yes - yes - you are right, i currently looked at delete(FileSelector) and mixed things up ;-) Now i commited this stuff. delete() returns true if it has deleted something delete(FileSelector) returns the number of objects it has deleted -- Mario
[betwixt] Using interfaces as property types/ in collections
Hi all, We use betwixt in our project, but we found a problem which we couldn't solve with the actual implementation: When a property is an interface type then the actual class of the property instance is not saved to the xml - when I read it back the reader won't be able to instantiate it. The same problem occurs if want a collection of interfaces. I've checked the docs and the mailing lists, and seen that some other guys has the same problem. I have 2 questions: 1. Is this problem already solved somehow? If it is, how? 2. If it isn't I have a proposal: As a workaround I've implemented a subclass of XMLIntrospector that saves the actual class as a property of the element. A BeanCreator is able to create instances from this representation, so if you add it to the bean creator chain it solves both problems. The functionality is working, but it still lacks some polishing and documenting. If you are interested in it I can finish it, and contribute it to the project. The only ugly thing that my introspector contains a big copy pasted method from the original one, so some refactoring would be desirable in both classes. Should I work on it and send a patch with the finished version? Thanks, don - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: ValidatorXmlFile
Date: 2004-06-03T10:55:09 Editor: 209.98.39.51 Wiki: Jakarta Commons Wiki Page: ValidatorXmlFile URL: http://wiki.apache.org/jakarta-commons/ValidatorXmlFile no comment Change Log: -- @@ -1,7 +1,7 @@ -I want a argument in my xml field-element, for the max and min lenght validation. -i done it based on the dtd file bot it dont works. the validator doesnt get the value. an so ich have an nullpointer exception. +I want an argument in my xml field-element, for the max and min lengtht validation. +I have done it based on the dtd file but it doesn't work. The validator doesn't get the value. So I get a nullpointer exception. -how must i write the argument in the field element? +How must I write the argument in the field element? {{{ field property=name depends=required,minlength,maxlength - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: ValidatorXmlFile
Date: 2004-06-03T10:55:33 Editor: 209.98.39.51 Wiki: Jakarta Commons Wiki Page: ValidatorXmlFile URL: http://wiki.apache.org/jakarta-commons/ValidatorXmlFile no comment Change Log: -- @@ -1,4 +1,4 @@ -I want an argument in my xml field-element, for the max and min lengtht validation. +I want an argument in my xml field-element, for the max and min length validation. I have done it based on the dtd file but it doesn't work. The validator doesn't get the value. So I get a nullpointer exception. How must I write the argument in the field element? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Lang
Date: 2004-06-03T11:23:59 Editor: 216.26.136.155 Wiki: Jakarta Commons Wiki Page: Lang URL: http://wiki.apache.org/jakarta-commons/Lang no comment Change Log: -- @@ -15,6 +15,7 @@ 2. StringBuffer replacement 3. Mutable Number classes 4. StringTokenizer replacement: '''(DONE - Tokenizer)''' + 5. Fix the Fraction class as per the email thread. 5. 15082 [lang] elapsed time formatting utility method - '''DurationFormatUtils. Needs finishing.''' 5. 18962 [lang] New Method: getSubstitutedValues( String, Map ) - '''Patch supplied. Need to resurrect Interpolator from Util, merge with this patch and decide if it makes sense.''' 5. 19331 [lang] General case: infinite loop: ToStringBuilder.reflectionToString - '''Need to confirm whether this is a bug''' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: FrontPage
Date: 2004-06-03T11:24:28 Editor: 216.26.136.155 Wiki: Jakarta Commons Wiki Page: FrontPage URL: http://wiki.apache.org/jakarta-commons/FrontPage typo Change Log: -- @@ -54,7 +54,7 @@ * CreatingStandardWebPresence - * GettingInvloved - General Documentation for all Apache Commiters and ReleaseManager concerning various subjects (like SigningReleases, MavenRepository, and [:Mirroring]) + * GettingInvolved - General Documentation for all Apache Commiters and ReleaseManager concerning various subjects (like SigningReleases, MavenRepository, and [:Mirroring]) {{{ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Lang
Date: 2004-06-03T11:48:49 Editor: 128.30.5.227 Wiki: Jakarta Commons Wiki Page: Lang URL: http://wiki.apache.org/jakarta-commons/Lang This bug was mentioned twice. Change Log: -- @@ -15,7 +15,7 @@ 2. StringBuffer replacement 3. Mutable Number classes 4. StringTokenizer replacement: '''(DONE - Tokenizer)''' - 5. Fix the Fraction class as per the email thread. + 5. [http://issues.apache.org/bugzilla/show_bug.cgi?id=29294 29294][lang][PATCH] Fix the Fraction class - '''Patch being reviewed.''' 5. 15082 [lang] elapsed time formatting utility method - '''DurationFormatUtils. Needs finishing.''' 5. 18962 [lang] New Method: getSubstitutedValues( String, Map ) - '''Patch supplied. Need to resurrect Interpolator from Util, merge with this patch and decide if it makes sense.''' 5. 19331 [lang] General case: infinite loop: ToStringBuilder.reflectionToString - '''Need to confirm whether this is a bug''' @@ -40,8 +40,7 @@ 5. 29149 [lang] StringEscapeUtils.unescapeHtml() doesn't handle an empty entity - '''Empty entity is in fact illegal HTML, so need to decide if we should ignore''' 5. 25227 [lang] StringEscapeUtils.unescapeHtml() doesn't handle hex entities - '''DONE''' 5. 29163 Make StopWatch validate state transitions - '''Coding needed''' - 5. 29294 [lang][PATCH] lang.math.Fraction class deficiencies - '''Mail list conversation ongoing. - + === Fixed list === (meaning closed in Bugzilla) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang WordUtilsTest.java
On Wed, 3 Jun 2004 [EMAIL PROTECTED] wrote: +/** + * pCapitalizes all the delimiter separated words in a String. delimiter-separated + * Only the first letter of each word is changed. To change all letters to [...] + * @param str the String to capitalize, may be null + * @param delimiters characters to capitalize afterwards characters to capitalize afterwards is not clear -- it doesn't include the first letter in the string, for example. Better would be A set of characters understood to separate words. The first string character and the first non-delimiter character after a delimiter will be capitalized. Alternatively, A set of characters understood to separate words. Each word will have its first character capitalized. + * @param str the String to capitalize, may be null + * @param delimiters characters to capitalize afterwards + * @return capitalized String, codenull/code if null String input + */ +public static String capitalizeFully(String str, char[] delimiters) { Same thing here. @param delimiters A set of characters understood to separate words. All non-delimiter characters will be capitalized. --scott Moscow Marxist mail drop Noriega Panama fissionable Dictionary security COBRA JUDY South Africa Sudan bomb LA overthrow DC OVER THE HORIZON RADAR ( http://cscott.net/ ) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [betwixt] Writing Map entries issue
On 3 Jun 2004, at 14:00, Inger, Matthew wrote: Please send me what ideas you had.. Thanks. there's actually already a patch for derived beans (but it can't be applied without breaking some other stuff). the older reading code on CVS HEAD isn't good enough to cope with derived beans (or several other cool tricks such as array valued maps). you need to use the REFACTORING branch. with the new stuff, there are a number of ways to approach the problem. there are two basic routes that the solution can take: either adapt the existing BeanBindAction or create a new binding action (DerivedBindAction). i'd probably go down the BeanBindAction and add the derived bean functionality there. the crucial design decision is working out how BeanBindAction should decide on which type is to be mapped. at the moment, this is fixed at introspection time (and so is the logical type of the class). at runtime, the runtime typing is determined by the BeanCreationChain. provided that the reflection still works, then everything works ok (this is how people map EJB's with betwixt.) but, since the type is the logical type, any properties that the runtime type has in addition to those of the logical type will be ignored. so, they don't work properly. provided that we're not losing anything by altering the type that's bound to from the logical type to the runtime type, it should just be a case of creating a new derived bean creator to the standard BeanCreationChain and changing the BeanBindAction so that the logical type is replaced by the actual replacement type. (i've now realized that i could probably have implemented this in the time that i've taken to explain it but in the long run, it's probably the right thing to do.) the only probably i can think of is dynamic proxy's. i don't know what the effect of introspecting a dynamic proxy would be but this could probably be handled easily as a special case. - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [betwixt] Using interfaces as property types/ in collections
hi don there is limited support for interfaces in betwixt but it's not a completely solved issue. are you using the REFACTORING branch or HEAD? - robert On 3 Jun 2004, at 18:45, Sandor Murakozi wrote: Hi all, We use betwixt in our project, but we found a problem which we couldn't solve with the actual implementation: When a property is an interface type then the actual class of the property instance is not saved to the xml - when I read it back the reader won't be able to instantiate it. The same problem occurs if want a collection of interfaces. I've checked the docs and the mailing lists, and seen that some other guys has the same problem. I have 2 questions: 1. Is this problem already solved somehow? If it is, how? 2. If it isn't I have a proposal: As a workaround I've implemented a subclass of XMLIntrospector that saves the actual class as a property of the element. A BeanCreator is able to create instances from this representation, so if you add it to the bean creator chain it solves both problems. The functionality is working, but it still lacks some polishing and documenting. If you are interested in it I can finish it, and contribute it to the project. The only ugly thing that my introspector contains a big copy pasted method from the original one, so some refactoring would be desirable in both classes. Should I work on it and send a patch with the finished version? Thanks, don - 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]
[geneal] Builds broken with Maven 1.0.rc3?
Building [lang] and [codec] with Maven 1.0.rc3, I get: [echo] Generating the Clover... maven-clover-plugin:report: clover:report: clover:test: clover:init: [taskdef] Could not load definitions from resource clovertasks. It could not be found. [typedef] Could not load definitions from resource clovertypes. It could not be found. Do other projects have the same problem? Can I fix this with some kind of local repos refresh command or is it a real issue? Thanks, Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[VOTE][betwixt] plan for betwixt 0.5 release
(this is vote for the release plan rather than the actual release.) betwixt 0.5 is intended to be a baseline release to give the existing community of betwixt users a stable but limited full release based on the alpha-1.0 code stream. it is not intended to add features (though it adds a few), fix bugs (though it fixes a bug) or to establish a stable API for the future. i'll volunteer to cut this release based on the simple plan i've outlined on the wiki (http://wiki.apache.org/jakarta-commons/Betwixt/0_2e5ReleasePlan). i'd like to get this going quickly so that a branch can be created for the release and development can continue on the HEAD. so, i'll count the votes on saturday morning (GMT). this is a vote by lazy consensus. here's my +1. - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [geneal] Builds broken with Maven 1.0.rc3?
Hi, Try removing your .maven directory (or wherever your plugins are kept) to force maven to download its plugins again. Yoav Shapira Millennium Research Informatics -Original Message- From: Gary Gregory [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 3:48 PM To: Jakarta Commons Developers List Subject: [geneal] Builds broken with Maven 1.0.rc3? Building [lang] and [codec] with Maven 1.0.rc3, I get: [echo] Generating the Clover... maven-clover-plugin:report: clover:report: clover:test: clover:init: [taskdef] Could not load definitions from resource clovertasks. It could not be found. [typedef] Could not load definitions from resource clovertypes. It could not be found. Do other projects have the same problem? Can I fix this with some kind of local repos refresh command or is it a real issue? Thanks, Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DBCP][Pool] Release status
Looks like everybody is busy. Current VOTE status: +1 Dirk Verbeeck +1 Noel J. Bergman +0 Shapira, Yoav We can do better then this ;-) So, everybody fire up your favorite test application and give DBCP/Pool a good workout... and cast your VOTEs From the charter: As stated in the Jakarta guidelines, an action requiring majority approval must receive at least 3 binding +1 votes and more +1 votes than -1 votes. Release candidates/procedures are a good thing but only if there enough people to test/review the delivery. This being said. Next release target is beginning of next week or later? -- Dirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [geneal] Builds broken with Maven 1.0.rc3?
Success! Thank you, Gary -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 12:50 To: Jakarta Commons Developers List Subject: RE: [geneal] Builds broken with Maven 1.0.rc3? Hi, Try removing your .maven directory (or wherever your plugins are kept) to force maven to download its plugins again. Yoav Shapira Millennium Research Informatics -Original Message- From: Gary Gregory [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 3:48 PM To: Jakarta Commons Developers List Subject: [geneal] Builds broken with Maven 1.0.rc3? Building [lang] and [codec] with Maven 1.0.rc3, I get: [echo] Generating the Clover... maven-clover-plugin:report: clover:report: clover:test: clover:init: [taskdef] Could not load definitions from resource clovertasks. It could not be found. [typedef] Could not load definitions from resource clovertypes. It could not be found. Do other projects have the same problem? Can I fix this with some kind of local repos refresh command or is it a real issue? Thanks, Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T13:07:05 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -42,7 +42,50 @@ === Bug Review === -Review current bugs +Review current bugs: + +19781 Nor NEW PropertyUtils.copyProperties throws exceptions contrary to +21618 Nor NEW MappedPropertyDescriptor requires more permissions than nece +23108 Nor NEW Setting complex mapped properties using PropertyUtils +23383 Nor NEW MappedPropertyDescriptor broken +23815 Nor REOP PropertyUtils.getNestedProperty() doesn't allow getXxxx on M +24941 Nor ASSI LocaleBeanUtils.populate() doesn't accept localized input ma +25539 Nor NEW Using copyProperties and SQL Dates +26904 Nor NEW (g|s)etSimpleProperty fails when passing a Map +27381 Nor NEW Bean Utilities: add BeanComparator.equals() +27633 Nor NEW java.lang.IllegalArgumentException in BeanUtils.copyProperti +27760 Nor NEW MappedPropertyDescriptor wont recognize boolean property acc +27809 Nor NEW [bean] DecimalLocaleConverter is not thread-safe +27965 Nor NEW Writing to a mapped property requires a setter for a map, bu +28254 Nor NEW getIndexedProperty problems on JDK 1.4.1 +28358 Nor NEW Problems on indexed property with JDK 1.4 +28684 Nor NEW BigDecimalLocaleConverter seems not working as designed +28813 Nor NEW Can't use . (dot) in mapped properties for setProperty or ge +18811 Min NEW Misleading error message in ConvertingWrapDynaBean +29203 Min NEW Indexed properties with Array type cause IllegalArgumentExce +7135 Enh REOP [beanutils] Misleading error message when beaninfo class con +7226 Enh REOP Nested Bean Collection +10319 Enh NEW Instantiate property if null in form bean +13743 Enh REOP Need getPropertyType(Class theClass, String propName) +15451 Enh REOP Multiple mapped properties not possible / Direct maps and in +16038 Enh REOP [beanutils] LocaleBeanUtils.copyProperties() does not use Lo +16525 Enh REOP BeanUtils.setProperty is over-zealous at converting types +17002 Enh REOP Problem with index property +17501 Enh NEW Add dynamic discovery of mapped properties to PropertyUtils +18087 Enh NEW Add BeanFactory class for dynamic factories. +18942 Enh NEW Add t/f to BooleanConverter +19857 Enh NEW Methods ConvertUtilsBean.convert could check for converters +20027 Enh NEW ConvertUtils enhancements +20520 Enh NEW [beanutils] MethodUtils: Need easy way to invoke static meth +20549 Enh NEW Handling of exceptions thrown during BeanUtils.populate +20686 Enh NEW register converters by both target class and source class +20836 Enh NEW Localizing beanutils +20968 Enh NEW [PATCH] Include bean getClass in PropertyUtilsBean Exception +21076 Enh NEW Add aggressive mode for BeanUtils.copyProperty() +21483 Enh NEW BeanUtils and PropertyUtils toString function (code included +21693 Enh NEW copyProperties method should not exit as soon as it gets Exc +24185 Enh NEW Enhancement to ResultSetDynaClass to allow case-insensitive +27074 Enh NEW Add nullate utilities === Bug Fix === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T13:08:39 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -45,46 +45,87 @@ Review current bugs: 19781 Nor NEW PropertyUtils.copyProperties throws exceptions contrary to + 21618 Nor NEW MappedPropertyDescriptor requires more permissions than nece + 23108 Nor NEW Setting complex mapped properties using PropertyUtils + 23383 Nor NEW MappedPropertyDescriptor broken + 23815 Nor REOP PropertyUtils.getNestedProperty() doesn't allow getXxxx on M + 24941 Nor ASSI LocaleBeanUtils.populate() doesn't accept localized input ma + 25539 Nor NEW Using copyProperties and SQL Dates + 26904 Nor NEW (g|s)etSimpleProperty fails when passing a Map + 27381 Nor NEW Bean Utilities: add BeanComparator.equals() + 27633 Nor NEW java.lang.IllegalArgumentException in BeanUtils.copyProperti + 27760 Nor NEW MappedPropertyDescriptor wont recognize boolean property acc + 27809 Nor NEW [bean] DecimalLocaleConverter is not thread-safe + 27965 Nor NEW Writing to a mapped property requires a setter for a map, bu + 28254 Nor NEW getIndexedProperty problems on JDK 1.4.1 + 28358 Nor NEW Problems on indexed property with JDK 1.4 + 28684 Nor NEW BigDecimalLocaleConverter seems not working as designed + 28813 Nor NEW Can't use . (dot) in mapped properties for setProperty or ge + 18811 Min NEW Misleading error message in ConvertingWrapDynaBean + 29203 Min NEW Indexed properties with Array type cause IllegalArgumentExce + 7135 Enh REOP [beanutils] Misleading error message when beaninfo class con + 7226 Enh REOP Nested Bean Collection + 10319 Enh NEW Instantiate property if null in form bean + 13743 Enh REOP Need getPropertyType(Class theClass, String propName) + 15451 Enh REOP Multiple mapped properties not possible / Direct maps and in + 16038 Enh REOP [beanutils] LocaleBeanUtils.copyProperties() does not use Lo + 16525 Enh REOP BeanUtils.setProperty is over-zealous at converting types + 17002 Enh REOP Problem with index property + 17501 Enh NEW Add dynamic discovery of mapped properties to PropertyUtils + 18087 Enh NEW Add BeanFactory class for dynamic factories. + 18942 Enh NEW Add t/f to BooleanConverter + 19857 Enh NEW Methods ConvertUtilsBean.convert could check for converters + 20027 Enh NEW ConvertUtils enhancements + 20520 Enh NEW [beanutils] MethodUtils: Need easy way to invoke static meth + 20549 Enh NEW Handling of exceptions thrown during BeanUtils.populate + 20686 Enh NEW register converters by both target class and source class + 20836 Enh NEW Localizing beanutils + 20968 Enh NEW [PATCH] Include bean getClass in PropertyUtilsBean Exception + 21076 Enh NEW Add aggressive mode for BeanUtils.copyProperty() + 21483 Enh NEW BeanUtils and PropertyUtils toString function (code included + 21693 Enh NEW copyProperties method should not exit as soon as it gets Exc + 24185 Enh NEW Enhancement to ResultSetDynaClass to allow case-insensitive + 27074 Enh NEW Add nullate utilities === Bug Fix === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29294] - [lang][PATCH] lang.math.Fraction class deficiencies
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29294. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29294 [lang][PATCH] lang.math.Fraction class deficiencies --- Additional Comments From [EMAIL PROTECTED] 2004-06-03 20:14 --- Imported from commons-dev mailing list discussion for archival here: From: Stephen Colebourne Subject: Re: [lang] [math] org.apache.commons.lang.math.Fraction class I had a 5 second look yesterday, and realised how big the change is. My immediate concern is that the Fraction class has lost its final status, making it less immutable. I was wondering whether it would be possible to have just one class (rather than an additional BadFraction subclass) that held an additional field only used when using non-reduced fractions. Effectively merging the two classes into one? Also, I wasn't sure what 'relatively prime' actually meant. Its probably too mathematical for the target audience in [lang]. Finally, I believe that [lang] is the right place for these (including BigFraction). They represent missing parts of the JDK, so [lang] is appropriate. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29294] - [lang][PATCH] lang.math.Fraction class deficiencies
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29294. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29294 [lang][PATCH] lang.math.Fraction class deficiencies --- Additional Comments From [EMAIL PROTECTED] 2004-06-03 20:18 --- My response to Stephen's comments (slightly edited for brevity): From: C. Scott Ananian On Thu, 3 Jun 2004, Stephen Colebourne wrote: I had a 5 second look yesterday, and realised how big the change is. My immediate concern is that the Fraction class has lost its final status, making it less immutable. The idea is to remove the deprecated methods in some future version of lang; at which point Fraction can be made final again (and BadFraction completely disappears). It would be harder to purge BadFraction if its code is mixed willy-nilly with the 'real' Fraction code. The constructor for Fraction is package-private (or should be!) so no one outside the lang package can create a subclass in any case. Also, I wasn't sure what 'relatively prime' actually meant. Its probably too mathematical for the target audience in [lang]. Formal definition: http://mathworld.wolfram.com/RelativelyPrime.html It just means that there is no integer greater than one which divides both numbers evenly (gcd(x,y)==1), or (equivalently) that the fraction is simplified. I'll be glad to add that to the javadoc. Finally, I believe that [lang] is the right place for these (including BigFraction). They represent missing parts of the JDK, so [lang] is appropriate. ok. --scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:19:55 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -139,9 +139,14 @@ Exception handling: 19781, +To Be Fixed: + 21618 + === Bug Fix === Fix any bugs highlighted by the review. + +Fixed: 21618 === Check Compatibility === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:20:58 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -137,7 +137,10 @@ Analyse them into groups: Exception handling: - 19781, + 19781 + +Bean Query Language + 23108 To Be Fixed: 21618 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:22:16 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -142,7 +142,10 @@ Bean Query Language 23108 -To Be Fixed: +Mapped Properties + 23383 + +To Be Fixed 21618 === Bug Fix === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VOTE][betwixt] plan for betwixt 0.5 release
+1 - Original Message - From: robert burrell donkin [EMAIL PROTECTED] To: Jakarta Commons Developers List [EMAIL PROTECTED] Sent: Thursday, June 03, 2004 8:48 PM Subject: [VOTE][betwixt] plan for betwixt 0.5 release (this is vote for the release plan rather than the actual release.) betwixt 0.5 is intended to be a baseline release to give the existing community of betwixt users a stable but limited full release based on the alpha-1.0 code stream. it is not intended to add features (though it adds a few), fix bugs (though it fixes a bug) or to establish a stable API for the future. i'll volunteer to cut this release based on the simple plan i've outlined on the wiki (http://wiki.apache.org/jakarta-commons/Betwixt/0_2e5ReleasePlan). i'd like to get this going quickly so that a branch can be created for the release and development can continue on the HEAD. so, i'll count the votes on saturday morning (GMT). this is a vote by lazy consensus. here's my +1. - robert - 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]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:24:18 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -145,6 +145,9 @@ Mapped Properties 23383 +Think About + 23815 + To Be Fixed 21618 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29351] - [io] FilenameUtils#removeExtension and FilenameUtils#getExtension don't handle all cases.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29351. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29351 [io] FilenameUtils#removeExtension and FilenameUtils#getExtension don't handle all cases. [EMAIL PROTECTED] changed: What|Removed |Added Summary|FilenameUtils#removeExtensio|[io] |n and |FilenameUtils#removeExtensio |FilenameUtils#getExtension |n and |don't handle all cases. |FilenameUtils#getExtension ||don't handle all cases. --- Additional Comments From [EMAIL PROTECTED] 2004-06-03 21:26 --- These functions were deliberately removed from [io] 1.0. Patches like these will aid in the creation of v1.1 including FilenameUtils. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:25:32 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -148,6 +148,9 @@ Think About 23815 +Localization + 24941 + To Be Fixed 21618 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:27:03 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -151,6 +151,9 @@ Localization 24941 +To Be Fixed (Probables) + 25539 + To Be Fixed 21618 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29356] - [collection] ListOrderedSet doesn't implements SortedSet
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29356. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29356 [collection] ListOrderedSet doesn't implements SortedSet [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX Summary|ListOrderedSet doesn't |[collection] ListOrderedSet |implements SortedSet|doesn't implements SortedSet --- Additional Comments From [EMAIL PROTECTED] 2004-06-03 21:28 --- Yes. Because a SortedSet must be sorted (A-Z or Z-A or 1-100 or some other sorting order). The iterator returns this sorted order no matter what order the elements are added in. ListOrderedSet simply maintains the order in which the elements are added to the set. The iterator always returns the order of adding the elements. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:28:03 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -143,7 +143,7 @@ 23108 Mapped Properties - 23383 + 23383 26904 Think About 23815 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Collections] MultiMap status?
MultiMap is an interface for multiple values mapped to one key. MultiHashMap is the sole implementation, and has had new methods added in v3.1 (soon). MultiKey is a standalone key class that can be used in any collection to store multiple keys/objects in one object. MultiKeyMap is a new v3.1 class that provides an ideal API for mapping multiple keys to one value. The tasks list is clearly a bit out of date, and I wouldn't particularly want to go down the subpackage route now. Did you have a use case not covered by the above? Stephen - Original Message - From: Paul Gear [EMAIL PROTECTED] Just wondering what the present preferred API for using maps that allow multiple keys is. The tasks list for Commons Collections says: MultiMap subpackage implementing a revised interface Where should i go if i want to work on this? And another small question: why the restriction on spaces rather than tabs in submitted code? Are you trying to torture everyone who uses vi correctly? :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29294] - [lang][PATCH] lang.math.Fraction class deficiencies
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29294. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29294 [lang][PATCH] lang.math.Fraction class deficiencies --- Additional Comments From [EMAIL PROTECTED] 2004-06-03 21:36 --- Created an attachment (id=11757) Small patch to explain relatively prime in the javadoc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/beanutils/optional/bean-collections/src/java/org/apache/commons/beanutils BeanComparator.java
rdonkin 2004/06/03 14:36:39 Modified: beanutils/optional/bean-collections/src/java/org/apache/commons/beanutils BeanComparator.java Log: Added equals and hashcode. Fixes bug #27381. Patch submitted by Brian Westrich. Revision ChangesPath 1.2 +32 -0 jakarta-commons/beanutils/optional/bean-collections/src/java/org/apache/commons/beanutils/BeanComparator.java Index: BeanComparator.java === RCS file: /home/cvs/jakarta-commons/beanutils/optional/bean-collections/src/java/org/apache/commons/beanutils/BeanComparator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- BeanComparator.java 10 May 2004 19:57:58 - 1.1 +++ BeanComparator.java 3 Jun 2004 21:36:39 - 1.2 @@ -155,5 +155,37 @@ throw new ClassCastException( e.toString() ); } } + +/** + * Two codeBeanComparator/code's are equals if and only if + * the wrapped comparators and the property names to be compared + * are equal. + */ +public boolean equals(Object o) { +if (this == o) return true; +if (!(o instanceof BeanComparator)) return false; +final BeanComparator beanComparator = (BeanComparator) o; + +if (!comparator.equals(beanComparator.comparator)) return false; +if (property != null) +{ +if (!property.equals(beanComparator.property)) return false; +} +else +{ +return (beanComparator.property == null); +} + +return true; +} + +/** + * Hashcode compatible with equals. + */ +public int hashCode() { +int result; +result = comparator.hashCode(); +return result; +} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27381] - Bean Utilities: add BeanComparator.equals()
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=27381. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=27381 Bean Utilities: add BeanComparator.equals() [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED Summary|Bean Utilities: add |Bean Utilities: add |BeanComparator.equals() |BeanComparator.equals() --- Additional Comments From [EMAIL PROTECTED] 2004-06-03 21:37 --- Committed. Many thanks. Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:38:03 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -137,7 +137,7 @@ Analyse them into groups: Exception handling: - 19781 + 19781 27633 Bean Query Language 23108 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:38:44 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -137,7 +137,7 @@ Analyse them into groups: Exception handling: - 19781 27633 + 19781 27633 27633 Bean Query Language 23108 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:39:39 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -151,6 +151,9 @@ Localization 24941 +To Disprove (with unit test) + 27760 + To Be Fixed (Probables) 25539 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/locale/converters DecimalLocaleConverter.java
rdonkin 2004/06/03 14:49:31 Modified:beanutils/src/java/org/apache/commons/beanutils/locale/converters DecimalLocaleConverter.java Log: Fixed thread safety issue with DecimalFormat. Raised in issue #27809 Revision ChangesPath 1.9 +3 -5 jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java Index: DecimalLocaleConverter.java === RCS file: /home/cvs/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/locale/converters/DecimalLocaleConverter.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- DecimalLocaleConverter.java 28 Feb 2004 13:18:35 - 1.8 +++ DecimalLocaleConverter.java 3 Jun 2004 21:49:31 - 1.9 @@ -46,9 +46,6 @@ /** All logging goes through this logger */ private static Log log = LogFactory.getLog(DecimalLocaleConverter.class); -/** The Decimal formatter */ -private DecimalFormat formatter = null; - // --- Constructors /** @@ -211,7 +208,7 @@ public DecimalLocaleConverter(Object defaultValue, Locale locale, String pattern, boolean locPattern) { super(defaultValue, locale, pattern, locPattern); - formatter = (DecimalFormat) DecimalFormat.getInstance(locale); + } // - Methods @@ -227,7 +224,8 @@ * successfully */ protected Object parse(Object value, String pattern) throws ParseException { - +// DecimalFormat is not thread safe so best to construct one each time +DecimalFormat formatter = (DecimalFormat) DecimalFormat.getInstance(locale); // if some constructors default pattern to null, it makes only sense to handle null pattern gracefully if (pattern != null) { if (locPattern) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27809] - [bean] DecimalLocaleConverter is not thread-safe
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=27809. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=27809 [bean] DecimalLocaleConverter is not thread-safe [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-06-03 21:50 --- Patched. Thanks for spotting this one. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:50:06 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -158,13 +158,13 @@ 25539 To Be Fixed - 21618 27381 + 21618 27381 27809 === Bug Fix === Fix any bugs highlighted by the review. -Fixed: 21618 27381 +Fixed: 21618 27381 27809 === Check Compatibility === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [lang] [math] org.apache.commons.lang.math.Fraction class
On Thu, 3 Jun 2004, Stephen Colebourne wrote: This presumes that everyone wants a reduced fraction. I believe that there are use cases for holding an unreduced one. The main one that strikes me is education. The org.apache.commons.math.Fraction class is not targetted at education. It's intended to be useful for working programmers. If people complain about the deprecation, then the methods can be undeprecated. I doubt that will be the case. Somewhere along the line I've lost the reason why we should deprecate unreduced fractions. They are a valid representation of a fraction (so long as the internal calculations are done properly), so why not allow them? The primary reason is programmer convenience. Fractions will overflow unless simplified regularly. Further, the user will 'expect' that 1/2==2/4. Maintaining in 'simplified form' also allows more predictable overflow behavior. By making this the actual behavior, potential bugs are eliminated, and the user is not surprised. Again, it's not like the deprecation can't be removed during alpha, beta, or after release or some vocal existing user appears. BTW, the 2/4 != 1/2 is consistent with the JDK - classes like BigDecimal IIRC will have similar 'odd' behaviour, eg 0.500 != 0.5. In BigDecimal these numbers are arguably different: they have different precisions and thus round differently. For example: divide(0.5,2) != divide(0.500,2) Fraction is not intended to be used in this manner. Fractions are not rounded. Computing with an unsimplified fraction may result in overflow when a simplified fraction will not, but that is not a specifically-desired behavior (nor is it a well-specified one). Is there any other example of such behavior in the JDK? --scott Clinton Seattle Chechnya East Timor genetic plutonium NRA cryptographic colonel Panama cracking Sabana Seca WTO global action network corporate globalization ( http://cscott.net/ ) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:50:45 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -143,7 +143,7 @@ 23108 Mapped Properties - 23383 26904 + 23383 26904 27809 Think About 23815 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:54:12 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -158,13 +158,13 @@ 25539 To Be Fixed - 21618 27381 27809 + 21618 27381 27809 28684 === Bug Fix === Fix any bugs highlighted by the review. -Fixed: 21618 27381 27809 +Fixed: 21618 27381 27809 === Check Compatibility === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-06-03T14:54:58 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -143,7 +143,7 @@ 23108 Mapped Properties - 23383 26904 27809 + 23383 26904 27809 28813 Think About 23815 28254 28358 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Collections] MultiMap status?
Stephen Colebourne wrote: MultiMap is an interface for multiple values mapped to one key. MultiHashMap is the sole implementation, and has had new methods added in v3.1 (soon). MultiKey is a standalone key class that can be used in any collection to store multiple keys/objects in one object. MultiKeyMap is a new v3.1 class that provides an ideal API for mapping multiple keys to one value. The tasks list is clearly a bit out of date, and I wouldn't particularly want to go down the subpackage route now. Did you have a use case not covered by the above? I couldn't find any documentation that indicated the above classes existed. Which package are they in? That's why i started asking about the task list. -- Paul http://paulgear.webhop.net -- Think context! Using accepted quoting conventions makes your email easier to understand. Learn how at http://www.netmeister.org/news/learn2quote.html. signature.asc Description: OpenPGP digital signature
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/set PredicatedSet.java TransformedSet.java SynchronizedSet.java PredicatedSortedSet.java ListOrderedSet.java SynchronizedSortedSet.java UnmodifiableSet.java TransformedSortedSet.java
scolebourne2004/06/03 15:02:13 Modified:collections/src/java/org/apache/commons/collections/bag TransformedBag.java TransformedSortedBag.java PredicatedBag.java PredicatedSortedBag.java SynchronizedBag.java SynchronizedSortedBag.java collections/src/java/org/apache/commons/collections/list UnmodifiableList.java TransformedList.java PredicatedList.java SynchronizedList.java FixedSizeList.java SetUniqueList.java LazyList.java collections/src/java/org/apache/commons/collections/buffer TransformedBuffer.java BlockingBuffer.java PredicatedBuffer.java SynchronizedBuffer.java CircularFifoBuffer.java collections/src/java/org/apache/commons/collections/collection TransformedCollection.java UnmodifiableCollection.java PredicatedCollection.java UnmodifiableBoundedCollection.java SynchronizedCollection.java collections/src/java/org/apache/commons/collections/set PredicatedSet.java TransformedSet.java SynchronizedSet.java PredicatedSortedSet.java ListOrderedSet.java SynchronizedSortedSet.java UnmodifiableSet.java TransformedSortedSet.java Log: Make decorator classes serializable, bug 18815 Revision ChangesPath 1.7 +4 -1 jakarta-commons/collections/src/java/org/apache/commons/collections/bag/TransformedBag.java Index: TransformedBag.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bag/TransformedBag.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TransformedBag.java 2 Jun 2004 21:56:19 - 1.6 +++ TransformedBag.java 3 Jun 2004 22:02:12 - 1.7 @@ -40,6 +40,9 @@ public class TransformedBag extends TransformedCollection implements Bag { +/** Serialization version */ +private static final long serialVersionUID = 5421170911299074185L; + /** * Factory method to create a transforming bag. * p 1.7 +4 -1 jakarta-commons/collections/src/java/org/apache/commons/collections/bag/TransformedSortedBag.java Index: TransformedSortedBag.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bag/TransformedSortedBag.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TransformedSortedBag.java 2 Jun 2004 21:56:19 - 1.6 +++ TransformedSortedBag.java 3 Jun 2004 22:02:12 - 1.7 @@ -38,6 +38,9 @@ public class TransformedSortedBag extends TransformedBag implements SortedBag { +/** Serialization version */ +private static final long serialVersionUID = -251737742649401930L; + /** * Factory method to create a transforming sorted bag. * p 1.8 +4 -1 jakarta-commons/collections/src/java/org/apache/commons/collections/bag/PredicatedBag.java Index: PredicatedBag.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bag/PredicatedBag.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PredicatedBag.java2 Jun 2004 21:56:19 - 1.7 +++ PredicatedBag.java3 Jun 2004 22:02:12 - 1.8 @@ -43,6 +43,9 @@ public class PredicatedBag extends PredicatedCollection implements Bag { +/** Serialization version */ +private static final long serialVersionUID = -2575833140344736876L; + /** * Factory method to create a predicated (validating) bag. * p 1.8 +4 -1 jakarta-commons/collections/src/java/org/apache/commons/collections/bag/PredicatedSortedBag.java Index: PredicatedSortedBag.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bag/PredicatedSortedBag.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PredicatedSortedBag.java 2 Jun 2004 21:56:19 - 1.7 +++ PredicatedSortedBag.java 3 Jun 2004 22:02:12 - 1.8 @@ -42,6 +42,9 @@ public class PredicatedSortedBag extends PredicatedBag implements SortedBag { +/** Serialization version */ +private static final long
Re: [Collections] MultiMap status?
From: Paul Gear [EMAIL PROTECTED] I couldn't find any documentation that indicated the above classes existed. Which package are they in? That's why i started asking about the task list. You will need to obtain the latest CVS contents. MultiKey is in keyvalue package. MultiKeyMap is in the map package. Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [VOTE][Pool] Release Commons-Pool v1.2
+1 Dbcp and pool 1.2 passed our internal test harness. I don't have the time to do a performance stress test on this release at this time but our internal test consisting of 800+ test cases completed successfully with 1.2 Todd Carmichael Concur Technologies -Original Message- From: Dirk Verbeeck [mailto:[EMAIL PROTECTED] Sent: Sunday, May 30, 2004 1:46 PM To: Jakarta Commons Developers List Cc: Jakarta Project Management Committee List Subject: [VOTE][Pool] Release Commons-Pool v1.2 This is a call for a vote to release version 1.2 of Commons Pool. After a 1.5 week review/test period, it's now time to make the final release. There are no unresolved issues, more info below. your votes, please: Release Commons-Pool 1.2 - [ ] +1 I support this release and will help [ ] +0 I support this release but am unable to help [ ] -0 I do not support this release [ ] -1 I do not support this release, and here are my reasons: -- Official Site: http://jakarta.apache.org/commons/pool/ Release Canidate: http://jakarta.apache.org/commons/pool/downloads.html Changes: http://jakarta.apache.org/commons/pool/release-notes-1.2.html -- Dirk Verbeeck - 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: [collections] Re: [GUMP@brutus]: jakarta-commons/commons-collections failed
One of those that succeeds in eclipse but fails in ant. Don't know why, could only really be a mis-generation of the local serialVersionUID in the JDK. Whatever, I've changed [collections] to avoid the issue (I hope). Stephen - Original Message - From: Adam R. B. Jack [EMAIL PROTECTED] I looked into this wondering if somehow Gump had something 'stale' lying around that caused it, but I see it is writing to an in-memory buffer reading from same, so no (at least not there). Could there be some stray class lying around that could be out sync? I find that hard to imagine, but will look if it is likely. Also, since this is writing a class (behind a List interface) to bytes and then reading (hopefully) same class back, I'm somewhat at a loss to see how the problem can even occur. Any pointers? [junit] Testcase: testEmptyListCompatibility(org.apache.commons.collections.list.TestTransform edList) : Caused an ERROR [junit] org.apache.commons.collections.list.TransformedList; local class incompatible: stream classdesc serialVersionUID = 107719303513141, local class serialVersionUID = 368464020144282561 [...] [junit] Testcase: testFullListCompatibility(org.apache.commons.collections.list.TestTransforme dList) : Caused an ERROR [junit] org.apache.commons.collections.list.TransformedList; local class incompatible: stream classdesc serialVersionUID = 107719303513141, local class serialVersionUID = 368464020144282561 regards Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/xdocs tasks.xml
scolebourne2004/06/03 15:12:51 Modified:collections/xdocs tasks.xml Log: Update TODO list Revision ChangesPath 1.4 +2 -4 jakarta-commons/collections/xdocs/tasks.xml Index: tasks.xml === RCS file: /home/cvs/jakarta-commons/collections/xdocs/tasks.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- tasks.xml 18 Feb 2004 00:54:12 - 1.3 +++ tasks.xml 3 Jun 2004 22:12:51 - 1.4 @@ -27,14 +27,12 @@ section name=Tasks outstanding p -The following tasks are on the TODO list: +The following ideas are on the TODO list, +but please contact the mailing list before starting work: /p ul -liSynchronized Map decorators/li liSynchronized BidiMap decorators/li -liSerializable decorators/li -liMultiMap subpackage implementing a revised interface/li liIdentitySet/li liBidiMapUtils/li liLoopingListIterator/li - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [collections] [PATCH] Commons Collections - Wrapper and
I added PredicateDecorator marker interface. Stephen - Original Message - From: Sandor Murakozi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 10:49 AM Subject: Re: [collections] [PATCH] Commons Collections - Wrapper and Hi Stephen, I also think a kind marker interface would be nice. If someone wants to travel a tree of predicates (which is needed to display it's structure, save it, almost anything except building and simply invoking it) then it would be extremely useful. It would be also handy if you want to handle different types of Predicates differently. I think a great part of Predicate users will need some similar functionality (including me in my actual project :-)). Now we have to create our reflection based solution, or huge if else-if statements (br) , so I would vote on marker interfaces. And yes, it would probably open the door, but is it really a problem? (I use only predicates at this time, so I'm not a transformer expert, but I can imagine transformer users with the same problem then me). BR, don Thank you for your patch. I'm not certain as to how to procede on this one. There is nothing wrong with your patch or idea. The problem is that it opens the door to accessing other functors such as Transformer and Closure. How far does this go? One idea I have considered is to have a single generic Decorator interface that specifies one method which returns a predicate. Another idea is to use reflection, with a single method on PredicateUtils to access this functionality. This might be less intrusive, but perhaps is also less obvious. Not sure, any opinions? Stephen - Original Message - From: Brian Lloyd-Newberry [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 14, 2004 6:38 PM Subject: [PATCH] Commons Collections - Wrapper and Composite Predicates Commons Collections developers, In looking at the 3.1-dev source I see that some implementations of the Predicate objects have: Predicate getPredicate() or Predicate[] getPredicates() methods. This is a good thing for me, as I am developing a search interface and would like to be able to use predicates in the search/filter process, and be able to do a display of the predicate expression structure. I observe that there are basic types of predicates. Ones which operate on Objects, ones that operate on a single (sub)Predicate and ones which operate on more than one Predicate. I propose that the single and multiple cases be tagged using an interface so that the appropriate getPredicate() or getPredicates() method can be found. I have attached a patch and 2 new interfaces (WrapperPredicate.java and CompositePredicate.java) which provide the functionality I propose. WrapperPredicate declares Predicate getPredicate(). CompositePredicate declares Iterator predicates(), shielding the CompositePredicate from modification (the Iterator returned is Unmodifiable) that the Predicate[] getPredicates[] implementation would allow unless a defensive copy was made before the return took place. If you have any questions or concerns about my implementation please let me know. This is my first patch on a Jakarta project, so I hope I have done everything correctly (cvs diff -u). Thank you for your work and for providing such a useful library of collections to the community. -Brian Brian S. Lloyd-Newberry Software Engineer RBS, Inc http://www.rbs2000.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/data/test FixedSizeSortedMap.fullCollection.version3.1.obj FixedSizeSortedMap.emptyCollection.version3.1.obj
scolebourne2004/06/03 15:26:52 Modified:collections/src/java/org/apache/commons/collections/map FixedSizeSortedMap.java collections/data/test FixedSizeSortedMap.fullCollection.version3.1.obj FixedSizeSortedMap.emptyCollection.version3.1.obj Log: Reinstate FixedSizeSortedMap superclass to avoid binary incompatibility Revision ChangesPath 1.8 +79 -13 jakarta-commons/collections/src/java/org/apache/commons/collections/map/FixedSizeSortedMap.java Index: FixedSizeSortedMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/FixedSizeSortedMap.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- FixedSizeSortedMap.java 9 Apr 2004 10:36:01 - 1.7 +++ FixedSizeSortedMap.java 3 Jun 2004 22:26:52 - 1.8 @@ -15,9 +15,20 @@ */ package org.apache.commons.collections.map; -import java.util.Comparator; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.util.Collection; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; import java.util.SortedMap; +import org.apache.commons.collections.BoundedMap; +import org.apache.commons.collections.collection.UnmodifiableCollection; +import org.apache.commons.collections.set.UnmodifiableSet; + /** * Decorates another codeSortedMap/code to fix the size blocking add/remove. * p @@ -40,8 +51,11 @@ * @author Paul Jack */ public class FixedSizeSortedMap -extends FixedSizeMap -implements SortedMap { +extends AbstractSortedMapDecorator +implements SortedMap, BoundedMap, Serializable { + +/** Serialization version */ +private static final long serialVersionUID = 3126019624511683653L; /** * Factory method to create a fixed size sorted map. @@ -64,7 +78,6 @@ super(map); } -//--- /** * Gets the map being decorated. * @@ -75,6 +88,63 @@ } //--- +/** + * Write the map out using a custom routine. + */ +private void writeObject(ObjectOutputStream out) throws IOException { +out.defaultWriteObject(); +out.writeObject(map); +} + +/** + * Read the map in using a custom routine. + */ +private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { +in.defaultReadObject(); +map = (Map) in.readObject(); +} + +//--- +public Object put(Object key, Object value) { +if (map.containsKey(key) == false) { +throw new IllegalArgumentException(Cannot put new key/value pair - Map is fixed size); +} +return map.put(key, value); +} + +public void putAll(Map mapToCopy) { +for (Iterator it = mapToCopy.keySet().iterator(); it.hasNext(); ) { +if (mapToCopy.containsKey(it.next()) == false) { +throw new IllegalArgumentException(Cannot put new key/value pair - Map is fixed size); +} +} +map.putAll(mapToCopy); +} + +public void clear() { +throw new UnsupportedOperationException(Map is fixed size); +} + +public Object remove(Object key) { +throw new UnsupportedOperationException(Map is fixed size); +} + +public Set entrySet() { +Set set = map.entrySet(); +return UnmodifiableSet.decorate(set); +} + +public Set keySet() { +Set set = map.keySet(); +return UnmodifiableSet.decorate(set); +} + +public Collection values() { +Collection coll = map.values(); +return UnmodifiableCollection.decorate(coll); +} + +//--- public SortedMap subMap(Object fromKey, Object toKey) { SortedMap map = getSortedMap().subMap(fromKey, toKey); return new FixedSizeSortedMap(map); @@ -90,16 +160,12 @@ return new FixedSizeSortedMap(map); } -public Comparator comparator() { -return getSortedMap().comparator(); -} - -public Object firstKey() { -return getSortedMap().firstKey(); +public boolean isFull() { +return true; } -public Object lastKey() { -return getSortedMap().lastKey(); +public int
cvs commit: jakarta-commons/collections RELEASE-NOTES.html
scolebourne2004/06/03 15:59:56 Modified:collections RELEASE-NOTES.html Log: Reinstate FixedSizeSortedMap superclass to avoid binary incompatibility Revision ChangesPath 1.56 +0 -1 jakarta-commons/collections/RELEASE-NOTES.html Index: RELEASE-NOTES.html === RCS file: /home/cvs/jakarta-commons/collections/RELEASE-NOTES.html,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- RELEASE-NOTES.html2 Jun 2004 23:29:12 - 1.55 +++ RELEASE-NOTES.html3 Jun 2004 22:59:56 - 1.56 @@ -27,7 +27,6 @@ centerh3COMPATABILITY/h3/center ul liReferenceMap - No longer extends AbstractMap, only an issue if you previously cast to AbstractMap/li -liFixedSizeSortedMap - No longer extends AbstractSortedMapDecorator, only an issue if you previously cast to AbstractSortedMapDecorator/li /ul centerh3NEW CLASSES/h3/center - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DBUtils] Oracle null/Invalid Column Type
--- Hernan Silberman [EMAIL PROTECTED] wrote: From Oracle: From an internal bug it does not appear that we have implemented Types.OTHER. Apparently Types.OTHER is very loosely defined in the JDBC Spec and Oracle has just not implemented it. I don't understand this quote. Is an Oracle person referring to Oracle corp. in the first person in the first sentence and the third person in the second sentence? Can you provide the url, if there is one, to this statement? David I've been studying the JDBC spec to understand what I can expect a compliant driver to do with setNull(idx,Types.OTHER) and I haven't come across anything yet that I would consider a mandate. I'll post again if I do, but for now, it seems like we should beware when using DBUtils (and JDBC in general) Oracle's drivers. hernan On Wed, 2 Jun 2004, David Graham wrote: I recently ran into this problem as well. Using Types.OTHER and Types.NULL don't work but using Types.INTEGER, Types.NUMERIC, etc. do regardless of what the actual column type is. A while back I tested this with Postgres and OTHER did work so I'm not sure if it's an Oracle bug or just an unclear part of the spec. For now, you can just override the QueryRunner.fillStatement() method to workaround the problem. David --- Hernan Silberman [EMAIL PROTECTED] wrote: I've run into a JDBC issue that I haven't found good help on elsewhere so I thought I'd bring it up. I'm using Oracle driver v9.2.0. QueryRunner's fillStatement deals with Java null parameters by doing a setNull(idx,Types.OTHER): protected void fillStatement(PreparedStatement stmt, Object[] params) throws SQLException { if (params == null) { return; } for (int i = 0; i params.length; i++) { if (params[i] != null) { stmt.setObject(i + 1, params[i]); } else { stmt.setNull(i + 1, Types.OTHER); } } } Unfortunately, when the statement gets executed with a null parameter, an exception is thrown in Oracle's JDBC driver which complains with the exception message Invalid column type. I've written a few tests using JDBC and have discovered that using something other than Types.OTHER (like Types.STRING, Types.FLOAT, etc) in the setNull call fixes the problem and unconfuses Oracle's type mapper. I'm not familiar enough with the JDBC spec to know whether setNull(idx,Types.OTHER) is guaranteed to work everywhere and whether or not I'm dealing with a bug Oracle's driver. Seems like a popular RDBMS and I'm wondering if any of you have run into this before and have worked around it. I've found the following reference, though it's not exactly the case I'm running into doesn't provide much help. I see this issue regardless of column/java datatype: http://forums.oracle.com/forums/thread.jsp?forum=99thread=195783 Here's a stack trace: java.sql.SQLException: Invalid column type at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:330) at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:399) at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:451) at com.dw.nile.services.sql.impl.SQLQueryServiceImpl.performUpdate(SQLQueryServiceImpl.java:262) at com.dw.nile.services.sql.rmi.RemoteSQLServiceImpl.performUpdate(RemoteSQLServiceImpl.java:193) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:534) Any guidance is greatly appreciated. thanks! Hernan -- Hernan Silberman PDI/Dreamworks -- Hernan Silberman PDI/Dreamworks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,
Re: [DBCP][Pool] Release status
+0 from me. On Thu, 03 Jun 2004 22:00:39 +0200, Dirk Verbeeck [EMAIL PROTECTED] wrote: Looks like everybody is busy. Current VOTE status: +1 Dirk Verbeeck +1 Noel J. Bergman +0 Shapira, Yoav We can do better then this ;-) So, everybody fire up your favorite test application and give DBCP/Pool a good workout... and cast your VOTEs From the charter: As stated in the Jakarta guidelines, an action requiring majority approval must receive at least 3 binding +1 votes and more +1 votes than -1 votes. Release candidates/procedures are a good thing but only if there enough people to test/review the delivery. This being said. Next release target is beginning of next week or later? -- Dirk - 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: [DBUtils] Oracle null/Invalid Column Type
It's a direct quote from a MetaLink TAR case my DBA opened for me. It's not something that can be accessed publicly from a URL. So yes, it's an Oracle support person referring to Oracle in the third person after referring to it in the first. ;-) Another somewhat useless bit of information: the internal Oracle bug the quote refers to is BUG Reference 3073994, which we have to way of accessing. Bummer. hernan On Thu, 3 Jun 2004, David Graham wrote: --- Hernan Silberman [EMAIL PROTECTED] wrote: From Oracle: From an internal bug it does not appear that we have implemented Types.OTHER. Apparently Types.OTHER is very loosely defined in the JDBC Spec and Oracle has just not implemented it. I don't understand this quote. Is an Oracle person referring to Oracle corp. in the first person in the first sentence and the third person in the second sentence? Can you provide the url, if there is one, to this statement? David I've been studying the JDBC spec to understand what I can expect a compliant driver to do with setNull(idx,Types.OTHER) and I haven't come across anything yet that I would consider a mandate. I'll post again if I do, but for now, it seems like we should beware when using DBUtils (and JDBC in general) Oracle's drivers. hernan On Wed, 2 Jun 2004, David Graham wrote: I recently ran into this problem as well. Using Types.OTHER and Types.NULL don't work but using Types.INTEGER, Types.NUMERIC, etc. do regardless of what the actual column type is. A while back I tested this with Postgres and OTHER did work so I'm not sure if it's an Oracle bug or just an unclear part of the spec. For now, you can just override the QueryRunner.fillStatement() method to workaround the problem. David --- Hernan Silberman [EMAIL PROTECTED] wrote: I've run into a JDBC issue that I haven't found good help on elsewhere so I thought I'd bring it up. I'm using Oracle driver v9.2.0. QueryRunner's fillStatement deals with Java null parameters by doing a setNull(idx,Types.OTHER): protected void fillStatement(PreparedStatement stmt, Object[] params) throws SQLException { if (params == null) { return; } for (int i = 0; i params.length; i++) { if (params[i] != null) { stmt.setObject(i + 1, params[i]); } else { stmt.setNull(i + 1, Types.OTHER); } } } Unfortunately, when the statement gets executed with a null parameter, an exception is thrown in Oracle's JDBC driver which complains with the exception message Invalid column type. I've written a few tests using JDBC and have discovered that using something other than Types.OTHER (like Types.STRING, Types.FLOAT, etc) in the setNull call fixes the problem and unconfuses Oracle's type mapper. I'm not familiar enough with the JDBC spec to know whether setNull(idx,Types.OTHER) is guaranteed to work everywhere and whether or not I'm dealing with a bug Oracle's driver. Seems like a popular RDBMS and I'm wondering if any of you have run into this before and have worked around it. I've found the following reference, though it's not exactly the case I'm running into doesn't provide much help. I see this issue regardless of column/java datatype: http://forums.oracle.com/forums/thread.jsp?forum=99thread=195783 Here's a stack trace: java.sql.SQLException: Invalid column type at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:330) at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:399) at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:451) at com.dw.nile.services.sql.impl.SQLQueryServiceImpl.performUpdate(SQLQueryServiceImpl.java:262) at com.dw.nile.services.sql.rmi.RemoteSQLServiceImpl.performUpdate(RemoteSQLServiceImpl.java:193) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:534)
Re: [codec] base64Codec.decode and DecoderException
Hi, I'd guess not. In Codec 1.1 the (checked) DecoderException was thrown. XML-RPC 2.0 alpha (HEAD) depends on version 1.1 of codec with no known issues. I'd be surprised if we updated to 1.2 this summer. Our stable branch (1.2) has no current or planned dependency on codec because we had our own Base64 implementation. I probably already mentioned that we only need Base64, so we might end up deciding against having a codec dependency. Not long ago the Maven team encountered the same situation and they decided to copy the Base64 source rather than to depend on codec. I'd prefer not to follow suit for a lot of the same reasons we decided to create a shared Base64 implementation in the first place (early 2002 in the sandbox). For various reasons xmlrpc doesn't move very quickly, especially by jakarta standards. So for the time being, we'll probably stick with codec 1.1. Cheers, -- Ryan Hoegg ISIS Networks http://www.isisnetworks.net/ Gary Gregory wrote: Has this been resolved within build_ws-xmlrpc_ws-xmlrpc? I do not see the compile error mentioned in the message below in the page: http://brutus.apache.org:8080/gump/ws-xmlrpc/ws-xmlrpc/gump_work/build_w s- xmlrpc_ws-xmlrpc.html Thank you, Gary -Original Message- From: Adam R. B. Jack [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 09:44 To: Jakarta Commons Developers List Subject: [codec] base64Codec.decode and DecoderException Folks, An interested compatibility issue has surfaced from this: http://brutus.apache.org:8080/gump/ws-xmlrpc/ws-xmlrpc/gump_work/build_w s- xmlrpc_ws-xmlrpc.html /usr/local/gump/public/workspace/ws- xmlrpc/src/java/org/apache/xmlrpc/Defaul tTypeFactory.java:133: exception org.apache.commons.codec.DecoderException is never thrown in body of corresponding try statement [javac] catch (DecoderException e) { [javac] ^ This is the code: public Object createBase64(String cdata) { try { return base64Codec.decode(cdata.getBytes()); } catch (DecoderException e) { //TODO: consider throwing an exception here? return new byte[0]; } } Now since exceptions are not part of the signature of methods, there is probably no runtime issue here. If the exception is not going to be thrown that is the same as it not actually being thrown, I guess. Still, there is a compile time problem and if one removes the catch they can't compile against older codec (assuming that was declared to throw it). Can somebody provide the background information on this exception, from this method, and when (releases) it might've been available and removed? If this exception is never to be thrown again (and better, if it isn't thrown in currently released code) then maybe we can just ask the ws-xmlrpc folks to update. BTW: I don't think there is a way to turn off this compiler error, is there? Would that be appropriate, even if possible? regards, Adam -- Experience the Unwired Enterprise: http://www.sybase.com/unwiredenterprise Try Sybase: http://www.try.sybase.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang WordUtils.java
bayard 2004/06/03 20:58:27 Modified:lang/src/java/org/apache/commons/lang WordUtils.java Log: improved javadoc, and missing javadoc for new uncapitalize method added. Revision ChangesPath 1.13 +33 -3 jakarta-commons/lang/src/java/org/apache/commons/lang/WordUtils.java Index: WordUtils.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/WordUtils.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- WordUtils.java3 Jun 2004 03:49:47 - 1.12 +++ WordUtils.java4 Jun 2004 03:58:27 - 1.13 @@ -246,6 +246,10 @@ * Only the first letter of each word is changed. To change all letters to * the capitalized case, use [EMAIL PROTECTED] #capitalizeFully(String)}./p * + * pThe delimiters represent a set of characters understood to separate words. + * The first string character and the first non-delimiter character after a + * delimiter will be capitalized. /p + * * pA codenull/code input String returns codenull/code. * Capitalization uses the unicode title case, normally equivalent to * upper case./p @@ -257,7 +261,7 @@ * /pre * * @param str the String to capitalize, may be null - * @param delimiters characters to capitalize afterwards + * @param delimiters set of characters to determine capitalization * @return capitalized String, codenull/code if null String input * @see #uncapitalize(String) * @see #capitalizeFully(String) @@ -329,6 +333,10 @@ * pCapitalizes all the delimiter separated words in a String. * All letters are changed, so the resulting string will be fully changed./p * + * pThe delimiters represent a set of characters understood to separate words. + * The first string character and the first non-delimiter character after a + * delimiter will be capitalized. /p + * * pA codenull/code input String returns codenull/code. * Capitalization uses the unicode title case, normally equivalent to * upper case./p @@ -340,7 +348,7 @@ * /pre * * @param str the String to capitalize, may be null - * @param delimiters characters to capitalize afterwards + * @param delimiters set of characters to determine capitalization * @return capitalized String, codenull/code if null String input */ public static String capitalizeFully(String str, char[] delimiters) { @@ -372,6 +380,28 @@ return uncapitalize(str, null); } +/** + * pUncapitalizes all the whitespace separated words in a String. + * Only the first letter of each word is changed./p + * + * pThe delimiters represent a set of characters understood to separate words. + * The first string character and the first non-delimiter character after a + * delimiter will be uncapitalized. /p + * + * pWhitespace is defined by [EMAIL PROTECTED] Character#isWhitespace(char)}. + * A codenull/code input String returns codenull/code./p + * + * pre + * WordUtils.uncapitalize(null)= null + * WordUtils.uncapitalize() = + * WordUtils.uncapitalize(I Am FINE) = i am fINE + * /pre + * + * @param str the String to uncapitalize, may be null + * @param delimiters set of characters to determine uncapitalization + * @return uncapitalized String, codenull/code if null String input + * @see #capitalize(String) + */ public static String uncapitalize(String str, char[] delimiters) { if (str == null || str.length() == 0) { return str; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang WordUtilsTest.java
Thanks, javadoc change made. Hen On Thu, 3 Jun 2004, C. Scott Ananian wrote: On Wed, 3 Jun 2004 [EMAIL PROTECTED] wrote: +/** + * pCapitalizes all the delimiter separated words in a String. delimiter-separated + * Only the first letter of each word is changed. To change all letters to [...] + * @param str the String to capitalize, may be null + * @param delimiters characters to capitalize afterwards characters to capitalize afterwards is not clear -- it doesn't include the first letter in the string, for example. Better would be A set of characters understood to separate words. The first string character and the first non-delimiter character after a delimiter will be capitalized. Alternatively, A set of characters understood to separate words. Each word will have its first character capitalized. + * @param str the String to capitalize, may be null + * @param delimiters characters to capitalize afterwards + * @return capitalized String, codenull/code if null String input + */ +public static String capitalizeFully(String str, char[] delimiters) { Same thing here. @param delimiters A set of characters understood to separate words. All non-delimiter characters will be capitalized. --scott Moscow Marxist mail drop Noriega Panama fissionable Dictionary security COBRA JUDY South Africa Sudan bomb LA overthrow DC OVER THE HORIZON RADAR ( http://cscott.net/ ) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [codec] base64Codec.decode and DecoderException
So, if I am following this ... we need a codec-1.1 module/project (in Gump) against the CODEC_1_1 tag of codec that gives us frozen 1.1 code. Ok, that ought be doable. If nobody sees a problem with this approach, I'll give it a shot. regards, Adam - Original Message - From: Ryan Hoegg [EMAIL PROTECTED] To: Jakarta Commons Developers List [EMAIL PROTECTED] Sent: Thursday, June 03, 2004 8:41 PM Subject: Re: [codec] base64Codec.decode and DecoderException Hi, I'd guess not. In Codec 1.1 the (checked) DecoderException was thrown. XML-RPC 2.0 alpha (HEAD) depends on version 1.1 of codec with no known issues. I'd be surprised if we updated to 1.2 this summer. Our stable branch (1.2) has no current or planned dependency on codec because we had our own Base64 implementation. I probably already mentioned that we only need Base64, so we might end up deciding against having a codec dependency. Not long ago the Maven team encountered the same situation and they decided to copy the Base64 source rather than to depend on codec. I'd prefer not to follow suit for a lot of the same reasons we decided to create a shared Base64 implementation in the first place (early 2002 in the sandbox). For various reasons xmlrpc doesn't move very quickly, especially by jakarta standards. So for the time being, we'll probably stick with codec 1.1. Cheers, -- Ryan Hoegg ISIS Networks http://www.isisnetworks.net/ Gary Gregory wrote: Has this been resolved within build_ws-xmlrpc_ws-xmlrpc? I do not see the compile error mentioned in the message below in the page: http://brutus.apache.org:8080/gump/ws-xmlrpc/ws-xmlrpc/gump_work/build_w s- xmlrpc_ws-xmlrpc.html Thank you, Gary -Original Message- From: Adam R. B. Jack [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 09:44 To: Jakarta Commons Developers List Subject: [codec] base64Codec.decode and DecoderException Folks, An interested compatibility issue has surfaced from this: http://brutus.apache.org:8080/gump/ws-xmlrpc/ws-xmlrpc/gump_work/build_w s- xmlrpc_ws-xmlrpc.html /usr/local/gump/public/workspace/ws- xmlrpc/src/java/org/apache/xmlrpc/Defaul tTypeFactory.java:133: exception org.apache.commons.codec.DecoderException is never thrown in body of corresponding try statement [javac] catch (DecoderException e) { [javac] ^ This is the code: public Object createBase64(String cdata) { try { return base64Codec.decode(cdata.getBytes()); } catch (DecoderException e) { //TODO: consider throwing an exception here? return new byte[0]; } } Now since exceptions are not part of the signature of methods, there is probably no runtime issue here. If the exception is not going to be thrown that is the same as it not actually being thrown, I guess. Still, there is a compile time problem and if one removes the catch they can't compile against older codec (assuming that was declared to throw it). Can somebody provide the background information on this exception, from this method, and when (releases) it might've been available and removed? If this exception is never to be thrown again (and better, if it isn't thrown in currently released code) then maybe we can just ask the ws-xmlrpc folks to update. BTW: I don't think there is a way to turn off this compiler error, is there? Would that be appropriate, even if possible? regards, Adam -- Experience the Unwired Enterprise: http://www.sybase.com/unwiredenterprise Try Sybase: http://www.try.sybase.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[digester] WithDefaultsRulesWrapper ATTN: Robert Donkin
Hi Robert, Why exactly did you create the WithDefaultsRulesWrapper class? ie what is the use case that caused you to create it? I recently tried to associate a rule with the pattern *, with the intention that the rule would fire if-and-only-if no other rule matched the input element. It doesn't work, probably because of this line in RulesBase: if (key.startsWith(*/)) { ie * isn't treated as a wildcard. Wouldn't fixing this code in RulesBase to check for * then provide exactly the same functionality as the new WithDefaultsRulesWrapper class provides? Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unable to find line starting with HTTP
Thank you for your responses. Actually, I can't do anything in the server side because it's managed by an external service provider. I don't know what server are they running but I'll try to find it. I thought the problem was in the client side, but now I think I'll try to ask them to solve the problem. Retrying the requests could be a problem if the server really receives and processes them. I'll tell you about this issue when I know new matters. Juan Pedro López I am seeing this exact same problem with 2.0rc1 as well. A wget to the server from the same client works fine. The httpclient wire log shows that I get a redirect and then the in waiting for the HTTP status line from the redirect, it never comes... What server are you running? -Eric Kalnichevski, Oleg wrote: Juan, Usually HttpClient reports 'unable to find line starting with HTTP' when the target server drops the connection without returning any response. This can happen, for instance, if the server is being under heavy load. (1) If you have access to the target server, examine the server logs to see why the connection was dropped. Fixing the problem on the server side would be the best (2) Another possible solution to this problem _may_ be to retry the request, provided that the POST methods your code is supposed to execute are idempotent. If the server application, however, has been designed in a way that it may receive a request, parse it, change the application state (by committing some data to the data store, for instance) and then simply drop the connection without giving any kind of response back to the client, you are in strongBIG/strong trouble, as simply retrying the same POST method case cause data inconsistency problems. So, the best thing to do is to get in touch with the server guys and find out if it is safe to retry POST methods. Hope this clarifies things a little Oleg -Original Message- From: Juan Pedro López Sáez [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 17:18 To: [EMAIL PROTECTED] Subject: unable to find line starting with HTTP Hi, I've been searching in the archive list looking for something related to my unable to find line starting with HTTP. There are lots of comments about it, but they all seem to be unuseful for me. Currently I'm using 2.0-rc3 version. My HTTP client is very simple. Below you can see everything I do. That code is executed everytime I need to send new data to the HTTP server. -- HttpClient client= new HttpClient(); client.setStrictMode(true); client.setTimeout(12); client.setConnectionTimeout(1); PostMethod post = new PostMethod(currentURL); post.setRequestContentLength(XMLRequest.length()); post.setRequestBody(XMLRequest); post.setRequestHeader(Content-type, text/xml; charset=ISO-8859-1); post.addRequestHeader(Connection, close); String response; try{ httpStatus = client.executeMethod(post); response = post.getResponseBodyAsString(); } catch (HttpException e) { log.fatal(IOException in client.executeMethod( post ),e); throw e; } catch(IOException e){ log.fatal(IOException in client.executeMethod( post ),e); throw e; } finally { post.releaseConnection(); } I'm getting the exception in the HttpClient.excetuteMethod line. The exception happens from time to time, is not quite common but I don't know what to do with it. The exception stack trace is the following: org.apache.commons.httpclient.HttpRecoverableException: org.apache.commons.httpclient.HttpRecoverableException: Error in parsing the status line from the response: unable to find line starting with HTTP at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1965) at org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2659) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1093) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:674) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:529) I would apreciate any help. Thank you very much Juan Pedro López - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Juan Pedro López Sáez ALTIRIA TIC, Soluciones en Servicios
Re: authenticate problem
Hello Jing, null is the default realm, where the HttpClient looks if there are no credentials for the specific realm, or if it doesn't know the realm because it performs preemptive authentication. Why the server accepts empty credentials is a different question. Probably a misconfiguration on the server side. Did you verify by wire log that the authentication actually takes place? Maybe the state holds a session cookie from a previous request and the server does not require authentication for the following ones. For example, WebSphere Application Server would behave like that if an LTPA cookie is sent by the client. hope that helps, Roland Jing Chen [EMAIL PROTECTED] 03.06.2004 00:06 Please respond to Commons HttpClient Project To: Commons HttpClient Project (E-mail) [EMAIL PROTECTED] cc: Subject:authenticate problem I have an application that requires authentication. I user a timer to schedule a task that will access the same application through httpClient. I am surprised to see the following statement did pass the authentication: client.getState().setCredentials (null,new UsernamePasswordCredentials()); 1. Can anybody explain why? 2. I did a little experiement - if I don't call authenticate(), then the client.executeMethod(new PostMethod(http://myapp.com/myapp)) will fail becaue no credentials available for realm x at host xxx. However, if I call authenticate(), even to authenticate empty credential with null realm, I get pass for the next client.executeMethod(...). Why can I get authenticated on realm x while I only did authentication for null?? Thanks Jing
DO NOT REPLY [Bug 29306] - [CONTRIB] SSL authenticating protocol socket factory
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29306. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29306 [CONTRIB] SSL authenticating protocol socket factory [EMAIL PROTECTED] changed: What|Removed |Added Target Milestone|--- |2.0 Final - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpConnection and HttpState reuse problem
Hello Himanshu, you can create your own HttpState object and pass it to each method invocation. That should solve your first problem. Why don't you leave the connection re-use to the connection manager? For an application, it shouldn't matter at all whether it is the same or a different connection. If it is an absolute requirement, you can still implement your own connection manager. cheers, Roland Himanshu Thube [EMAIL PROTECTED] 03.06.2004 18:24 Please respond to Commons HttpClient Project To: [EMAIL PROTECTED] cc: Subject:HttpConnection and HttpState reuse problem Hi In my class I need two connections to same host and different URL's. For connecting first time, I want to get the HttpState and HttpConnection. Later just execute the method using the same HttpConnection and HttpState. However from API I found, to get the state I need to execute the method with HttpClient for the first time as only HttpClient is able to return the HttpState. For the later executions of GetMethod I am not able to reuse the HttpConnection used for first execution as HttpClient doesn't provide me a handle to the HttpConnection which it used for first execution. My existing code is as follows : *For first invocation *: httpsclient = new HttpClient(); int statusCode = -1; String [] response=new String[2]; httpsget = new GetMethod(uri.toString()); statusCode = httpsclient.executeMethod(httpsget); state=httpsclient.getState(); *For Later invocations : (now I have the HttpsState but no handle to HttpConnection used :( so have to create a new HttpConnection)* if(con==null) { try { con=new HttpConnection(uri.getHost(), uri.getPort(), getProtocol()); } catch (URIException e1) { e1.printStackTrace(); } } try { httpsget.recycle(); httpsget.setPath(connectUrl); httpsget.execute(state, con); } catch (IOException e) { e.printStackTrace(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HttpConnection and HttpState reuse problem
Hi Himanshu, HttpClient intentionally does not give direct access to the connections used to execute methods. All connection management is handled by the HttpConnectionManagers and the HttpClient. As Roland mentioned, if you need custom connection management you should consider implementing an HttpConnectionManager. My guess is that the two included connection managers (SimpleHttpConnectionManager and MultiThreadedHttpConnectionManager) should suffice for your needs. Mike On Jun 3, 2004, at 12:24 PM, Himanshu Thube wrote: Hi In my class I need two connections to same host and different URL's. For connecting first time, I want to get the HttpState and HttpConnection. Later just execute the method using the same HttpConnection and HttpState. However from API I found, to get the state I need to execute the method with HttpClient for the first time as only HttpClient is able to return the HttpState. For the later executions of GetMethod I am not able to reuse the HttpConnection used for first execution as HttpClient doesn't provide me a handle to the HttpConnection which it used for first execution. My existing code is as follows : *For first invocation *: httpsclient = new HttpClient(); int statusCode = -1; String [] response=new String[2]; httpsget = new GetMethod(uri.toString()); statusCode = httpsclient.executeMethod(httpsget); state=httpsclient.getState(); *For Later invocations : (now I have the HttpsState but no handle to HttpConnection used :( so have to create a new HttpConnection)* if(con==null) { try { con=new HttpConnection(uri.getHost(), uri.getPort(), getProtocol()); } catch (URIException e1) { e1.printStackTrace(); } } try { httpsget.recycle(); httpsget.setPath(connectUrl); httpsget.execute(state, con); } catch (IOException e) { e.printStackTrace(); } - 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: HttpConnection and HttpState reuse problem
Hi Himanshu, HttpClient intentionally does not give direct access to the connections used to execute methods. All connection management is handled by the HttpConnectionManagers and the HttpClient. As Roland mentioned, if you need custom connection management you should consider implementing an HttpConnectionManager. My guess is that the two included connection managers (SimpleHttpConnectionManager and MultiThreadedHttpConnectionManager) should suffice for your needs. Mike On Jun 3, 2004, at 12:24 PM, Himanshu Thube wrote: Hi In my class I need two connections to same host and different URL's. For connecting first time, I want to get the HttpState and HttpConnection. Later just execute the method using the same HttpConnection and HttpState. However from API I found, to get the state I need to execute the method with HttpClient for the first time as only HttpClient is able to return the HttpState. For the later executions of GetMethod I am not able to reuse the HttpConnection used for first execution as HttpClient doesn't provide me a handle to the HttpConnection which it used for first execution. My existing code is as follows : *For first invocation *: httpsclient = new HttpClient(); int statusCode = -1; String [] response=new String[2]; httpsget = new GetMethod(uri.toString()); statusCode = httpsclient.executeMethod(httpsget); state=httpsclient.getState(); *For Later invocations : (now I have the HttpsState but no handle to HttpConnection used :( so have to create a new HttpConnection)* if(con==null) { try { con=new HttpConnection(uri.getHost(), uri.getPort(), getProtocol()); } catch (URIException e1) { e1.printStackTrace(); } } try { httpsget.recycle(); httpsget.setPath(connectUrl); httpsget.execute(state, con); } catch (IOException e) { e.printStackTrace(); } - 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: Suppressing stack dump in executeMethod()
Christopher, What makes you think that HttpClient dumps the stack? What I read from the stacks tells me that is was not HttpClient#executeMethod org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:529) at xxx..xx.xx.run(Unknown Source) Then, HttpClient NEVER dumps exception stack using Throwable#printStackTrace(). NEVER EVER. HttpClient always uses commons-logging to log its events. In order to disable all output generated by HttpClient you may want to set HttpClient's logging verbosity to FATAL or disable logging output altogether by using NoLog as a logger implementation. Feel free to examine HttpClient's source code to double-check Oleg On Thu, 2004-06-03 at 18:38, Foran, Christopher wrote: I most likely should know how to find the answer to this question, but I am doing SSL and when I use an incorrect password for the keystore it looks like somewhere in HttpClient.executeMethod() the stack dump is being printed.. In my application I am catching everything I should be, and I don't want to user to see this information. Is there a way for me to tell HttpClient to suppress this output. I want to handle this exception in my application. Thanks. java.lang.RuntimeException: KeyManagerFactoryImpl: Keystore was tampered with, or password was incorrect at com.ibm.jsse.w.a(Unknown Source) at com.ibm.jsse.w.engineInit(Unknown Source) at javax.net.ssl.KeyManagerFactory.init(Unknown Source) at javax.net.ssl.SSLSocketFactory.getDefault(Unknown Source) at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:112) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:663) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:959) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:661) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:529) at xxx..xx.xx.run(Unknown Source) [EMAIL PROTECTED] | 617.563.4785 __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29377] New: - Cookies with names containing blanks or starting with $ should be rejected by RFC2109 spec only
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29377. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29377 Cookies with names containing blanks or starting with $ should be rejected by RFC2109 spec only Summary: Cookies with names containing blanks or starting with $ should be rejected by RFC2109 spec only Product: Commons Version: 2.0 Final Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: HttpClient AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Reported by John Patterson: The Cookie class does not like names with spaces in them. It throws an IllegalArgumentException. Unfortunately the server that my app interacts with uses a space in the cookie name. Both IE and Mozilla don't mind. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29377] - Cookies with names containing blanks or starting with $ should be rejected by RFC2109 spec only
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29377. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29377 Cookies with names containing blanks or starting with $ should be rejected by RFC2109 spec only [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED Target Milestone|--- |2.0 Final - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 29377] - Cookies with names containing blanks or starting with $ should be rejected by RFC2109 spec only
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29377. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29377 Cookies with names containing blanks or starting with $ should be rejected by RFC2109 spec only --- Additional Comments From [EMAIL PROTECTED] 2004-06-03 20:11 --- Created an attachment (id=11756) Patch against 2.0 (take 1) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with https over proxy
We embed HttpClient in our product (SOAPscope), and some of our users have reported a problem accessing https URLs if they use a proxy server. I tried this, and can readily recreate the problem (I'm using Squid). I used TcpTrace to capture one of these requests, and compared it to the same request peformed by FireFox. The FireFox request gets becomes a CONNECT before it gets sent to the proxy, and it works fine. But the equivalent request from HttpClient just goes through as a GET and fails (since Squid won't handle a GET over https. What's the best way for me to fix this? Should HttpClient handle the conversion from GET or POST to CONNECT, or do I have to handle it myself in my client code (i.e., use ConnectMethod instead of PostMethod or GetMethod, based on isSecure() isProxied())? - Dave Seidel, Mindreef, Inc.
Re: Problem with https over proxy
Dave, You are not using HttpConnection class to establish connection with the target server, are you? Does you code look something like this? HttpConnection conn = new HttpConnection(...); conn.open(); HttpState httpstate = new HttpState(); GetMethod httpget = new GetMethod(https://www.whatever.com/;); httpget.execute(conn, httpstate); If it does, that would pretty much explain the problem, as the connection management as well as proxy access are handled by HttpClient class If you want HTTPS tunneling to be taken care of automatically, you should be using HttpClient class HttpClient client = new HttpClient(); client.getHostConfiguration().setProxy(...); GetMethod httpget = new GetMethod(https://www.whatever.com/;); try { client.executeMethod(httpget); } finally { httpget.releaseConnection(); } I may still be wrong in my assumption, but that is the only thing I can think of that can explain this kind of problem. Oleg On Thu, 2004-06-03 at 23:07, Dave Seidel wrote: We embed HttpClient in our product (SOAPscope), and some of our users have reported a problem accessing https URLs if they use a proxy server. I tried this, and can readily recreate the problem (I'm using Squid). I used TcpTrace to capture one of these requests, and compared it to the same request peformed by FireFox. The FireFox request gets becomes a CONNECT before it gets sent to the proxy, and it works fine. But the equivalent request from HttpClient just goes through as a GET and fails (since Squid won't handle a GET over https. What's the best way for me to fix this? Should HttpClient handle the conversion from GET or POST to CONNECT, or do I have to handle it myself in my client code (i.e., use ConnectMethod instead of PostMethod or GetMethod, based on isSecure() isProxied())? - Dave Seidel, Mindreef, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]