Re: [io] release plans?
On 29.12.2003 07:26:47 Henri Yandell wrote: IO's been sitting there for a bit. We've had some minor usage, but not a lot yet. I think we need to get things out the door asap. The task file says that: 1) IOUtils: Remove toByteArray variants with bufferSize. Jeremias has reasons for this at: http://www.mail-archive.com/[EMAIL PROTECTED]/msg19703.html I'm happy for it to be removed if Jeremias feels it should. 2) FileUtils needs cleaning up. 3) Test cases needed for: EndianUtils 'InputStream/OutputStream' methods. LockableFileWriter ClassLoaderObjectInputStream SwappedDataInputStream ProxyXxx's [pretty easy to test, and not that much to test as easy to inspect by eye] And that's all we really have on the list. On 1), it seems that Jeremias is driving this one. What's the status Jeremias? I was just waiting for someone to comment on that, but I guess noone objects so we can just delete these methods. I can do that tomorrow if nobody does it first. BTW, IOUtils still has some deprecated methods that we can now remove. On 2), we need to define what this actually means. I suspect by and large it means moving things about between FileUtils, FilenameUtils and IOUtils. For example: byteCountToDisplaySize is not File based but a simple helper to show a number in 1024 units, much like -h flag to 'du' or 'df'. Still, not sure it fits anywhere else either and it is handy-ish. It's nice-to-have. Should we move to to a separate class? I'm not sad if we remove it, though. toSuffixes(String[]) looks like it's a better fit for FilenameUtils. Well, this method should have been private, a helper method to listFiles. I can't explain right now why this ended up public. I'd make it private again unless someone wants it public and then it would have to move to FilenameUtils. Other than that, the use of 'final' in method parameters is not normally our communities coding style and we might want to dump that. Doesn't the 'final' modifier help the JIT to improve speed? What else? FileUtils is already pretty clean. But now that we've split off FilenameUtils, that's where the whole mess is right now. Some of these methods only work on unix systems. I've started rewriting code for that class but have stopped again as this need some discussion. I can probably write that up tomorrow. FilenameUtils has some deactivated test cases that if activated fail. There some major work left there. On 3), these are bitches to write tests for, except for the Proxy classes which are easy enough. Personally, I'm happy for us to release without tests for these, either because: a) We release at 0.9 or something, or 1.0-beta, or b) we don't release with these classes +1 Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25794] New: - ClassNotFoundException: org.apache.xerces.parsers.SAXParser
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25794. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25794 ClassNotFoundException: org.apache.xerces.parsers.SAXParser Summary: ClassNotFoundException: org.apache.xerces.parsers.SAXParser Product: Commons Version: 1.0 Beta 1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Dbcp AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Tried to compile dbcp. Adapted the build.properties to include the sax2.jar=../jarLibs/sax2r2.jar that I got from http://www.saxproject.org/. If this is the wrong place to get it from, I suggest to enhance the build.properties.sample with a hint where to get it from... Then, I got: compile: compile-test: test: [java] org.apache.commons.dbcp.SQLNestedException: Could not parse configur ation file, cause: [java] java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser [java] at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReade rFactory.java:121) [java] at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReade rFactory.java:96) [java] at org.apache.commons.jocl.JOCLContentHandler.parse(JOCLContentH andler.java:377) [java] at org.apache.commons.jocl.JOCLContentHandler.parse(JOCLContentH andler.java:309) [java] at org.apache.commons.dbcp.PoolingDriver.getConnectionPool(Pooli ngDriver.java:126) [java] at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.j ava:185) [java] at java.sql.DriverManager.getConnection(DriverManager.java:512) [java] at java.sql.DriverManager.getConnection(DriverManager.java:193) [java] at org.apache.commons.dbcp.TestJOCLed.getConnection(TestJOCLed.j ava:87) [java] at org.apache.commons.dbcp.TestConnectionPool$TestThread.run(Tes tConnectionPool.java:467) [java] at java.lang.Thread.run(Thread.java:534) ... Finally, I ended up getting Xerces-J-bin.2.6.0.tar.gz from http://xml.apache.org/xerces2-j/download.cgi. with my build.properties adapted to sax2.jar=../jarLibs/xerces-2_6_0/xercesImpl.jar:../jarLibs/xerces-2_6_0/xml-apis.jar:../jarLibs/xerces-2_6_0/xmlParserAPIs.jar it seems to work == suggestion: add the Xerces-J-bin.2.6.0.tar.gz http://xml.apache.org/xerces2-j/download.cgi; to the build.properties.sample - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24136] - ClassCastException in DriverAdapterCPDS when setPoolPreparedStatements(true)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24136. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24136 ClassCastException in DriverAdapterCPDS when setPoolPreparedStatements(true) --- Additional Comments From [EMAIL PROTECTED] 2003-12-29 12:00 --- Got today's source out of CVS and just did ant: ... compile: compile-test: test: [java] . [java] [java] BEGIN getConnection1() ... [java] Multithread test time = 2013 ms [java] .E.Multithread test time = 50 ms [java] Multithread test time = 2023 ms [java] [java] .E [java] Time: 28.562 [java] There were 2 errors: [java] 1) testPoolPrepareStatement(org.apache.commons.dbcp.datasources.Test SharedPoolDataSource)java.lang.ClassCastException: org.apache.commons.dbcp.Teste rConnection [java] at org.apache.commons.dbcp.PoolablePreparedStatement.init(Pool ablePreparedStatement.java:104) [java] at org.apache.commons.dbcp.cpdsadapter.PoolablePreparedStatement Stub.init(PoolablePreparedStatementStub.java:89) [java] at org.apache.commons.dbcp.cpdsadapter.PooledConnectionImpl.make Object(PooledConnectionImpl.java:311) [java] at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObj ect(GenericKeyedObjectPool.java:792) [java] at org.apache.commons.dbcp.cpdsadapter.PooledConnectionImpl.prep areStatement(PooledConnectionImpl.java:243) [java] at org.apache.commons.dbcp.cpdsadapter.ConnectionImpl.prepareSta tement(ConnectionImpl.java:332) [java] at org.apache.commons.dbcp.datasources.TestSharedPoolDataSource. testPoolPrepareStatement(TestSharedPoolDataSource.java:469) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces sorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet hodAccessorImpl.java:25) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25795] New: - NumberFormatException: For input string: myDB
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25795. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25795 NumberFormatException: For input string: myDB Summary: NumberFormatException: For input string: myDB Product: Commons Version: Nightly Builds Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Dbcp AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] got today's source from cvs, did ant ... compile: compile-test: test: [java] . [java] [java] BEGIN getConnection1() ... [java] Multithread test time = 2013 ms [java] .E.Multithread test time = 50 ms [java] Multithread test time = 2023 ms [java] [java] .E [java] Time: 28.562 [java] There were 2 errors: ... [java] 2) testJNDI2Pools(org.apache.commons.dbcp.datasources.TestFactory)ja va.lang.NumberFormatException: For input string: myDB [java] at java.lang.NumberFormatException.forInputString(NumberFormatEx ception.java:48) [java] at java.lang.Integer.parseInt(Integer.java:468) [java] at java.lang.Integer.parseInt(Integer.java:518) [java] at org.apache.commons.dbcp.datasources.InstanceKeyObjectFactory. registerNewInstance(InstanceKeyObjectFactory.java:96) [java] at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.set DataSourceName(InstanceKeyDataSource.java:266) [java] at org.apache.commons.dbcp.datasources.InstanceKeyObjectFactory. setCommonProperties(InstanceKeyObjectFactory.java:176) [java] at org.apache.commons.dbcp.datasources.InstanceKeyObjectFactory. getObjectInstance(InstanceKeyObjectFactory.java:157) [java] at org.apache.commons.dbcp.datasources.TestFactory.testJNDI2Pool s(TestFactory.java:108) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces sorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet hodAccessorImpl.java:25) [java] FAILURES!!! [java] Tests run: 173, Failures: 0, Errors: 2 occurs together with Bug 24136 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [configuration] [collections] ExtendedProperties
Actually ExtendedProperties isn't even used in [configuration], there are just a method getConfiguration(ExtendedProperties) and a method getExtendedProperties(Configuration) in ConfigurationConverter to maintain compatibility with older code using ExtendedProperties. I'd suggest to deprecate it in favor of Configuration and let it in [collection]. Emmanuel Bourg Stephen Colebourne wrote: [collections] currently has an ExtendedProperties class. IIRC, this class forms part of the [configuration] project. I've never thought it fitted in [collections]. Now [configuration] is promoted, is it time to deprecate the [collections] version??? Basically, I'm trying to kick out all inappropriate classes from [collections]. Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/io/src/java/org/apache/commons/io FileUtils.java
bayard 2003/12/29 05:14:52 Modified:io/src/java/org/apache/commons/io FileUtils.java Log: made toSuffixes private as it is a helper method to another method Revision ChangesPath 1.22 +2 -2 jakarta-commons-sandbox/io/src/java/org/apache/commons/io/FileUtils.java Index: FileUtils.java === RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/FileUtils.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- FileUtils.java29 Dec 2003 03:28:53 - 1.21 +++ FileUtils.java29 Dec 2003 13:14:52 - 1.22 @@ -257,7 +257,7 @@ * @param extensions an array of extensions. Format: {java, xml} * @return an array of suffixes. Format: {.java, .xml} */ -public static String[] toSuffixes(final String[] extensions) { +private static String[] toSuffixes(final String[] extensions) { String[] suffixes = new String[extensions.length]; for (int i = 0; i extensions.length; i++) { suffixes[i] = . + extensions[i]; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [io] release plans?
On Mon, 29 Dec 2003, Jeremias Maerki wrote: On 29.12.2003 07:26:47 Henri Yandell wrote: On 1), it seems that Jeremias is driving this one. What's the status Jeremias? I was just waiting for someone to comment on that, but I guess noone objects so we can just delete these methods. I can do that tomorrow if nobody does it first. Go for it. The benchmark seems to show that it doesn't make a difference now. BTW, IOUtils still has some deprecated methods that we can now remove. Kill em. Though looking at them does cause me to think a bit as I hadn't noticed CopyUtils. Should IOUtils be called StreamUtils? Why are File copy things not in CopyUtils? On 2), we need to define what this actually means. I suspect by and large it means moving things about between FileUtils, FilenameUtils and IOUtils. For example: byteCountToDisplaySize is not File based but a simple helper to show a number in 1024 units, much like -h flag to 'du' or 'df'. Still, not sure it fits anywhere else either and it is handy-ish. It's nice-to-have. Should we move to to a separate class? I'm not sad if we remove it, though. Could go to IOUtils, but otherwise I think it's fine in FileUtils unless someone obejcts. toSuffixes(String[]) looks like it's a better fit for FilenameUtils. Well, this method should have been private, a helper method to listFiles. I can't explain right now why this ended up public. I'd make it private again unless someone wants it public and then it would have to move to FilenameUtils. Made private. Other than that, the use of 'final' in method parameters is not normally our communities coding style and we might want to dump that. Doesn't the 'final' modifier help the JIT to improve speed? Only in inheritence I think. There's no inheritence in: public static boolean contentEquals(final File file1, final File file2) it's only usefulness is to stop someone reusing the file1 and file2 variables, which some people consider to be a bad practice. What else? FileUtils is already pretty clean. But now that we've split off FilenameUtils, that's where the whole mess is right now. Some of these methods only work on unix systems. I've started rewriting code for that class but have stopped again as this need some discussion. I can probably write that up tomorrow. FilenameUtils has some deactivated test cases that if activated fail. There some major work left there. Cool. A write up would be good as to what the problems are etc. Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [configuration] [collections] ExtendedProperties
Deprecate from both? :) Hen On Mon, 29 Dec 2003, Emmanuel Bourg wrote: Actually ExtendedProperties isn't even used in [configuration], there are just a method getConfiguration(ExtendedProperties) and a method getExtendedProperties(Configuration) in ConfigurationConverter to maintain compatibility with older code using ExtendedProperties. I'd suggest to deprecate it in favor of Configuration and let it in [collection]. Emmanuel Bourg Stephen Colebourne wrote: [collections] currently has an ExtendedProperties class. IIRC, this class forms part of the [configuration] project. I've never thought it fitted in [collections]. Now [configuration] is promoted, is it time to deprecate the [collections] version??? Basically, I'm trying to kick out all inappropriate classes from [collections]. Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [lang] Remove checkstyle.properties?
Prepare for the worst :) esp. Avoid inline conditionals comes to mind... Mvgr, Martin On Mon, 2003-12-29 at 06:42, Henri Yandell wrote: Sounds good. Why not just grab dbcp's and see what we (our code) disagree with? :) Hen On Sun, 28 Dec 2003, Phil Steitz wrote: Gary Gregory wrote: Hello, Since we now have checkstyle.xml, can we remove checkstyle.properties? Gary +1 We should also think about updating this. When I created checkstyle.xml, I just translated from the existing checkstyle.properties. There is not much in there. That's OK with me personally, but if we want to consider a more aggressive set of checks, we might want to do some comparative shopping among the other commons components. One that has a pretty comprehensive set of checks is [dbcp]. Phil - 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] -- Martin van den Bemt [EMAIL PROTECTED] mvdb.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [configuration] [collections] ExtendedProperties
Howdy, Deprecate from both if it's not used. Keep it in Collections if it's used only there, and deprecate the Configuration references to it (unless we have a use-case for Collections depending on Configuration). Yoav Shapira Millennium ChemInformatics -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED] Sent: Monday, December 29, 2003 8:22 AM To: Jakarta Commons Developers List Subject: Re: [configuration] [collections] ExtendedProperties Deprecate from both? :) Hen On Mon, 29 Dec 2003, Emmanuel Bourg wrote: Actually ExtendedProperties isn't even used in [configuration], there are just a method getConfiguration(ExtendedProperties) and a method getExtendedProperties(Configuration) in ConfigurationConverter to maintain compatibility with older code using ExtendedProperties. I'd suggest to deprecate it in favor of Configuration and let it in [collection]. Emmanuel Bourg Stephen Colebourne wrote: [collections] currently has an ExtendedProperties class. IIRC, this class forms part of the [configuration] project. I've never thought it fitted in [collections]. Now [configuration] is promoted, is it time to deprecate the [collections] version??? Basically, I'm trying to kick out all inappropriate classes from [collections]. Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
Re: [betwixt] Status of Betwixt
Hi Tim, On my part that almost all my resources go to my gui framework xulux on codehaus, my work, my newly acquired family and preparation for my new house. I try to organize a betwixt night so now and then, but that is hardly enough time to get a new release out the door. Robert is probably busy (or on a holiday?) and James has moved on to other projects. So currently betwixt is a bit asleep and wakes up so know and then when I can schedule a betwixt night. Mvgr, Martin On Tue, 2003-12-23 at 19:55, Tim O'Brien wrote: Betwixt is a very useful component, and a number of people would like to start using it in production systems. Could someone give a quick update as to why Betwixt is still at a 1.0 alpha? and, also provide a timeline for a 1.0 release. Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Martin van den Bemt [EMAIL PROTECTED] mvdb.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [all] Author tags redux
Howdy, Hmm. I understand the reasoning in this thread and the referenced posts for removing the @author tags, but I still am not a big fan of the idea. The reason is that for a new contributor, as you say, it's a big thrill to have your name in a widely distributed source code file. We want to attract these new contributors, and this is a nice perk. Yes, it's in the changelog, but that's not as easy to find for all projects. I suppose we could put every contributor's name on a web page somewhere, but that's at least as much of a pain to maintain, because now you have at least two people involved: the contributor and the committer who has to edit the web page listing the contributors. I too have gotten personal emails regarding code I wrote in the past, and I don't mind them that much. I just tell people to email the appropriate mailing list. I recognize that the legal argument against having @author tags may trump all others, and if that's the case so be it. But I think we're taking away something very important: an attracting factor for new contributors, the ego factor that drives many open-source developers. So -0 from me on this proposal, and apologies for this rambling post, I'm mostly thinking by typing on this slow day. Happy holidays to all ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Simon Kitching [mailto:[EMAIL PROTECTED] Sent: Sunday, December 28, 2003 11:18 PM To: Jakarta Commons Developers List Subject: Re: [all] Author tags redux On Mon, 2003-12-29 at 16:39, Phil Steitz wrote: The subject of @author tags has been discussed on and off here and elsewhere with no apparent consensus. In a recent post to general@, Ted Husted pointed to this post http://tinyurl.com/yrlhu by Greg Stein to community at apache.org, which raises some disturbing legal and community issues around the use of @author tags. I am convinced by his arguments that we should eliminate @author tags uniformly once we clean up the web site and get the process of updating and publishing contributor lists routinized (read: complete the mavenization of the j-c web site). I'm +1 to removing author tags in general too. As an occasional contributor it is a rush to see your name in an author tag :-). But it also feels a bit excessive for small patches. And once you start submitting significant patches, everyone knows who you are anyway. If there is a website that contributors can point to and say look, that's me (eg for CVs) then I agree that author tags are not necessary. And the less clutter in the source files the better. Some system where the maven site had a list of contributors ordered by # of patches committed would be ideal though I can't immediately see how to implement that. I have also had people contact me directly when the message would have better been directed at the dev or user list; I presume the more prolific contributors would get this even worse. Removing author tags may help here. I do think that this issue should be reposted sometime after the 5th, when many more people would be back as opinions may vary. Of course for [collections], the main contributors seem to be working right now... - 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]
Re: [all] Author tags redux
I am +1 to removing personal author tags, however there are two things I would want instead: 1) All names are added to the Maven project xml. This has been done for [lang] and [collections] AFAIN. 2) One author tag is added to all files @author Commons-Xxx team Stephen On Mon, 2003-12-29 at 16:39, Phil Steitz wrote: The subject of @author tags has been discussed on and off here and elsewhere with no apparent consensus. In a recent post to general@, Ted Husted pointed to this post http://tinyurl.com/yrlhu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ProxyXxx Was: [io] docs and refactorings
All deprecated. Stephen From: Henri Yandell [EMAIL PROTECTED] ProxyMap, ProxyIterator, ProxyListIterator and others appear to exist still. Hen On Mon, 29 Dec 2003, Stephen Colebourne wrote: BTW, [collections] uses the term AbstractXxxDecorator instead of Proxy now. One to consider? Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [io] release plans?
Should IOUtils be called StreamUtils? No, as it has readers/writers too. IOUtils is OK, though I would prefer dividing to InputUtils, OutputUtils and CopyUtils. byteCountToDisplaySize is not File based but a simple helper to show a number in 1024 units, much like -h flag to 'du' or 'df'. Still, not sure it fits anywhere else either and it is handy-ish. It's nice-to-have. Should we move to to a separate class? I'm not sad if we remove it, though. I suggest adding a FileFormatUtils (or some such name) that might also replace HexDump. Other than that, the use of 'final' in method parameters is not normally our communities coding style and we might want to dump that. Doesn't the 'final' modifier help the JIT to improve speed? It has no performance benefit (thats a myth). There was a time when I was adding final in, but now I would probably take it out. Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [configuration] [collections] ExtendedProperties
[collections] has no need for ExtendedProperties, and will not be depending on [configuration]. My question is whether [configuration] is more complex to use than ExtendedProperties. If there is no single equivalent class, then I'm not sure I can deprecate in [collections]. Stephen - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] Howdy, Deprecate from both if it's not used. Keep it in Collections if it's used only there, and deprecate the Configuration references to it (unless we have a use-case for Collections depending on Configuration). Yoav Shapira Millennium ChemInformatics -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED] Sent: Monday, December 29, 2003 8:22 AM To: Jakarta Commons Developers List Subject: Re: [configuration] [collections] ExtendedProperties Deprecate from both? :) Hen On Mon, 29 Dec 2003, Emmanuel Bourg wrote: Actually ExtendedProperties isn't even used in [configuration], there are just a method getConfiguration(ExtendedProperties) and a method getExtendedProperties(Configuration) in ConfigurationConverter to maintain compatibility with older code using ExtendedProperties. I'd suggest to deprecate it in favor of Configuration and let it in [collection]. Emmanuel Bourg Stephen Colebourne wrote: [collections] currently has an ExtendedProperties class. IIRC, this class forms part of the [configuration] project. I've never thought it fitted in [collections]. Now [configuration] is promoted, is it time to deprecate the [collections] version??? Basically, I'm trying to kick out all inappropriate classes from [collections]. Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
Re: [betwixt] Status of Betwixt
Martin van den Bemt wrote: Hi Tim, Robert is probably busy (or on a holiday?) and James has moved on to On Tue, 2003-12-23 at 19:55, Tim O'Brien wrote: Betwixt is a very useful component, and a number of people would like to start using it in production systems. Could someone give a quick update as to why Betwixt is still at a 1.0 alpha? and, also provide a timeline for a 1.0 release. I use betwixt in production, and would be willing to help push for a release. It would be nice if Robert or Martin could create a roadmap of sorts which could identify all of the works in progress and other things necessary for a betwixt 1.0 release. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [betwixt] Status of Betwixt
Understood. I'm in the same boat as you. Let me know if you need any release support. In the meantime, if you find yourself overburdened, let's start delegating. I'm surprised that we have enough time to talk about all these philosophical J-C vs. A-C issues, or even debating author tags when something as important as Betwixt sits in an Alpha for so long. Tim On 29 Dec 2003, Martin van den Bemt wrote: Hi Tim, On my part that almost all my resources go to my gui framework xulux on codehaus, my work, my newly acquired family and preparation for my new house. I try to organize a betwixt night so now and then, but that is hardly enough time to get a new release out the door. Robert is probably busy (or on a holiday?) and James has moved on to other projects. So currently betwixt is a bit asleep and wakes up so know and then when I can schedule a betwixt night. Mvgr, Martin On Tue, 2003-12-23 at 19:55, Tim O'Brien wrote: Betwixt is a very useful component, and a number of people would like to start using it in production systems. Could someone give a quick update as to why Betwixt is still at a 1.0 alpha? and, also provide a timeline for a 1.0 release. Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Tim O'Brien Evanston, IL (847) 863-7045 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map ReferenceMap.java
scolebourne2003/12/29 06:54:58 Modified:collections/src/java/org/apache/commons/collections/map ReferenceMap.java Log: Ensure that the keySet and values views handle removed elements bug 25551, from Joe Raysa Revision ChangesPath 1.5 +78 -46 jakarta-commons/collections/src/java/org/apache/commons/collections/map/ReferenceMap.java Index: ReferenceMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/ReferenceMap.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ReferenceMap.java 28 Dec 2003 16:36:48 - 1.4 +++ ReferenceMap.java 29 Dec 2003 14:54:58 - 1.5 @@ -706,7 +706,7 @@ if (keySet != null) return keySet; keySet = new AbstractSet() { public int size() { -return size; +return ReferenceMap.this.size(); } public Iterator iterator() { @@ -727,6 +727,17 @@ ReferenceMap.this.clear(); } +public Object[] toArray() { +return toArray(new Object[0]); +} + +public Object[] toArray(Object[] arr) { +Collection c = new ArrayList(size()); +for (Iterator it = iterator(); it.hasNext(); ) { +c.add(it.next()); +} +return c.toArray(arr); +} }; return keySet; } @@ -741,7 +752,7 @@ if (values != null) return values; values = new AbstractCollection() { public int size() { -return size; +return ReferenceMap.this.size(); } public void clear() { @@ -751,13 +762,29 @@ public Iterator iterator() { return new ValueIterator(); } + +public Object[] toArray() { +return toArray(new Object[0]); +} + +public Object[] toArray(Object[] arr) { +Collection c = new ArrayList(size()); +for (Iterator it = iterator(); it.hasNext(); ) { +c.add(it.next()); +} +return c.toArray(arr); +} }; return values; } - -// If getKey() or getValue() returns null, it means -// the mapping is stale and should be removed. +//--- +/** + * A MapEntry implementation for the map. + * p + * If getKey() or getValue() returns null, it means + * the mapping is stale and should be removed. + */ private class Entry implements Map.Entry, KeyValue { Object key; @@ -765,7 +792,6 @@ int hash; Entry next; - public Entry(Object key, int hash, Object value, Entry next) { this.key = key; this.hash = hash; @@ -773,54 +799,56 @@ this.next = next; } - public Object getKey() { return (keyType HARD) ? ((Reference)key).get() : key; } - public Object getValue() { return (valueType HARD) ? ((Reference)value).get() : value; } - -public Object setValue(Object object) { +public Object setValue(Object obj) { Object old = getValue(); -if (valueType HARD) ((Reference)value).clear(); -value = toReference(valueType, object, hash); +if (valueType HARD) { +((Reference)value).clear(); +} +value = toReference(valueType, obj, hash); return old; } - -public boolean equals(Object o) { -if (o == null) return false; -if (o == this) return true; -if (!(o instanceof Map.Entry)) return false; +public boolean equals(Object obj) { +if (obj == this) { +return true; +} +if (obj instanceof Map.Entry == false) { +return false; +} -Map.Entry entry = (Map.Entry)o; +Map.Entry entry = (Map.Entry)obj; Object key = entry.getKey(); Object value = entry.getValue(); -if ((key == null) || (value == null)) return false; +if ((key == null) || (value == null)) { +return false; +} return key.equals(getKey()) value.equals(getValue()); } - public int hashCode() {
cvs commit: jakarta-commons/collections project.xml
scolebourne2003/12/29 06:56:21 Modified:collections project.xml Log: Ensure that the keySet and values views handle removed elements bug 25551, from Joe Raysa Revision ChangesPath 1.20 +3 -0 jakarta-commons/collections/project.xml Index: project.xml === RCS file: /home/cvs/jakarta-commons/collections/project.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- project.xml 11 Dec 2003 00:56:47 - 1.19 +++ project.xml 29 Dec 2003 14:56:21 - 1.20 @@ -198,6 +198,9 @@ nameHoward Lewis Ship/name /contributor contributor + nameJoe Raysa/name +/contributor +contributor nameJan Sorensen/name /contributor contributor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24948] - Clear up formatting and add ability to skip tests
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24948. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24948 Clear up formatting and add ability to skip tests --- Additional Comments From [EMAIL PROTECTED] 2003-12-29 15:05 --- The build.xml is automatically generated by maven, so the patch you sent, will be overwritten next time the build.xml is updated. I'll see if I can find and fix the errors. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [betwixt] Status of Betwixt
I am not monitoring the a-c / j-c debate too specific (just if I want some destraction from a programming problem) :). It's not that I don't care about it, just care more about programming till I drop :). For a release we absolutely need Robert (at least pending changes, and current todo's), since he did the last big refactor. I will try to reach him in private to ask, just in case he is not able to monitor the list because of lack of time.. I would like to move bugzilla issues out of the way before a release. Robert probabably should close one, the rest has my attention :). I will also check to see how good the testcoverage is, since I lost track of that a long time ago :) Mvgr, Martin On Mon, 2003-12-29 at 15:38, Tim O'Brien wrote: Understood. I'm in the same boat as you. Let me know if you need any release support. In the meantime, if you find yourself overburdened, let's start delegating. I'm surprised that we have enough time to talk about all these philosophical J-C vs. A-C issues, or even debating author tags when something as important as Betwixt sits in an Alpha for so long. Tim On 29 Dec 2003, Martin van den Bemt wrote: Hi Tim, On my part that almost all my resources go to my gui framework xulux on codehaus, my work, my newly acquired family and preparation for my new house. I try to organize a betwixt night so now and then, but that is hardly enough time to get a new release out the door. Robert is probably busy (or on a holiday?) and James has moved on to other projects. So currently betwixt is a bit asleep and wakes up so know and then when I can schedule a betwixt night. Mvgr, Martin On Tue, 2003-12-23 at 19:55, Tim O'Brien wrote: Betwixt is a very useful component, and a number of people would like to start using it in production systems. Could someone give a quick update as to why Betwixt is still at a 1.0 alpha? and, also provide a timeline for a 1.0 release. Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Martin van den Bemt [EMAIL PROTECTED] mvdb.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [betwixt] Status of Betwixt
On Mon, 2003-12-29 at 15:38, __matthewHawthorne wrote: Martin van den Bemt wrote: Hi Tim, Robert is probably busy (or on a holiday?) and James has moved on to On Tue, 2003-12-23 at 19:55, Tim O'Brien wrote: Betwixt is a very useful component, and a number of people would like to start using it in production systems. Could someone give a quick update as to why Betwixt is still at a 1.0 alpha? and, also provide a timeline for a 1.0 release. I use betwixt in production, and would be willing to help push for a release. It would be nice if Robert or Martin could create a roadmap of sorts which could identify all of the works in progress and other things necessary for a betwixt 1.0 release. Too bad we don't have jira yet, it has some nice roadmap features.. See for the rest my reply to Tim... Mvgr, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map StaticBucketMap.java UnmodifiableEntrySet.java ReferenceMap.java PredicatedMap.java
scolebourne2003/12/29 07:08:16 Modified:collections/src/java/org/apache/commons/collections/map StaticBucketMap.java UnmodifiableEntrySet.java ReferenceMap.java PredicatedMap.java Log: Change to standard variable naming and braces style Revision ChangesPath 1.5 +16 -16 jakarta-commons/collections/src/java/org/apache/commons/collections/map/StaticBucketMap.java Index: StaticBucketMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/StaticBucketMap.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- StaticBucketMap.java 28 Dec 2003 16:36:48 - 1.4 +++ StaticBucketMap.java 29 Dec 2003 15:08:15 - 1.5 @@ -498,23 +498,23 @@ (value == null ? 0 : value.hashCode())); } -public boolean equals(Object o) { -if (o == this) { +public boolean equals(Object obj) { +if (obj == this) { return true; } -if (o instanceof Map.Entry == false) { +if (obj instanceof Map.Entry == false) { return false; } -Map.Entry e2 = (Map.Entry) o; +Map.Entry e2 = (Map.Entry) obj; return ( (key == null ? e2.getKey() == null : key.equals(e2.getKey())) (value == null ? e2.getValue() == null : value.equals(e2.getValue(; } -public Object setValue(Object val) { +public Object setValue(Object obj) { Object retVal = value; -value = val; +value = obj; return retVal; } } @@ -600,8 +600,8 @@ return new EntryIterator(); } -public boolean contains(Object o) { -Map.Entry entry = (Map.Entry)o; +public boolean contains(Object obj) { +Map.Entry entry = (Map.Entry) obj; int hash = getHash(entry.getKey()); synchronized (m_locks[hash]) { for (Node n = m_buckets[hash]; n != null; n = n.next) { @@ -615,7 +615,7 @@ if (obj instanceof Map.Entry == false) { return false; } -Map.Entry entry = (Map.Entry)obj; +Map.Entry entry = (Map.Entry) obj; int hash = getHash(entry.getKey()); synchronized (m_locks[hash]) { for (Node n = m_buckets[hash]; n != null; n = n.next) { @@ -645,16 +645,16 @@ return new KeyIterator(); } -public boolean contains(Object o) { -return StaticBucketMap.this.containsKey(o); +public boolean contains(Object obj) { +return StaticBucketMap.this.containsKey(obj); } -public boolean remove(Object o) { -int hash = getHash(o); +public boolean remove(Object obj) { +int hash = getHash(obj); synchronized (m_locks[hash]) { for (Node n = m_buckets[hash]; n != null; n = n.next) { Object k = n.getKey(); -if ((k == o) || ((k != null) k.equals(o))) { +if ((k == obj) || ((k != null) k.equals(obj))) { StaticBucketMap.this.remove(k); return true; } 1.3 +3 -3 jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableEntrySet.java Index: UnmodifiableEntrySet.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/UnmodifiableEntrySet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- UnmodifiableEntrySet.java 5 Dec 2003 20:23:57 - 1.2 +++ UnmodifiableEntrySet.java 29 Dec 2003 15:08:15 - 1.3 @@ -195,7 +195,7 @@ super(entry); } -public Object setValue(Object o) { +public Object setValue(Object obj) { throw new UnsupportedOperationException(); } } 1.6 +55 -31 jakarta-commons/collections/src/java/org/apache/commons/collections/map/ReferenceMap.java Index: ReferenceMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/ReferenceMap.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ReferenceMap.java 29 Dec 2003 14:54:58 - 1.5 +++ ReferenceMap.java 29 Dec 2003 15:08:15
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map CompositeMap.java StaticBucketMap.java
scolebourne2003/12/29 07:26:39 Modified:collections/src/java/org/apache/commons/collections/map CompositeMap.java StaticBucketMap.java Log: Change to standard variable naming and braces style Revision ChangesPath 1.3 +85 -64 jakarta-commons/collections/src/java/org/apache/commons/collections/map/CompositeMap.java Index: CompositeMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/CompositeMap.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CompositeMap.java 29 Dec 2003 01:04:43 - 1.2 +++ CompositeMap.java 29 Dec 2003 15:26:39 - 1.3 @@ -79,23 +79,25 @@ * @author Brian McCallister */ public class CompositeMap implements Map { + /** Array of all maps in the composite */ -private Map[] composite = null; +private Map[] composite; /** Handle mutation operations */ -private MapMutator mutator = null; +private MapMutator mutator; /** - * Create a new, empty, CompositeMap + * Create a new, empty, CompositeMap. */ public CompositeMap() { this(new Map[]{}, null); } /** - * Create a new CompositeMap with two composited Map instances - * @param one First Map to be composited - * @param two Second Map to be composited + * Create a new CompositeMap with two composited Map instances. + * + * @param one the first Map to be composited + * @param two the second Map to be composited * @throws IllegalArgumentException if there is a key collision */ public CompositeMap(Map one, Map two) { @@ -103,10 +105,11 @@ } /** - * Create a new CompositeMap with two composited Map instances - * @param one First Map to be composited - * @param two Second Map to be composited - * @param mutator MapMutator to be used for mutation operations + * Create a new CompositeMap with two composited Map instances. + * + * @param one the first Map to be composited + * @param two the second Map to be composited + * @param mutator MapMutator to be used for mutation operations */ public CompositeMap(Map one, Map two, MapMutator mutator) { this(new Map[]{one, two}, mutator); @@ -115,7 +118,8 @@ /** * Create a new CompositeMap which composites all of the Map instances in the * argument. It copies the argument array, it does not use it directly. - * @param composite Maps to be composited + * + * @param composite the Maps to be composited * @throws IllegalArgumentException if there is a key collision */ public CompositeMap(Map[] composite) { @@ -125,8 +129,9 @@ /** * Create a new CompositeMap which composites all of the Map instances in the * argument. It copies the argument array, it does not use it directly. - * @param composite Maps to be composited - * @param mutator MapMutator to be used for mutation operations + * + * @param composite Maps to be composited + * @param mutator MapMutator to be used for mutation operations */ public CompositeMap(Map[] composite, MapMutator mutator) { this.mutator = mutator; @@ -136,18 +141,20 @@ } } +//--- /** - * Specify the MapMutator to be used by mutation operations - * @param mutator The MapMutator to be used for mutation delegation + * Specify the MapMutator to be used by mutation operations. + * + * @param mutator the MapMutator to be used for mutation delegation */ public void setMutator(MapMutator mutator) { this.mutator = mutator; } /** - * Add an additional Map to the composite + * Add an additional Map to the composite. * - * @param map Map to be added to the composite + * @param map the Map to be added to the composite * @throws IllegalArgumentException if there is a key collision and there is no * MapMutator set to handle it. */ @@ -170,9 +177,9 @@ } /** - * Remove a Map from the composite + * Remove a Map from the composite. * - * @param map The Map to be removed from the composite + * @param map the Map to be removed from the composite * @return The removed Map or codenull/code if map is not in the composite */ public synchronized Map removeComposited(Map map) { @@ -188,11 +195,10 @@ } return null; } - -/* Map Implementation */ -
Re: [all] Author tags redux
+1 to both. On Mon, 29 Dec 2003, Stephen Colebourne wrote: I am +1 to removing personal author tags, however there are two things I would want instead: 1) All names are added to the Maven project xml. This has been done for [lang] and [collections] AFAIN. 2) One author tag is added to all files @author Commons-Xxx team Stephen On Mon, 2003-12-29 at 16:39, Phil Steitz wrote: The subject of @author tags has been discussed on and off here and elsewhere with no apparent consensus. In a recent post to general@, Ted Husted pointed to this post http://tinyurl.com/yrlhu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections ReferenceMap.java
scolebourne2003/12/29 07:35:54 Modified:collections/src/java/org/apache/commons/collections ReferenceMap.java Log: Ensure that the keySet and values views handle removed elements bug 25551, from Joe Raysa Revision ChangesPath 1.20 +27 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/ReferenceMap.java Index: ReferenceMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/ReferenceMap.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- ReferenceMap.java 6 Dec 2003 13:03:15 - 1.19 +++ ReferenceMap.java 29 Dec 2003 15:35:54 - 1.20 @@ -706,7 +706,7 @@ if (keySet != null) return keySet; keySet = new AbstractSet() { public int size() { -return size; +return ReferenceMap.this.size(); } public Iterator iterator() { @@ -727,6 +727,17 @@ ReferenceMap.this.clear(); } +public Object[] toArray() { +return toArray(new Object[0]); +} + +public Object[] toArray(Object[] array) { +Collection c = new ArrayList(size()); +for (Iterator it = iterator(); it.hasNext(); ) { +c.add(it.next()); +} +return c.toArray(array); +} }; return keySet; } @@ -741,7 +752,7 @@ if (values != null) return values; values = new AbstractCollection() { public int size() { -return size; +return ReferenceMap.this.size(); } public void clear() { @@ -750,6 +761,18 @@ public Iterator iterator() { return new ValueIterator(); +} + +public Object[] toArray() { +return toArray(new Object[0]); +} + +public Object[] toArray(Object[] array) { +Collection c = new ArrayList(size()); +for (Iterator it = iterator(); it.hasNext(); ) { +c.add(it.next()); +} +return c.toArray(array); } }; return values; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25551] - NoSuchElementException in ReferenceMap views
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25551. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25551 NoSuchElementException in ReferenceMap views [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-12-29 15:37 --- Patch applied, good catch, thanks. I didn't apply the test case, as it may not fail in all circumstances (a general problem with testing this class ;-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/iterators IteratorChain.java
scolebourne2003/12/29 08:07:53 Modified:collections/src/test/org/apache/commons/collections/iterators TestIteratorChain.java collections/src/java/org/apache/commons/collections/iterators IteratorChain.java Log: Enable zero iterators in the chain to function Revision ChangesPath 1.7 +16 -3 jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestIteratorChain.java Index: TestIteratorChain.java === RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/iterators/TestIteratorChain.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TestIteratorChain.java1 Oct 2003 21:54:55 - 1.6 +++ TestIteratorChain.java29 Dec 2003 16:07:53 - 1.7 @@ -180,5 +180,18 @@ assertEquals(C,chain.next()); assertTrue(should not have next,!chain.hasNext()); } + +public void testEmptyChain() { +IteratorChain chain = new IteratorChain(); +assertEquals(false, chain.hasNext()); +try { +chain.next(); +fail(); +} catch (NoSuchElementException ex) {} +try { +chain.remove(); +fail(); +} catch (IllegalStateException ex) {} +} + } - 1.8 +70 -85 jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/IteratorChain.java Index: IteratorChain.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/IteratorChain.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- IteratorChain.java3 Dec 2003 11:37:44 - 1.7 +++ IteratorChain.java29 Dec 2003 16:07:53 - 1.8 @@ -61,28 +61,28 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; -import java.util.NoSuchElementException; +import org.apache.commons.collections.IteratorUtils; import org.apache.commons.collections.list.UnmodifiableList; /** - * pAn IteratorChain is an Iterator that wraps one or - * more Iterators. When any method from the - * Iterator interface is called, the IteratorChain will - * proxy to a single underlying Iterator. The - * IteratorChain will invoke the Iterators in sequence until - * all Iterators are exhausted completely./p - * - * pUnder many circumstances, linking Iterators together - * in this manner is more efficient (and convenient) - * than reading out the contents of each Iterator into a - * List and creating a new Iterator./p - * - * pCalling a method that adds new Iteratoriafter - * a method in the Iterator interface - * has been called/i will result in an - * UnsupportedOperationException. Subclasses should itake care/i - * to not alter the underlying List of Iterators./p + * An IteratorChain is an Iterator that wraps a number of Iterators. + * p + * This class makes mutiple iterators look like one to the caller + * When any method from the Iterator interface is called, the IteratorChain + * will delegate to a single underlying Iterator. The IteratorChain will + * invoke the Iterators in sequence until all Iterators are exhausted. + * p + * Under many circumstances, linking Iterators together in this manner is + * more efficient (and convenient) than reading out the contents of each + * Iterator into a List and creating a new Iterator. + * p + * Calling a method that adds new Iteratoriafter a method in the Iterator + * interface has been called/i will result in an UnsupportedOperationException. + * Subclasses should itake care/i to not alter the underlying List of Iterators. + * p + * NOTE: As from version 3.0, the IteratorChain may contain no + * iterators. In this case the class will function as an empty iterator. * * @since Commons Collections 2.1 * @version $Revision$ $Date$ @@ -92,26 +92,30 @@ */ public class IteratorChain implements Iterator { + /** The chain of iterators */ protected final List iteratorChain = new ArrayList(); +/** The index of the current iterator */ protected int currentIteratorIndex = 0; +/** The current iterator */ protected Iterator currentIterator = null; -// the last used Iterator is the Iterator upon which -// next() or hasNext() was most recently called -// used for the remove() operation only +/** + * The last used Iterator is the Iterator upon which + * next() or hasNext() was most recently called + * used for the remove() operation only + */ protected Iterator lastUsedIterator = null; -
DO NOT REPLY [Bug 24520] - [collections] IteratorChain.hasNext() throws when chain is empty
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24520. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24520 [collections] IteratorChain.hasNext() throws when chain is empty [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-12-29 16:08 --- I have enabled zero iterators in the chain. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [configuration] [collections] ExtendedProperties
Stephen Colebourne wrote: My question is whether [configuration] is more complex to use than ExtendedProperties. If there is no single equivalent class, then I'm not sure I can deprecate in [collections]. An ExtendedProperties can be easily replaced with a PropertiesConfiguration, it has the same features (includes, arrays of values), the same constructors, and almost the same methods. http://jakarta.apache.org/commons/collections/api/org/apache/commons/collections/ExtendedProperties.html http://jakarta.apache.org/commons/configuration/apidocs/org/apache/commons/configuration/PropertiesConfiguration.html Emmanuel Bourg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [configuration] [collections] ExtendedProperties
The biggest difference seems to be the lack of a public void save(OutputStream output, String Header) Any particular reason why it was removed? Could it be put back? Stephen - Original Message - From: Emmanuel Bourg [EMAIL PROTECTED] An ExtendedProperties can be easily replaced with a PropertiesConfiguration, it has the same features (includes, arrays of values), the same constructors, and almost the same methods. http://jakarta.apache.org/commons/collections/api/org/apache/commons/collect ions/ExtendedProperties.html http://jakarta.apache.org/commons/configuration/apidocs/org/apache/commons/c onfiguration/PropertiesConfiguration.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [betwixt] Status of Betwixt
On 29 Dec 2003, Martin van den Bemt wrote: I will also check to see how good the testcoverage is, since I lost track of that a long time ago :) I'll gladly help out with increasing coverage. :-) OFF-TOPIC How come Xulux isn't linked from Codehaus frontpage? /OFF-TOPIC Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [betwixt] Status of Betwixt
We started before codehaus was there on the servers of Bob under xulux.org. After the move from nyx.xulux.org to xulux.org and the first release, I will personally see to it, that I make as much noise as possible to get me some users, besides myself :) Mvgr, Martin On Mon, 2003-12-29 at 18:09, Tim O'Brien wrote: On 29 Dec 2003, Martin van den Bemt wrote: I will also check to see how good the testcoverage is, since I lost track of that a long time ago :) I'll gladly help out with increasing coverage. :-) OFF-TOPIC How come Xulux isn't linked from Codehaus frontpage? /OFF-TOPIC Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Martin van den Bemt [EMAIL PROTECTED] mvdb.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTP.java FTPClient.java FTPCommand.java FTPFile.java
brekke 2003/12/29 11:42:44 Modified:net/src/java/org/apache/commons/net/ftp FTP.java FTPClient.java FTPCommand.java FTPFile.java Log: Javadocs updated in the org.apache.commons.net.ftp package. Just went through the warnings. There are many more in other packages to clear up. Revision ChangesPath 1.6 +13 -16jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTP.java Index: FTP.java === RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTP.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- FTP.java 26 Aug 2003 05:43:55 - 1.5 +++ FTP.java 29 Dec 2003 19:42:44 - 1.6 @@ -628,11 +628,10 @@ return sendCommand(FTPCommand.USER, username); } -/*** +/** * A convenience method to send the FTP PASS command to the server, * receive the reply, and return the reply code. - * p - * @param pass The plain text password of the username being logged into. + * @param password The plain text password of the username being logged into. * @return The reply code received from the server. * @exception FTPConnectionClosedException * If the FTP server prematurely closes the connection as a result @@ -641,7 +640,7 @@ * as an IOException or independently as itself. * @exception IOException If an I/O error occurs while either sending the * command or receiving the server reply. - ***/ + */ public int pass(String password) throws IOException { return sendCommand(FTPCommand.PASS, password); @@ -828,11 +827,10 @@ return sendCommand(FTPCommand.PASV); } -/*** +/** * A convenience method to send the FTP TYPE command for text files * to the server, receive the reply, and return the reply code. - * p - * @param type The type of the file (one of the codeFILE_TYPE/code + * @param fileType The type of the file (one of the codeFILE_TYPE/code * constants). * @param formatOrByteSize The format of the file (one of the * code_FORMAT/code constants. In the case of @@ -845,7 +843,7 @@ * as an IOException or independently as itself. * @exception IOException If an I/O error occurs while either sending the * command or receiving the server reply. - ***/ + */ public int type(int fileType, int formatOrByteSize) throws IOException { StringBuffer arg = new StringBuffer(); @@ -861,11 +859,11 @@ } -/*** +/** * A convenience method to send the FTP TYPE command to the server, * receive the reply, and return the reply code. * p - * @param type The type of the file (one of the codeFILE_TYPE/code + * @param fileType The type of the file (one of the codeFILE_TYPE/code * constants). * @return The reply code received from the server. * @exception FTPConnectionClosedException @@ -875,7 +873,7 @@ * as an IOException or independently as itself. * @exception IOException If an I/O error occurs while either sending the * command or receiving the server reply. - ***/ + */ public int type(int fileType) throws IOException { return sendCommand(FTPCommand.TYPE, @@ -995,8 +993,7 @@ * receive the reply, and return the reply code. Remember, it is up * to you to manage the data connection. If you don't need this low * level of access, use a href=org.apache.commons.net.ftp.FTPClient.html - * FTPClient/a, which will handle all low level details for you. - * p + * FTPClient/a, which will handle all low level details for you. * @param pathname The base pathname to use for the file when stored at * the remote end of the transfer. Some FTP servers * require this. @@ -1008,10 +1005,10 @@ * as an IOException or independently as itself. * @exception IOException If an I/O error occurs while either sending the * command or receiving the server reply. - ***/ -public int stou(String filename) throws IOException + */ +public int stou(String pathname) throws IOException { -return sendCommand(FTPCommand.STOU, filename); +return sendCommand(FTPCommand.STOU, pathname); } /*** 1.15 +18 -23 jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java Index: FTPClient.java === RCS file:
cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections/map AbstractTestMap.java
scolebourne2003/12/29 11:46:19 Modified:collections/src/test/org/apache/commons/collections/map AbstractTestMap.java Log: Improve documentation and error messages Revision ChangesPath 1.5 +8 -8 jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestMap.java Index: AbstractTestMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/map/AbstractTestMap.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- AbstractTestMap.java 14 Dec 2003 13:01:07 - 1.4 +++ AbstractTestMap.java 29 Dec 2003 19:46:19 - 1.5 @@ -381,8 +381,8 @@ } /** - * Helper method to add all the mappings described by [EMAIL PROTECTED] - * #getSampleKeys()} and [EMAIL PROTECTED] #getSampleValues()}. + * Helper method to add all the mappings described by + * [EMAIL PROTECTED] #getSampleKeys()} and [EMAIL PROTECTED] #getSampleValues()}. */ public void addSampleMappings(Map m) { @@ -398,11 +398,11 @@ keys[i] == null || values[i] == null); assertTrue(NullPointerException on null key, but + - isNullKeySupported is not overridden to return false., + isAllowNullKey is not overridden to return false., keys[i] == null || !isAllowNullKey()); assertTrue(NullPointerException on null value, but + - isNullValueSupported is not overridden to return false., + isAllowNullValue is not overridden to return false., values[i] == null || !isAllowNullValue()); assertTrue(Unknown reason for NullPointer., false); @@ -422,8 +422,8 @@ /** * Return a new, populated map. The mappings in the map should match the - * keys and values returned from [EMAIL PROTECTED] #getSampleKeys()} and [EMAIL PROTECTED] - * #getSampleValues()}. The default implementation uses makeEmptyMap() + * keys and values returned from [EMAIL PROTECTED] #getSampleKeys()} and + * [EMAIL PROTECTED] #getSampleValues()}. The default implementation uses makeEmptyMap() * and calls [EMAIL PROTECTED] #addSampleMappings} to add all the mappings to the * map. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24718] - PoolableConnectionFactory.validateConnection() should log exception message
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24718. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24718 PoolableConnectionFactory.validateConnection() should log exception message [EMAIL PROTECTED] changed: What|Removed |Added Severity|Normal |Enhancement - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25795] - NumberFormatException: For input string: myDB
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25795. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25795 NumberFormatException: For input string: myDB [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2003-12-29 20:01 --- *** This bug has been marked as a duplicate of 24082 *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24082] - bug in InstanceKeyDataSourceFactory
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24082. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24082 bug in InstanceKeyDataSourceFactory [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2003-12-29 20:01 --- *** Bug 25795 has been marked as a duplicate of this bug. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24082] - NumberFormatException: For input string: myDB in InstanceKeyDataSourceFactory
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24082. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24082 NumberFormatException: For input string: myDB in InstanceKeyDataSourceFactory [EMAIL PROTECTED] changed: What|Removed |Added Summary|bug in |NumberFormatException: For |InstanceKeyDataSourceFactory|input string: myDB in ||InstanceKeyDataSourceFactory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/net build.xml
brekke 2003/12/29 12:25:12 Modified:net build.xml Log: Minor, just updating version numbers. Revision ChangesPath 1.18 +5 -7 jakarta-commons/net/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-commons/net/build.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- build.xml 30 Apr 2003 13:29:20 - 1.17 +++ build.xml 29 Dec 2003 20:25:12 - 1.18 @@ -1,9 +1,7 @@ ?xml version=1.0 encoding=UTF-8? -!-- - build.xml generated by maven from project.xml version 1.0.1-dev - on date April 30 2003, time 0824 --- +!--build.xml generated by maven from project.xml version 1.2.0-dev + on date December 29 2003, time 1419-- project default=jar name=commons-net basedir=. property name=defaulttargetdir value=target @@ -20,7 +18,7 @@ /property property name=javadocdir value=dist/docs/api /property - property name=final.name value=commons-net-1.0.1-dev + property name=final.name value=commons-net-1.2.0-dev /property target name=init description=o Initializes some properties mkdir dir=${libdir} @@ -127,7 +125,7 @@ /tstamp property name=copyright value=Copyright amp;copy; Apache Software Foundation. All Rights Reserved. /property -property name=title value=Jakarta Commons/Net 1.0.1-dev API +property name=title value=Jakarta Commons/Net 1.2.0-dev API /property javadoc use=true private=true destdir=${javadocdir} author=true version=true sourcepath=src/java packagenames=org.apache.commons.net.* classpath @@ -156,4 +154,4 @@ unjar dest=${maven.home} src=${user.home}/maven-install-latest.jar /unjar /target -/project \ No newline at end of file +/project - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/dbcp build.properties.sample
dirkv 2003/12/29 12:50:15 Modified:dbcp build.properties.sample Log: Bugzilla Bug 25794: ClassNotFoundException: org.apache.xerces.parsers.SAXParser - add reference to xerces in build.properties.sample (as suggested by Ralf Hauser) Revision ChangesPath 1.8 +1 -0 jakarta-commons/dbcp/build.properties.sample Index: build.properties.sample === RCS file: /home/cvs/jakarta-commons/dbcp/build.properties.sample,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- build.properties.sample 7 Mar 2003 00:24:08 - 1.7 +++ build.properties.sample 29 Dec 2003 20:50:15 - 1.8 @@ -17,6 +17,7 @@ junit.jar=${junit.lib}/junit.jar # sax2.jar - SAX classpath +# Note: Apache Xerces supports the SAX 2 API - http://xml.apache.org/xerces2-j/ sax2.home=${base.path}/sax sax2.lib=${sax2.home} sax2.jar=${sax2.lib}/sax2.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25794] - ClassNotFoundException: org.apache.xerces.parsers.SAXParser
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25794. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25794 ClassNotFoundException: org.apache.xerces.parsers.SAXParser [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-12-29 20:50 --- reference to xerces added to build.properties.sample - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [collections] [proposal] Bag interface change
Stephen Colebourne wrote: I am proposing to change the Bag interface. http://jakarta.apache.org/commons/collections/api/org/apache/commons/collections/Bag.html Add: equals(Object) - Two Bags are equal if they contain the same number of occurrences of all the same elements. hashCode() - The hashCode is defined as the sum total of each elements hashcode, where the hashcode for an element is defined as (e==null ? 0 : e.hashCode()) ^ noOccurances) This will enable Bags to be compared. I'm seeing a problem related to this change with an unit test for a class that extends AbstractBagDecorator, but this failure doesn't show up in the [collections] unit tests. Will investigate further. michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [all] Author tags redux
In response to Simon and Yoav's points about doing this with maven, I think it is quite possible. We already have contributors/ in the POM, and I think a slight change to the changes plugin [1] would allow us to account peoples' patches effectively. Perhaps an optional attribute to the action/ tage named submitted-by or something. Then, a custom goal in maven.xml (or a new plug in) would allow us to generate patch reports for non-committers. -- Ryan Hoegg ISIS Networks http://www.isisnetworks.net [1] http://maven.apache.org/reference/plugins/changes/ Simon Kitching wrote: If there is a website that contributors can point to and say look, that's me (eg for CVs) then I agree that author tags are not necessary. And the less clutter in the source files the better. Some system where the maven site had a list of contributors ordered by # of patches committed would be ideal though I can't immediately see how to implement that. and Shapira, Yoav wrote: We want to attract these new contributors, and this is a nice perk. Yes, it's in the changelog, but that's not as easy to find for all projects. I suppose we could put every contributor's name on a web page somewhere, but that's at least as much of a pain to maintain, because now you have at least two people involved: the contributor and the committer who has to edit the web page listing the contributors. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [collections] [proposal] Bag interface change
On Mon, 29 Dec 2003, Michael Heuer wrote: Stephen Colebourne wrote: I am proposing to change the Bag interface. http://jakarta.apache.org/commons/collections/api/org/apache/commons/collections/Bag.html Add: equals(Object) - Two Bags are equal if they contain the same number of occurrences of all the same elements. hashCode() - The hashCode is defined as the sum total of each elements hashcode, where the hashcode for an element is defined as (e==null ? 0 : e.hashCode()) ^ noOccurances) This will enable Bags to be compared. I'm seeing a problem related to this change with an unit test for a class that extends AbstractBagDecorator, but this failure doesn't show up in the [collections] unit tests. Never mind, my [collections] snapshot jar file was out of date in my local repository. michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[collections] AbstractTestBidiMap issue
In a situation where I have an unit test that extends AbstractTestBidiMap for a class that extends AbstractBidiMapDecorator, Testcase: testBidiInverse took 0.01 sec FAILED Inverse of inverse is not equal to original. expected same:{key1=value1, key3=value3, key2=value2} was not:{key1=value1, key3=value3, key2=value2} junit.framework.AssertionFailedError: Inverse of inverse is not equal to original. expected same:{key1=value1, key3=value3, key2=value2} was not:{key1=value1, key3=value3, key2=value2} ... This seems a bit odd, assertSame seems to not do the right thing here. michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [collections] Version 3.0 - The final stretch
From: Michael Heuer [EMAIL PROTECTED] - maven jar builds c-c-testframework-n.m.jar but maven jar:install-snapshot does not. It should build it, but not install it. If it doesn't its a maven oddity. - maven build doesn't create javadocs for test framework I'll take a look - AbstractTestBuffer is missing There is no such class ;-) - Exception messages in AbstractTestMap (e.g. lines 396-405) refer to methods isNullXxxSupported which do not exist -- should be isAllowNullXxx Done Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[collections] BinaryHeap and PriorityQueue
BinaryHeap is a very old collections class, originally from Avalon. It implements PriorityQueue interface. PQ is an interface that does not extend Collection, Buffer is effectively the replacement that does. They use different terms though - PQ insert/peek/pop - Buffer add/get/remove. PQ is also badly named as the interface specifies nothing about 'priority'. Currently I have moved BinaryHeap and the PriorityQueue decorators into the buffer subpackage (as they seem related). But is this right??? Possibilities: a) BinaryHeap and PQ decorators in buffer subpackage b) BinaryHeap and PQ decorators in (new) priorityqueue subpackage c) BinaryHeap left in main package where it always was, PQ decorators as hidden inner classes on PriorityQueueUtils. I think I favour (c), as I'm not a fan of the PQ interface, and this would avoid change for this dubious (but probably useful) class/interface. Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25811] New: - [collections] test failures for subclasses of AbstractBidiMapDecorator and friends
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25811. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25811 [collections] test failures for subclasses of AbstractBidiMapDecorator and friends Summary: [collections] test failures for subclasses of AbstractBidiMapDecorator and friends Product: Commons Version: unspecified Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Collections AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The attached test case fails for a class that extends AbstractOrderedBidiMapDecorator: Testcase: testFirstKey took 0.04 sec FAILED expected:foo but was:again junit.framework.AssertionFailedError: expected:foo but was:again at org.apache.commons.collections.bidimap.AbstractTestOrderedBidiMap.testFirstKey(AbstractTestOrderedBidiMap.java:102) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) Testcase: testFirstKeyTestcase: testLastKey took 0 sec FAILED expected:all but was:you junit.framework.AssertionFailedError: expected:all but was:you at org.apache.commons.collections.bidimap.AbstractTestOrderedBidiMap.testLastKey(AbstractTestOrderedBidiMap.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) Testcase: testLastKeyTestcase: testNextKey took 0.05 sec FAILED expected:we'll but was:gee junit.framework.AssertionFailedError: expected:we'll but was:gee at org.apache.commons.collections.bidimap.AbstractTestOrderedBidiMap.testNextKey(AbstractTestOrderedBidiMap.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) Testcase: testNextKeyTestcase: testPreviousKey took 0 sec FAILED expected:gosh but was:again junit.framework.AssertionFailedError: expected:gosh but was:again at org.apache.commons.collections.bidimap.AbstractTestOrderedBidiMap.testPreviousKey(AbstractTestOrderedBidiMap.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) Testcase: testPreviousKeyTestcase: testBidiPut took 0 sec Testcase: testBidiGetKey took 0 sec Testcase: testBidiGetKeyInverse took 0 sec Testcase: testBidiInverse took 0 sec FAILED Inverse of inverse is not equal to original. expected same:{key1=value1, key2=value2, key3=value3} was not:{key1=value1, key2=value2, key3=value3} junit.framework.AssertionFailedError: Inverse of inverse is not equal to original. expected same:{key1=value1, key2=value2, key3=value3} was not:{key1=value1, key2=value2, key3=value3} at org.apache.commons.collections.bidimap.AbstractTestBidiMap.testBidiInverse(AbstractTestBidiMap.java:232) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) The testBidiInverse test also fails for classes that extend AbstractBidiMapDecorator and AbstractSortedBidiMapDecorator (not attached). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 25811] - [collections] test failures for subclasses of AbstractBidiMapDecorator and friends
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25811. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25811 [collections] test failures for subclasses of AbstractBidiMapDecorator and friends --- Additional Comments From [EMAIL PROTECTED] 2003-12-29 22:00 --- Created an attachment (id=9743) test case for AbstractOrderedBidiMapDecorator - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [collections] Version 3.0 - The final stretch
One admin-type of issue: I notice that the top of each .java file includes CVS info: /* * $Header: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collection s/bag/AbstractMapBag.java,v 1.9 2003/12/28 16:36:48 scolebourne Exp $ * * * The Apache Software License, Version 1.1 snip Some of which is duplicated in the @version tag: * @version $Revision: 1.9 $ $Date: 2003/12/28 16:36:48 $ It seems redundant to have both. I would suggest only using the @version tag for CVS info which seems to jive with other commons projects I've looked into (but I've not seen them all ;-) Perhaps only using $Id: $ instead. Gary -Original Message- From: Stephen Colebourne [mailto:[EMAIL PROTECTED] Sent: Sunday, December 28, 2003 17:51 To: Jakarta Commons Developers List Subject: [collections] Version 3.0 - The final stretch OK, my personal list of coding changes is complete. Its time for bug fixing, javadoc fixing and releasing. (yes I know its taken a while and I'm a bad release manager) I am planning on releasing a snapshot tomorrow to maven. Once that is up, the primitives and observable code will be deleted. Then a beta release of some kind seems appropriate. Anyone who wants to start reviewing [collections] can start now! Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [NET] VMSFTPEntryParser bug?
On Monday 29 December 2003 04:27 pm, steve cohen wrote: I am trying to build commons-net prior to making some changes and some other issues have come to light. One of the tests is failing for me - VMSFTPEntryParserTest.testParseFileList(). This test seems poorly implemented, since the class being tested builds its list of files using a HashMap to eliminate dupes, I presume, and then spits out the list by calling values() on the HashMap - which spits out the values in an order that is different from the one the test is expecting. I was running this under java 1.3 on linux. I switched to java 1.4 and it is also failing but on a different line. I'm not sure what platform Jeff is on when he did the build, but I think I should rewrite this test in a way that doesn't assume any particular order since this seems to be JDK-implementation dependent. The JavaDoc for HashMap specifies no order that should be expected for HashMap.values(), nor for HashMap.keySet() for that matter. We could probably achieve a dependable order by using a TreeMap.keySet() instead. However, this brings up a larger question, of what the target platform for commons-net is. I dimly remember that it being java 1.1. This is why I went through the annoying exercise of creating the FTPFileList and FTPFileIterator classes based on java-1.1-compatible containers like Vector. If we are now using HashMaps, though, we will have violated this contract, if, in fact, such a contract exists. Can someone clarify this question? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[net]Which version of ant to build commons-net
Is there any reason not to update the build.xml so that it pulls down and uses ant-1.6 for building commons-net? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [collections] Version 3.0 - The final stretch
-Original Message- From: Stephen Colebourne [mailto:[EMAIL PROTECTED] Sent: Monday, December 29, 2003 14:48 To: Jakarta Commons Developers List Subject: Re: [collections] Version 3.0 - The final stretch I have been thinking of running through and replacing all the headers with one style (needs it for 2004 anyway), so I am in favour of removing the $Header. Its non-official anyway AFAIN. Stephen +1 Gary
[lang] SystemUtils.JAVA_IO_TMPDIR
Hello, When I use SystemUtils.JAVA_IO_TMPDIR, I really need File file = new File(SystemUtils.JAVA_IO_TMPDIR) Any thoughts/allergic reactions to providing a SystemUtils.JAVA_IO_TMPDIR_FILE? Gary
Re: [lang] SystemUtils.JAVA_IO_TMPDIR
Gary Gregory wrote: Hello, When I use SystemUtils.JAVA_IO_TMPDIR, I really need File file = new File(SystemUtils.JAVA_IO_TMPDIR) Any thoughts/allergic reactions to providing a SystemUtils.JAVA_IO_TMPDIR_FILE? Gary Would proving a static File instance create any strangeness with regard to system resources? I'm not sure. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[net] VMSFTPEntryParser bug?
I am trying to build commons-net prior to making some changes and some other issues have come to light. One of the tests is failing for me - VMSFTPEntryParserTest.testParseFileList(). This test seems poorly implemented, since the class being tested builds its list of files using a HashMap to eliminate dupes, I presume, and then spits out the list by calling values() on the HashMap - which spits out the values in an order that is different from the one the test is expecting. I was running this under java 1.3 on linux. I switched to java 1.4 and it is also failing but on a different line. I'm not sure what platform Jeff is on when he did the build, but I think I should rewrite this test in a way that doesn't assume any particular order since this seems to be JDK-implementation dependent. The JavaDoc for HashMap specifies no order that should be expected for HashMap.values(), nor for HashMap.keySet() for that matter. We could probably achieve a dependable order by using a TreeMap.keySet() instead. However, this brings up the larger question, of what the target platform for commons-net is. I dimly remember that it being java 1.1. This is why I went through the annoying exercise of creating the FTPFileList and FTPFileIterator classes based on java-1.1-compatible containers like Vector. If we are now using HashMaps, though, we will have violated this contract, if, in fact, such a contract exists. Can someone clarify this question? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[NET] VMSFTPEntryParser bug?
I am trying to build commons-net prior to making some changes and some other issues have come to light. One of the tests is failing for me - VMSFTPEntryParserTest.testParseFileList(). This test seems poorly implemented, since the class being tested builds its list of files using a HashMap to eliminate dupes, I presume, and then spits out the list by calling values() on the HashMap - which spits out the values in an order that is different from the one the test is expecting. I was running this under java 1.3 on linux. I switched to java 1.4 and it is also failing but on a different line. I'm not sure what platform Jeff is on when he did the build, but I think I should rewrite this test in a way that doesn't assume any particular order since this seems to be JDK-implementation dependent. The JavaDoc for HashMap specifies no order that should be expected for HashMap.values(), nor for HashMap.keySet() for that matter. We could probably achieve a dependable order by using a TreeMap.keySet() instead. However, this brings up the larger question, of what the target platform for commons-net is. I dimly remember that it being java 1.1. This is why I went through the annoying exercise of creating the FTPFileList and FTPFileIterator classes based on java-1.1-compatible containers like Vector. If we are now using HashMaps, though, we will have violated this contract, if, in fact, such a contract exists. Can someone clarify this question? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [NET] VMSFTPEntryParser bug?
On Monday 29 December 2003 04:27 pm, steve cohen wrote: I am trying to build commons-net prior to making some changes and some other issues have come to light. One of the tests is failing for me - VMSFTPEntryParserTest.testParseFileList(). This test seems poorly implemented, since the class being tested builds its list of files using a HashMap to eliminate dupes, I presume, and then spits out the list by calling values() on the HashMap - which spits out the values in an order that is different from the one the test is expecting. I was running this under java 1.3 on linux. I switched to java 1.4 and it is also failing but on a different line. I'm not sure what platform Jeff is on when he did the build, but I think I should rewrite this test in a way that doesn't assume any particular order since this seems to be JDK-implementation dependent. The JavaDoc for HashMap specifies no order that should be expected for HashMap.values(), nor for HashMap.keySet() for that matter. We could probably achieve a dependable order by using a TreeMap.keySet() instead. However, this brings up a larger question, of what the target platform for commons-net is. I dimly remember that it being java 1.1. This is why I went through the annoying exercise of creating the FTPFileList and FTPFileIterator classes based on java-1.1-compatible containers like Vector. If we are now using HashMaps, though, we will have violated this contract, if, in fact, such a contract exists. Can someone clarify this question? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [lang] SystemUtils.JAVA_IO_TMPDIR
It would definitely need to be protected in construction to avoid exceptions and set the value to null if it fails. Are there other values in systemutils that this could apply to? Stephen From: __matthewHawthorne [EMAIL PROTECTED] Gary Gregory wrote: Hello, When I use SystemUtils.JAVA_IO_TMPDIR, I really need File file = new File(SystemUtils.JAVA_IO_TMPDIR) Any thoughts/allergic reactions to providing a SystemUtils.JAVA_IO_TMPDIR_FILE? Gary Would proving a static File instance create any strangeness with regard to system resources? I'm not sure. - 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]
[net] apologies for all the repetition
You will notice several messages from me, using different email addresses. I have a new email setup and I mistakenly sent several emails using the wrong identity, one for which I had not signed up on the list. When I didn't receive these messages from the list, I became aware of my error and resent them with the correct id. An hour or so later I was surprised to find the original messages, sent by me using the wrong id, now being sent out by the listserver. Sorry again for all the confusion. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [uid] UuidClock patch1
I missed the IETF license clause that requires quoting from IETF documents to carry the full IETF copyright notice paragraph. This patch applies the (c) disclaimer paragraph as specified by the IETF copy license. Also removed the @author tag. Forthcoming patch changes this class to an interface. Index: UuidClock.java === RCS file: /home/cvspublic/jakarta-commons-sandbox/uid/src/java/org/apache/commons/uid/ uuid/UuidClock.java,v retrieving revision 1.1 diff -u -r1.1 UuidClock.java --- UuidClock.java 24 Dec 2003 08:59:45 - 1.1 +++ UuidClock.java 29 Dec 2003 23:28:22 - @@ -1,224 +1,249 @@ -/* - * $Header: /home/cvspublic/jakarta-commons-sandbox/uid/src/java/org/apache/commons/uid/ uuid/UuidClock.java,v 1.1 2003/12/24 08:59:45 psteitz Exp $ - * - * - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in - *the documentation and/or other materials provided with the - *distribution. - * - * 3. The end-user documentation included with the redistribution, if - *any, must include the following acknowledgement: - * This product includes software developed by the - *Apache Software Foundation (http://www.apache.org/). - *Alternately, this acknowledgement may appear in the software itself, - *if and wherever such third-party acknowledgements normally appear. - * - * 4. The names The Jakarta Project, Commons, and Apache Software - *Foundation must not be used to endorse or promote products derived - *from this software without prior written permission. For written - *permission, please contact [EMAIL PROTECTED] - * - * 5. Products derived from this software may not be called Apache - *nor may Apache appear in their names without prior written - *permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * http://www.apache.org/. - * - */ - -package org.apache.commons.uid.uuid; - -/** - * UuidClock.java provides a timing mechanism for returning the current time in - * 100-nano second intervals since 00:00:00.00, 15 October 1582 - * - * As described below this is useful for generating Version 1 UUIDs - * - * For more information regarding the IETF Draft Uuid specification - * see http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-01.txt - * - * Selected segements of Draft pertaining to this class: - * - * - * Timestamp - * The timestamp is a 60 bit value. For Uuid version 1, this is - * represented by Coordinated Universal Time (UTC) as a count of 100- - * nanosecond intervals since 00:00:00.00, 15 October 1582 (the date of - * Gregorian reform to the Christian calendar). - * - * Clock Adjustment - * UUIDs may be created at a rate greater than the system clock resolution. - * Therefore, the system must also maintain an adjustment value to be added to - * the lower-order bits of the time. Logically, each time the system clock - * ticks, the adjustment value is cleared. Every time a UUID is generated, - * the current adjustment value is read and incremented atomically, then added - * to the UTC time field of the UUID. - * - * Clock Overrun - * The 100 nanosecond granularity of time should prove sufficient even for - * bursts of UUID creation in the next generation of high-performance - *
cvs commit: jakarta-commons/collections maven.xml
scolebourne2003/12/29 15:56:15 Modified:collections maven.xml Log: Update to handle testframework jar creation and install Revision ChangesPath 1.6 +70 -13jakarta-commons/collections/maven.xml Index: maven.xml === RCS file: /home/cvs/jakarta-commons/collections/maven.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- maven.xml 29 Dec 2003 18:52:01 - 1.5 +++ maven.xml 29 Dec 2003 23:56:15 - 1.6 @@ -1,23 +1,80 @@ -project default=java:jar xmlns:j=jelly:core xmlns:ant=jelly:ant +project +default=java:jar +xmlns:j=jelly:core +xmlns:license=license +xmlns:maven=jelly:maven +xmlns:util=jelly:util +xmlns:ant=jelly:ant postGoal name=clover:on j:set var=maven.junit.sysproperties value=${maven.junit.sysproperties} org.apache.commons.collections:with-clover/ j:set var=org.apache.commons.collections:with-clover value=true/ /postGoal - postGoal name=jar:jar - ant:tstamp/ - ant:property name=workdir value=${java.io.tmpdir}/buildtemp_${DSTAMP}${TSTAMP}/ - ant:unjar dest=${workdir} src=${maven.build.dir}/${maven.final.name}.jar/ + !-- == JAR == -- + postGoal name=jar:jar +j:set var=finalName value=${pom.getPluginContext('maven-jar-plugin').getVariable('maven.final.name')}/ +j:set var=finalVersion value=${finalName.substring(20)} / +j:set var=testfwkBase value=${pom.artifactId}-testframework / +j:set var=testfwkName value=${testfwkBase}-${finalVersion} / + +ant:jar +jarfile=${maven.build.dir}/${testfwkName}.jar + j:set var=licenseFileNamelicense:fileName//j:set + util:file name=${licenseFileName} var=licenseFile/ + ant:metainf dir=${licenseFile.canonicalFile.parent} +ant:include name=${licenseFile.canonicalFile.name}/ + /ant:metainf + ant:manifest +ant:attribute name=Built-By value=${user.name}/ +ant:attribute name=Created-By value=Apache Jakarta Maven/ +ant:attribute name=Package value=${pom.package}/ +ant:attribute name=Build-Jdk value=${java.version}/ +!-- added supplementary entries -- +ant:attribute name=Extension-Name value=Commons Collections Test Framework/ +ant:attribute name=Specification-Version value=${pom.specificationVersion}/ +ant:attribute name=Specification-Vendor value=${pom.organization.name}/ +ant:attribute name=Specification-Title value=Commons Collections Test Framework/ +ant:attribute name=Implementation-Version value=${pom.currentVersion}/ +ant:attribute name=Implementation-Vendor value=${pom.organization.name}/ +ant:attribute name=Implementation-Vendor-Id value=${pom.organization.identifier}/ + /ant:manifest + ant:fileset dir=${maven.build.dir}/test-classes +ant:include name=**/AbstractTest*.class/ +ant:include name=**/BulkTest*.class/ + /ant:fileset +/ant:jar + /postGoal + + postGoal name=jar:install +j:set var=finalName value=${pom.getPluginContext('maven-jar-plugin').getVariable('maven.final.name')}/ +j:set var=finalVersion value=${finalName.substring(20)} / +j:set var=testfwkBase value=${pom.artifactId}-testframework / +j:set var=testfwkName value=${testfwkBase}-${finalVersion} / + +ant:property name=jardir__ value=${maven.repo.local}/${pom.artifactDirectory}/jars/ +ant:mkdir dir=${jardir__}/ +ant:copy +file=${maven.build.dir}/${testfwkName}.jar +todir=${jardir__} +overwrite=true / + /postGoal + + postGoal name=jar:install-snapshot +j:set var=finalName value=${pom.getPluginContext('maven-jar-plugin').getVariable('maven.final.name')}/ +j:set var=finalVersion value=${finalName.substring(20)} / +j:set var=testfwkBase value=${pom.artifactId}-testframework / +j:set var=testfwkName value=${testfwkBase}-${finalVersion} / - ant:jar jarfile=${maven.build.dir}/${pom.artifactId}-testframework-${pom.currentVersion}.jar manifest=${workdir}/META-INF/MANIFEST.MF - ant:fileset dir=${maven.build.dir}/test-classes -ant:include name=**/AbstractTest*.class/ -ant:include name=**/BulkTest*.class/ - /ant:fileset - /ant:jar - - delete dir=${workdir}/ +ant:property name=jardir__ value=${maven.repo.local}/${pom.artifactDirectory}/jars/ +ant:mkdir dir=${jardir__}/ +ant:copy +file=${maven.build.dir}/${testfwkName}.jar +tofile=${jardir__}/${testfwkBase}-SNAPSHOT.jar +overwrite=true / +ant:copy +file=${maven.build.dir}/${testfwkName}.jar +tofile=${jardir__}/${testfwkName}.jar /
Re: cvs commit: jakarta-commons/collections maven.xml
Cool, works for me. michael On 29 Dec 2003 [EMAIL PROTECTED] wrote: scolebourne2003/12/29 15:56:15 Modified:collections maven.xml Log: Update to handle testframework jar creation and install Revision ChangesPath 1.6 +70 -13jakarta-commons/collections/maven.xml Index: maven.xml === RCS file: /home/cvs/jakarta-commons/collections/maven.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- maven.xml 29 Dec 2003 18:52:01 - 1.5 +++ maven.xml 29 Dec 2003 23:56:15 - 1.6 @@ -1,23 +1,80 @@ -project default=java:jar xmlns:j=jelly:core xmlns:ant=jelly:ant +project +default=java:jar +xmlns:j=jelly:core +xmlns:license=license +xmlns:maven=jelly:maven +xmlns:util=jelly:util +xmlns:ant=jelly:ant postGoal name=clover:on j:set var=maven.junit.sysproperties value=${maven.junit.sysproperties} org.apache.commons.collections:with-clover/ j:set var=org.apache.commons.collections:with-clover value=true/ /postGoal - postGoal name=jar:jar - ant:tstamp/ - ant:property name=workdir value=${java.io.tmpdir}/buildtemp_${DSTAMP}${TSTAMP}/ - ant:unjar dest=${workdir} src=${maven.build.dir}/${maven.final.name}.jar/ + !-- == JAR == -- + postGoal name=jar:jar +j:set var=finalName value=${pom.getPluginContext('maven-jar-plugin').getVariable('maven.final.name')}/ +j:set var=finalVersion value=${finalName.substring(20)} / +j:set var=testfwkBase value=${pom.artifactId}-testframework / +j:set var=testfwkName value=${testfwkBase}-${finalVersion} / + +ant:jar +jarfile=${maven.build.dir}/${testfwkName}.jar + j:set var=licenseFileNamelicense:fileName//j:set + util:file name=${licenseFileName} var=licenseFile/ + ant:metainf dir=${licenseFile.canonicalFile.parent} +ant:include name=${licenseFile.canonicalFile.name}/ + /ant:metainf + ant:manifest +ant:attribute name=Built-By value=${user.name}/ +ant:attribute name=Created-By value=Apache Jakarta Maven/ +ant:attribute name=Package value=${pom.package}/ +ant:attribute name=Build-Jdk value=${java.version}/ +!-- added supplementary entries -- +ant:attribute name=Extension-Name value=Commons Collections Test Framework/ +ant:attribute name=Specification-Version value=${pom.specificationVersion}/ +ant:attribute name=Specification-Vendor value=${pom.organization.name}/ +ant:attribute name=Specification-Title value=Commons Collections Test Framework/ +ant:attribute name=Implementation-Version value=${pom.currentVersion}/ +ant:attribute name=Implementation-Vendor value=${pom.organization.name}/ +ant:attribute name=Implementation-Vendor-Id value=${pom.organization.identifier}/ + /ant:manifest + ant:fileset dir=${maven.build.dir}/test-classes +ant:include name=**/AbstractTest*.class/ +ant:include name=**/BulkTest*.class/ + /ant:fileset +/ant:jar + /postGoal + + postGoal name=jar:install +j:set var=finalName value=${pom.getPluginContext('maven-jar-plugin').getVariable('maven.final.name')}/ +j:set var=finalVersion value=${finalName.substring(20)} / +j:set var=testfwkBase value=${pom.artifactId}-testframework / +j:set var=testfwkName value=${testfwkBase}-${finalVersion} / + +ant:property name=jardir__ value=${maven.repo.local}/${pom.artifactDirectory}/jars/ +ant:mkdir dir=${jardir__}/ +ant:copy +file=${maven.build.dir}/${testfwkName}.jar +todir=${jardir__} +overwrite=true / + /postGoal + + postGoal name=jar:install-snapshot +j:set var=finalName value=${pom.getPluginContext('maven-jar-plugin').getVariable('maven.final.name')}/ +j:set var=finalVersion value=${finalName.substring(20)} / +j:set var=testfwkBase value=${pom.artifactId}-testframework / +j:set var=testfwkName value=${testfwkBase}-${finalVersion} / - ant:jar jarfile=${maven.build.dir}/${pom.artifactId}-testframework-${pom.currentVersion}.jar manifest=${workdir}/META-INF/MANIFEST.MF - ant:fileset dir=${maven.build.dir}/test-classes -ant:include name=**/AbstractTest*.class/ -ant:include name=**/BulkTest*.class/ - /ant:fileset - /ant:jar - - delete dir=${workdir}/ +ant:property name=jardir__ value=${maven.repo.local}/${pom.artifactDirectory}/jars/ +ant:mkdir dir=${jardir__}/ +ant:copy +file=${maven.build.dir}/${testfwkName}.jar +
RE: [lang] SystemUtils.JAVA_IO_TMPDIR
-Original Message- From: Stephen Colebourne [mailto:[EMAIL PROTECTED] Sent: Monday, December 29, 2003 15:30 To: Jakarta Commons Developers List Subject: Re: [lang] SystemUtils.JAVA_IO_TMPDIR It would definitely need to be protected in construction to avoid exceptions and set the value to null if it fails. Are there other values in systemutils that this could apply to? Stephen (1) The system properties (and examples) that point to a (one, 1) directory: java.home = C:\java\sun\1.4.2_03\jre java.io.tmpdir = C:\DOCUME~1\ggregory\LOCALS~1\Temp\ user.dir = C:\cvs-store\transidiom\deve user.home = C:\Documents and Settings\ggregory These could be mapped to java.io.File. This I could use. For all others below, I have no use for today. (2) The system properties that point to a directory list are: java.endorsed.dirs = C:\java\sun\1.4.2_03\jre\lib\endorsed java.ext.dirs = C:\java\sun\1.4.2_03\jre\lib\ext java.library.path = C:\java\sun\1.4.2_03\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\java\sun\1.4.2_ 03\bin;C:\Perl\bin\;C:\Program Files\IBM\WebSphere MQ\Java\lib;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGR AM FILES\THINKPAD\UTILITIES;C:\Program Files\IBM\IBM CICS Universal Client\BIN;c:\bin;C:\java\apache\apache-ant-1.6.0\bin;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\tools\c\samples\bin;C:\Documents and Settings\ggregory\My Documents\bin;C:\Program Files\4NT;C:\java\javacc-3.2\bin;C:\java\sun\jwsdp-1.2\jwsdp-shared\bin;C:\P rogram Files\Apache Software Foundation\Maven 1.0-rc1\bin sun.boot.class.path = C:\java\sun\1.4.2_03\jre\lib\endorsed\xalan.jar;C:\java\sun\1.4.2_03\jre\lib \endorsed\xercesImpl.jar;C:\java\sun\1.4.2_03\jre\lib\endorsed\xml-apis.jar; C:\java\sun\1.4.2_03\jre\lib\rt.jar;C:\java\sun\1.4.2_03\jre\lib\i18n.jar;C: \java\sun\1.4.2_03\jre\lib\sunrsasign.jar;C:\java\sun\1.4.2_03\jre\lib\jsse. jar;C:\java\sun\1.4.2_03\jre\lib\jce.jar;C:\java\sun\1.4.2_03\jre\lib\charse ts.jar;C:\java\sun\1.4.2_03\jre\classes sun.boot.library.path = C:\java\sun\1.4.2_03\jre\bin (3) These could be mapped to java.io.File[]. Other interesing properties that could map to a java.net.URL: java.vendor.url = http://java.sun.com/ java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi Gary From: __matthewHawthorne [EMAIL PROTECTED] Gary Gregory wrote: Hello, When I use SystemUtils.JAVA_IO_TMPDIR, I really need File file = new File(SystemUtils.JAVA_IO_TMPDIR) Any thoughts/allergic reactions to providing a SystemUtils.JAVA_IO_TMPDIR_FILE? Gary Would proving a static File instance create any strangeness with regard to system resources? I'm not sure.
Re: [Jexl] String concatination
Geir Magnusson Jr wrote: On Dec 20, 2003, at 10:22 PM, Robert wrote: I actually thought this was in the spec, my fault! I was trying to do string building, which of course didn't work, which lead me to look at the JavaDoc this class says either integer addition or string concatenation and the CVS entry says something about string concatenation not working anymore, so I did this quick patch. I even tried string literal addition and it doesn't work either. It would be nice so one does have to do ${hello.concat(' world')} to build strings, but I'll understand if it isn't added. What doesn't work? I don't understand. I'll double check but 'hello' + 'world' wouldn't work either. Perhaps I should just write a junit test!! Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [lang] SystemUtils.JAVA_IO_TMPDIR
Stephen Colebourne wrote: It would definitely need to be protected in construction to avoid exceptions and set the value to null if it fails. I think that static methods may be a cleaner approach, instead of a static block which much catch IOExceptions when constructing the static File objects. This would elminate the convenience of having static fields, but the possibility of receiving NullPointerExceptions instead of IOExceptions after an error doesn't seem favorable to me. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [net] apologies for all the repetition
Quoting steve cohen [EMAIL PROTECTED]: You will notice several messages from me, using different email addresses. I have a new email setup and I mistakenly sent several emails using the wrong identity, one for which I had not signed up on the list. When I didn't receive these messages from the list, I became aware of my error and resent them with the correct id. An hour or so later I was surprised to find the original messages, sent by me using the wrong id, now being sent out by the listserver. Messages to the list from unsubscribed addresses go to the moderation queue (I'm one of the moderators for COMMONS-DEV). My general policy is to moderate through on-topic messages like these, and ignore all the spam (alas, quite a lot :-). Sorry again for all the confusion. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Jelly][RT] The purpose of the JellyContext
The original issue is at: http://jira.werken.com/secure/ViewIssue.jspa?key=JELLY-1 and here is the start of a thread I started back in March on the subject: http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]msgId=682724 I don't have my solution available just yet as it needs a tad bit of work on the JellyContext and tried out, but that wouldn't take a big leap to accomplish. Along those lines I already have some scopes built that could be ready to go, namely a default scope as well as the HTTP scopes. If there is more interest on this, I'll get cracking and submit a patch for it. - Robert Carsten Ziegeler wrote: Robert wrote: my .02 on this one. There is an issue in Jira about moving the variable storage into an extensible Scope mechanism. I have a solution to this and asked several questions about this some time ago, but nothing was every done about it. That sounds great as I will need an extensible scope mechanism as well. Can you give a pointer to the issue? Is your solution available somewhere? Carsten I do agree that with the context doing so much it can make things confusing however. 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]
cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser VMSFTPEntryParserTest.java
scohen 2003/12/29 17:17:04 Modified:net/src/test/org/apache/commons/net/ftp/parser VMSFTPEntryParserTest.java Log: fix testParseFileList() method so as not to expect listing to be in an order which the method being tested is not able to ensure. Revision ChangesPath 1.7 +21 -4 jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/VMSFTPEntryParserTest.java Index: VMSFTPEntryParserTest.java === RCS file: /home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/VMSFTPEntryParserTest.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- VMSFTPEntryParserTest.java5 Aug 2003 18:56:42 - 1.6 +++ VMSFTPEntryParserTest.java30 Dec 2003 01:17:04 - 1.7 @@ -125,9 +125,26 @@ VMSFTPEntryParser parser = new VMSFTPEntryParser(); FTPFile[] files = parser.parseFileList(new ByteArrayInputStream(fullListing.getBytes())); assertEquals(3, files.length); -assertEquals(files[0].getName(), 2-JUN.LIS, files[0].getName()); -assertEquals(files[1].getName(), 3-JUN.LIS, files[1].getName()); -assertEquals(files[2].getName(), 1-JUN.LIS, files[2].getName()); +assertFileInListing(files, 1-JUN.LIS); +assertFileInListing(files, 2-JUN.LIS); +assertFileInListing(files, 3-JUN.LIS); +assertFileNotInListing(files, 1-JUN.LIS;1); +} + +public void assertFileInListing(FTPFile[] listing, String name) { +for (int i = 0; i listing.length; i++) { +if (name.equals(listing[i].getName())) { +return; +} +} +fail(File + name + not found in supplied listing); +} +public void assertFileNotInListing(FTPFile[] listing, String name) { +for (int i = 0; i listing.length; i++) { +if (name.equals(listing[i].getName())) { +fail(Unexpected File + name + found in supplied listing); +} +} } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [lang] SystemUtils.JAVA_IO_TMPDIR
Note that the current implementation already does some of this catch and set to null business WRT SecurityExpections. The additional layer needed to create a File object would be wrapped in a method that checks for null. What I like about the static final idea is that it does convey the idea that the value will not change, unlike a method call. OTOH, calling System.getProperty does not say anything about the value not changing, so I guess I'd be fine with a method or a field. Gary -Original Message- From: __matthewHawthorne [mailto:[EMAIL PROTECTED] Sent: Monday, December 29, 2003 16:56 To: Jakarta Commons Developers List Subject: Re: [lang] SystemUtils.JAVA_IO_TMPDIR Stephen Colebourne wrote: It would definitely need to be protected in construction to avoid exceptions and set the value to null if it fails. I think that static methods may be a cleaner approach, instead of a static block which much catch IOExceptions when constructing the static File objects. This would elminate the convenience of having static fields, but the possibility of receiving NullPointerExceptions instead of IOExceptions after an error doesn't seem favorable to me. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [configuration] [collections] ExtendedProperties
Stephen Colebourne wrote: The biggest difference seems to be the lack of a public void save(OutputStream output, String Header) Any particular reason why it was removed? Could it be put back? Stephen I don't know but it seems the first version of the save method in BasePropertiesConfiguration wasn't copied from ExtendedProperties, the code is quite different. Arrays of values are saved on the same line, coma separated, in BasePropertiesConfiguration whereas ExtendedProperties save them on multiple lines. I think we might add a flag to select the prefered format to save multiple values. The other big difference is that ExtendedProperties extends Hashtable, so it implements java.util.Map, but Configuration doesn't. I suggested to make Configuration extend Map, this might be an additional argument to do this change. Emmanuel Bourg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[net] FTPClient.getSystemName()
I am beginning to work on trying to map the output of this method to the different FTPEntryParser types we have in commons-net. I know that a default unix FTP server will return UNIX. But can anyone help me fill in this table? Commons-Net Parser Type thatReturn Value succesfully parses entries from getSystemName() UnixFTPEntryParser UNIX NTFTPEntryParser? OS2FTPEntryParser ? EnterpriseUnixFTPEntryParser? VMSFTPEntryParser ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser EnterpriseUnixFTPEntryParser.java NTFTPEntryParser.java OS2FTPEntryParser.java UnixFTPEntryParser.java VMSFTPEntryParser.java
scohen 2003/12/29 19:58:53 Modified:net/src/java/org/apache/commons/net/ftp/parser EnterpriseUnixFTPEntryParser.java NTFTPEntryParser.java OS2FTPEntryParser.java UnixFTPEntryParser.java VMSFTPEntryParser.java Log: Remove outdated documentation on usage of the parsers and provide one central bit of documentation explaining this usage. Revision ChangesPath 1.4 +2 -1 jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java Index: EnterpriseUnixFTPEntryParser.java === RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParser.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- EnterpriseUnixFTPEntryParser.java 18 May 2003 04:03:17 - 1.3 +++ EnterpriseUnixFTPEntryParser.java 30 Dec 2003 03:58:52 - 1.4 @@ -64,6 +64,7 @@ * -C--E-FTP B QUA1I1 18128 41 Aug 12 13:56 QUADTEST * @version $Id$ * @author a href=[EMAIL PROTECTED]Winston Ojeda/a + * @see org.apache.commons.net.ftp.FTPFileEntryParser FTPFileEntryParser (for usage instructions) */ public class EnterpriseUnixFTPEntryParser extends FTPFileListParserImpl { 1.5 +4 -40 jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java Index: NTFTPEntryParser.java === RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- NTFTPEntryParser.java 18 May 2003 04:03:17 - 1.4 +++ NTFTPEntryParser.java 30 Dec 2003 03:58:52 - 1.5 @@ -59,48 +59,12 @@ import org.apache.commons.net.ftp.FTPFileListParserImpl; /** - * This Class uses the ListParser class to validate the input string. - * It also requires the NetComponents library version 1.3.7 or later - * and the OROMatcher library for the regualar expressions stuff. - * - * - * PBUSAGE:/B/P - * LICreate an instance of NTListParser/LI - * ddNTListParser parser = new NTListParser(); - * LICreate an instance of FTPClient/LI - * ddFTPClient FTPClientObj = new FTPClient(); - * LIConnect to the NODE /LI - * ddFTPClientObj.connect(); - * LILogin to the NODE /LI - * ddFTPClientObj.login(username,password); - * LISwitch directories if you have to/LI - * ddFTPClientObj.changeWorkingDirectory(thePath); - * LIYou might want to check if you are truly in a NT System/LI - * ddBString am_I_NT = FTPClientObj.getSystemName()/B - *ddparse am_I_NT to find out - * LICall listFiles passing the newly created parser and a filename or a - * mask to look for /LI - * ddFTPClientObj.listFiles(parser,filename); - * LIYou'll get back the list as an array of FTPFiles like this - * ddFTPFile[] myNTFiles = FTPClientObj.listFiles(parser,filename); (or) - *ddFTPFile[] myNTFiles = FTPClientObj.listFiles(parser); - * P - * That's all there is to it. - * P - * Each FTPFile object is populated just like any other FTPFile - * object. The only thing not implemented at this time is the file - * permissions, but I can do it if there is a real need for it. - * P - * !NOTE/WARNING!:Before you pass the parser to listFiles, make sure you are in - * the directory that you need to be. This parser will return the filtered - * files from the directory it is in. This becomes crucial specialy if your - * goal is to delete the output of the parser. - * P - * + * Implementation of FTPFileEntryParser and FTPFileListParser for NT Systems + * * @author a href=[EMAIL PROTECTED]Winston Ojeda/a * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a * @version $Id$ - * @see org.apache.commons.net.ftp.FTPFileListParser + * @see org.apache.commons.net.ftp.FTPFileEntryParser FTPFileEntryParser (for usage instructions) */ public class NTFTPEntryParser extends FTPFileListParserImpl { 1.4 +5 -40 jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/OS2FTPEntryParser.java Index: OS2FTPEntryParser.java === RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/parser/OS2FTPEntryParser.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- OS2FTPEntryParser.java6 Mar 2003 03:28:36 - 1.3 +++ OS2FTPEntryParser.java30 Dec 2003 03:58:52 - 1.4 @@ -59,47 +59,12 @@ import org.apache.commons.net.ftp.FTPFileListParserImpl; /** - * This Class uses the ListParser class to validate the input string. - * It also
cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPFileEntryParser.java
scohen 2003/12/29 20:04:11 Modified:net/src/java/org/apache/commons/net/ftp FTPFileEntryParser.java Log: Add central documentation on parser usage, linked from all the parser implemenation javadocs. Revision ChangesPath 1.5 +22 -3 jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java Index: FTPFileEntryParser.java === RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPFileEntryParser.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FTPFileEntryParser.java 6 Mar 2003 12:38:42 - 1.4 +++ FTPFileEntryParser.java 30 Dec 2003 04:04:11 - 1.5 @@ -59,12 +59,31 @@ /** * FTPFileEntryParser defines the interface for parsing a single FTP file - * listing and converting that information into an + * listing and converting that information into an * a href=org.apache.commons.net.ftp.FTPFile.html FTPFile /a instance. * Sometimes you will want to parse unusual listing formats, in which * case you would create your own implementation of FTPFileEntryParser and * if necessary, subclass FTPFile. - * + * p + * Here is an example showing how to use one of the classes that + * implement this interface. In the following example codeparser /code + * is an object (in the package codeorg.apache.commons.net.ftp.parser/code) + * implementing this inteface. + * + * pre + *FTPClient f=FTPClient(); + *f.connect(server); + *f.login(username, password); + *FTPFileList list = createFTPFileList(directory, parser); + *FTPFileIterator iter = list.iterator(); + * + *while (iter.hasNext()) { + * FTPFile[] files = iter.getNext(25); // page size you want + * //do whatever you want with these files, display them, etc. + * //expensive FTPFile objects not created until needed. + *} + * /pre + * * @author a href=mailto:[EMAIL PROTECTED]Steve Cohen/a * @version $Id$ * @see org.apache.commons.net.ftp.FTPFile - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: \ in path (instead of /)
On Monday 22 December 2003 09:23, Ortwin Glück wrote: Sam Berlin wrote: HttpClient (rc2) currently barfs on addresses that look like: http://address:port\path\to\some\file.html It might be worthwhile to allow these slashes to be parsed as if they were /'s. Why? Sorry, I don't think this sort of URI is defined by any URI RFC (teach me better). If you need this for your particular application then please write a convertor for it. But this is certainly not something that will go into HttpClient. Odi Sam, some time ago, I have also had to work with such backslashed http-URLs. My solution was to extend the URI class (see below). It was a quick hack only, but may suit your needs. Feel free to use/modify the code in your program (feedback always appreciated). I agree with Odi that working with backslashes in URIs is unwise and that support for this should not be included in the HttpClient core (but probably in contrib someday) Christian /** * A non-standards compliant URI supporting unescaped backslashes ('\') * and more unwise things * * @author Christian Kohlschuetter */ public class UnwiseURI extends URI { public UnwiseURI(String uri) throws URIException { super(uri, true); } public void setRawPath(char[] escapedPath) throws URIException { if (escapedPath == null || escapedPath.length == 0) { _opaque = escapedPath; } escapedPath = removeFragmentIdentifier(escapedPath); _path = escapedPath; setURI(); } public static void main(String[] args) throws Exception { System.out.println(new URI(http://www.newsclub.de/foo\\bar;, false)); System.out.println(new UnwiseURI(http://www.newsclub.de/foo\\bar;)); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 24352] - NTLM Proxy and basic host authorization
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24352. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24352 NTLM Proxy and basic host authorization --- Additional Comments From [EMAIL PROTECTED] 2003-12-29 14:07 --- ok, thanks a lot :) - especially for being so nice towards someone *this* dumb ;] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HttpClient] Refactor get/setRequestHeader(Content-Type,..)
Ugh - cross-posting. Seems like this question was meant for httpclient-dev, so I've included that I think the answer will come back from the regulars on the httpclient dev list that the long term intent is to split the request, and response parts of the HttpMethod interface into distinct pieces. As part of those new interfaces, your suggestions certainly make sense. Unfortunately, adding to the existing HttpMethod interface *could* break existing code that doesn't inherit from HttpMethodBase (although as a practical manner, I'm not sure that anyone out there could realistically implement HttpMethod without extending HttpMethodBase, part of its architectural flaw). Defining the constants in some place makes sense, and perhaps those are good utility functions? I think there might be some other subtleties going on here, but I've not really considered this part of the code before. I think various HttpClient commiters are on vacation until Jan., so I wouldn't expect a more complete response before then. -Eric. Gary Gregory wrote: Hello HttpClient, For our code which uses HttpClient, I find myself defining constants and methods in our code for things like Content-Type header handling. I am surprised not to find such a constant in HttpClient in a public place. (It is defined in multipart.Part as protected). I also see a lot of getRequestHeader(Content-Type) and setRequestHeader(Content-Type, ...). This is seem like a good opportunity for a refactoring, in this case to getContentType() and setContentType(String). Is there any reasons these methods do not exist? I am a committer on [lang] and [codec] (also dabbling in [vsf]) and can help out directly or via patches if the group is interested in moving in this direction. Thanks for reading, Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]