Re: [i18n,xmlio] current class diagrams
Is your server up? I wanted to have a look at your diagrams, but the request timed out :( Oliver Well, I´m in Brazil. This server is not so good ... Please, can you try more one time and reply to me knows? Thanx Woody - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n,xmlio] current class diagrams
I see somewhere in jakarta docs one advise (as I see is more one 'suggestion') about don´t post attachs here. Well, this files are small ... Woody - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27193] - Documentation: illustrate how to integrate virus control
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=27193. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=27193 --- Additional Comments From [EMAIL PROTECTED] 2005-01-26 10:23 --- see https://bugzilla.mozilla.org/show_bug.cgi?id=103487 for ideas how to handle this for UAs (browser/mail) and pointers re the Microsoft way -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n,xmlio] current class diagrams
On Wed, 2005-01-26 at 05:08 -0800, Anaximandro (Woody) wrote: Is your server up? I wanted to have a look at your diagrams, but the request timed out :( Oliver Well, I´m in Brazil. This server is not so good ... Please, can you try more one time and reply to me knows? Are you a commons committer? If so, are you aware that apache provides each committer a homepage available that you can use for this sort of stuff? Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n,xmlio] current class diagrams
Are you a commons committer? If so, are you aware that apache provides each committer a homepage available that you can use for this sort of stuff? Simon, I´m not a commiter yet, maybe soon. Who knows? Thanx by note Woody - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n,xmlio] current class diagrams
On Wed, 2005-01-26 at 06:52 -0800, Anaximandro (Woody) wrote: Are you a commons committer? If so, are you aware that apache provides each committer a homepage available that you can use for this sort of stuff? Simon, I´m not a commiter yet, maybe soon. Who knows? Then if the files you want to distribute aren't *too* large, another option is to open a bugzilla enhancement request, and attach the files there. That is probably better than emailing attachments that go to every person subscribed here... Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jelly/src/test/org/apache/commons/jelly/test/xml nonexistentTags1.jelly
dion2005/01/26 04:33:29 Modified:jelly/src/test/org/apache/commons/jelly/test/xml nonexistentTags1.jelly Log: Changing script to use completely fictitious library instead of a well known one. PR: JELLY-198 Obtained from: N/A Submitted by: Marc DeXet Reviewed by: dIon Gillard Revision ChangesPath 1.4 +1 -1 jakarta-commons/jelly/src/test/org/apache/commons/jelly/test/xml/nonexistentTags1.jelly Index: nonexistentTags1.jelly === RCS file: /home/cvs/jakarta-commons/jelly/src/test/org/apache/commons/jelly/test/xml/nonexistentTags1.jelly,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- nonexistentTags1.jelly8 Sep 2004 05:41:32 - 1.3 +++ nonexistentTags1.jelly26 Jan 2005 12:33:28 - 1.4 @@ -15,7 +15,7 @@ limitations under the License. -- j:jelly -xmlns:j=jelly:core xmlns:x=jelly:xml +xmlns:j=jelly:core xmlns:x=jelly:org.apache.commons.jelly.DOESNOTEXIST j:set var=foo value=bar/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Assigned: (JELLY-198) more accurate test/xml test non existent tag
[ http://issues.apache.org/jira/browse/JELLY-198?page=history ] dion gillard reassigned JELLY-198: -- Assign To: dion gillard more accurate test/xml test non existent tag Key: JELLY-198 URL: http://issues.apache.org/jira/browse/JELLY-198 Project: jelly Type: Improvement Versions: 1.0-RC2 Reporter: Marc DeXeT Assignee: dion gillard Priority: Trivial Fix For: 1.0-RC2 Attachments: patch_2005.01.22_nonexistentTag.txt src/test/org/apache/commons/jelly/test/xml/TestNonexistentTags.java is based upon taglib xml in not in path : it could be false for people working with it in classpath. Proposition : replace xml taglib binding by fake library binding. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jelly/xdocs changes.xml
dion2005/01/26 04:40:36 Modified:jelly/xdocs changes.xml Log: Document Paul's fixing of Jelly-191 Revision ChangesPath 1.25 +2 -1 jakarta-commons/jelly/xdocs/changes.xml Index: changes.xml === RCS file: /home/cvs/jakarta-commons/jelly/xdocs/changes.xml,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- changes.xml 24 Jan 2005 00:34:06 - 1.24 +++ changes.xml 26 Jan 2005 12:40:36 - 1.25 @@ -25,9 +25,10 @@ /properties body release version=1.0-RC2 date=in CVS + action dev=polx type=add issue=JELLY-191FileTag now allows appending to the file./action action dev=polx type=fix issue=JELLY-85Removed instance-based ThreadLocal substituting a JellyContext-based tag-caching./action action dev=polx type=add issue=JELLY-145jelly -h or --help responds a help and jelly -v or --version responds the version./action - /release +/release release version=1.0-RC1 date=2004-11-22 action dev=dion type=fix issue=JELLY-148 due-to=Hans GildeHuge memory leak resulting from the use of ThreadLocal./action action dev=dion type=fix issue=JELLY-138Character data is flushed by XMLOuput while XML data isn't./action - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (JELLY-191) FileTag must allow to append to flat file
[ http://issues.apache.org/jira/browse/JELLY-191?page=comments#action_58084 ] dion gillard commented on JELLY-191: AFAICT append is only checked when working with the name attribute set. I propose fixing it for the case of 'var' as well. FileTag must allow to append to flat file - Key: JELLY-191 URL: http://issues.apache.org/jira/browse/JELLY-191 Project: jelly Type: Improvement Components: core / taglib.core Versions: 1.0-beta-4 Reporter: Marc DeXeT Priority: Minor Fix For: 1.0-RC2 Core FileTag allows to write only XML or HTML content to file. But there's a need to write flat content unix-like or in pseudo-xml (element collection without document root). So FileTag must allow to write flat content to file. Proposition to add a boolean flat property. There also a need to add append property to.. append to existing file :) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DBCP] request for improved Exception nesting in ConnectionPool
Hi, I tried to establish a ConnectionPool with DBCP to an Informix Database using your examples. I always got the exeception pool exhausted when trying to open the first connection. I eventually found out during debugging that the problem was an older Informix driver (that is generally still in use, though). It didn't support read-only mode and threw an SQLException even when calling setReadOnly(false). It would be helpful for users if in cases like that the actual exception would be thrown, pool exhausted didn't help much. Cheers, Meikel Bisping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jelly/src/test/org/apache/commons/jelly/test/impl TestEmbedded.java
dion2005/01/26 05:10:09 Modified:jelly/src/test/org/apache/commons/jelly/test/impl TestEmbedded.java Log: Make asserts more obvious Revision ChangesPath 1.8 +3 -3 jakarta-commons/jelly/src/test/org/apache/commons/jelly/test/impl/TestEmbedded.java Index: TestEmbedded.java === RCS file: /home/cvs/jakarta-commons/jelly/src/test/org/apache/commons/jelly/test/impl/TestEmbedded.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- TestEmbedded.java 6 Jan 2005 09:05:28 - 1.7 +++ TestEmbedded.java 26 Jan 2005 13:10:09 - 1.8 @@ -68,16 +68,16 @@ embedded.setOutputStream(baos); boolean status = embedded.execute(); //executed properly without script errors -assertEquals(status, true); +assertTrue(Emebedded execution failed, status); //check that the output confirms the exepected assertEquals(jelly-test-case, new String(baos.toByteArray())); //test generation of error embedded.setScript(jellyScript + obnoxious-part); status = embedded.execute(); //test failure of execution -assertEquals(false, status); +assertFalse(A script with bad XML was executed successfully, status); //Asserting the parser generated a errorMsg -assertNotNull(embedded.getErrorMsg()); +assertNotNull(A script with bad XML didn't generate an error message, embedded.getErrorMsg()); } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Resolved: (JELLY-198) more accurate test/xml test non existent tag
[ http://issues.apache.org/jira/browse/JELLY-198?page=history ] dion gillard resolved JELLY-198: Resolution: Fixed Fix Version: 1.0-RC2 Used a clearly non-existent jelly class more accurate test/xml test non existent tag Key: JELLY-198 URL: http://issues.apache.org/jira/browse/JELLY-198 Project: jelly Type: Improvement Versions: 1.0-RC2 Reporter: Marc DeXeT Assignee: dion gillard Priority: Trivial Fix For: 1.0-RC2 Attachments: patch_2005.01.22_nonexistentTag.txt src/test/org/apache/commons/jelly/test/xml/TestNonexistentTags.java is based upon taglib xml in not in path : it could be false for people working with it in classpath. Proposition : replace xml taglib binding by fake library binding. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Resolved: (JELLY-191) FileTag must allow to append to flat file
[ http://issues.apache.org/jira/browse/JELLY-191?page=history ] dion gillard resolved JELLY-191: Resolution: Fixed Fix Version: 1.0-RC2 Paul has fixed this I believe. FileTag must allow to append to flat file - Key: JELLY-191 URL: http://issues.apache.org/jira/browse/JELLY-191 Project: jelly Type: Improvement Components: core / taglib.core Versions: 1.0-beta-4 Reporter: Marc DeXeT Priority: Minor Fix For: 1.0-RC2 Core FileTag allows to write only XML or HTML content to file. But there's a need to write flat content unix-like or in pseudo-xml (element collection without document root). So FileTag must allow to write flat content to file. Proposition to add a boolean flat property. There also a need to add append property to.. append to existing file :) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core FileTag.java
dion2005/01/26 05:28:02 Modified:jelly/src/test/org/apache/commons/jelly suite.jelly jelly/src/java/org/apache/commons/jelly/tags/core FileTag.java Log: Handle append on FileTag when the var attribute has a value Revision ChangesPath 1.23 +13 -8 jakarta-commons/jelly/src/test/org/apache/commons/jelly/suite.jelly Index: suite.jelly === RCS file: /home/cvs/jakarta-commons/jelly/src/test/org/apache/commons/jelly/suite.jelly,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- suite.jelly 23 Jan 2005 22:36:53 - 1.22 +++ suite.jelly 26 Jan 2005 13:28:02 - 1.23 @@ -201,14 +201,12 @@ actual=${foo}/ /test:case -test:case name=testFileToVar -j:file var=foo omitXmlDeclaration=true -foo x=1hello/foo -/j:file + test:case name=testFileToVar +j:file var=foo omitXmlDeclaration=true + foo x=1hello/foo +/j:file -test:assertEquals -expected='lt;foo x=1gt;hellolt;/foogt;' -actual=${foo}/ +test:assertEquals expected='lt;foo x=1gt;hellolt;/foogt;' actual=${foo}/ /test:case @@ -359,5 +357,12 @@ lé#\ü/l/j:file j:set var=doubleSize value=${f.length()}/ test:assertEquals expected=${singleSize*2} actual=${doubleSize}/ -/test:case + /test:case + + !-- make sure append works for the 'var' version of the file tag -- + test:case name=testFileToVarAppend +j:set var=result value=previous result./ +j:file var=result omitXmlDeclaration=true append=trueAnd again/j:file +test:assertEquals expected='previous result.And again' actual=${result}/ + /test:case /test:suite 1.18 +8 -1 jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/FileTag.java Index: FileTag.java === RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/tags/core/FileTag.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- FileTag.java 23 Jan 2005 22:36:53 - 1.17 +++ FileTag.java 26 Jan 2005 13:28:02 - 1.18 @@ -62,7 +62,14 @@ else if (var != null) { StringWriter writer = new StringWriter(); writeBody(writer); -context.setVariable(var, writer.toString()); +String result = writer.toString(); +Object varValue = context.getVariable(var); +// if we're appending, and var is an instance of string, append it. +if (doAppend varValue instanceof String) { +context.setVariable(var, varValue + result); +} else { +context.setVariable(var, result); +} } else { throw new JellyTagException( This tag must have either the 'name' or the 'var' variables defined ); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n,xmlio] current class diagrams
Nice. This would people help getting started as an overview, right? Unfortunately, the resolution is too low to actually read everything. If you created something like a bugzilla entry with better resolution I would be happy to add them to the projects documentation. Provided that this is ok for you, of course. Oliver On Wed, 26 Jan 2005 05:18:50 -0800, Anaximandro (Woody) [EMAIL PROTECTED] wrote: I see somewhere in jakarta docs one advise (as I see is more one 'suggestion') about don´t post attachs here. Well, this files are small ... Woody - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [all][VOTE][Results] commons svn migration
On Tue, 25 Jan 2005 23:03:04 -0500, Tim O'Brien [EMAIL PROTECTED] wrote: More than 72 hours have passed for this vote, I think everyone has had ample opportunity to weigh in. We need to do this when Justin is free, and that happens to be Thursday morning or afternoon. Most other conversions are simple one shot conversions, but commons is really more of a series of conversions - each component is converted separately, combined, and then dumped to a dump which we can then import into the ASF repository. It takes 3-4 hours, so when I confirm with Justin, I'll send a note to commons-dev with the time we'll lock the CVS repository. I'll make sure I lurk on the #asfinfra channel on Thursday in case you need any help testing etc. Henri, what, if anything, do we need to do to migrate karma? Check with Justin, but they usually handle karma. It's pretty much a cut and paste from avail to the svn authorization, and then they comment out the line in avail. If you can't commit after the migration, it means an update script needs to be run as they've not got it hooked up yet so that a change to the svn auth file goes live when it's committed. Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (JELLY-191) FileTag must allow to append to flat file
[ http://issues.apache.org/jira/browse/JELLY-191?page=comments#action_58088 ] Paul Libbrecht commented on JELLY-191: -- Have added the append to be valid for var as well... sorry for this omission. paul FileTag must allow to append to flat file - Key: JELLY-191 URL: http://issues.apache.org/jira/browse/JELLY-191 Project: jelly Type: Improvement Components: core / taglib.core Versions: 1.0-beta-4 Reporter: Marc DeXeT Priority: Minor Fix For: 1.0-RC2 Core FileTag allows to write only XML or HTML content to file. But there's a need to write flat content unix-like or in pseudo-xml (element collection without document root). So FileTag must allow to write flat content to file. Proposition to add a boolean flat property. There also a need to add append property to.. append to existing file :) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Closed: (JELLY-191) FileTag must allow to append to flat file
[ http://issues.apache.org/jira/browse/JELLY-191?page=history ] Paul Libbrecht closed JELLY-191: Fixed in CVS. paul FileTag must allow to append to flat file - Key: JELLY-191 URL: http://issues.apache.org/jira/browse/JELLY-191 Project: jelly Type: Improvement Components: core / taglib.core Versions: 1.0-beta-4 Reporter: Marc DeXeT Priority: Minor Fix For: 1.0-RC2 Core FileTag allows to write only XML or HTML content to file. But there's a need to write flat content unix-like or in pseudo-xml (element collection without document root). So FileTag must allow to write flat content to file. Proposition to add a boolean flat property. There also a need to add append property to.. append to existing file :) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ATTRIBUTES] make it compile on JDK 1.5
subject says it all. Some trivial enum replacements. Stefan Index: api/src/java/org/apache/commons/attributes/AttributeIndex.java === RCS file: /home/cvspublic/jakarta-commons/attributes/api/src/java/org/apache/commons/attributes/AttributeIndex.java,v retrieving revision 1.2 diff -u -r1.2 AttributeIndex.java --- api/src/java/org/apache/commons/attributes/AttributeIndex.java 27 Aug 2004 21:30:10 - 1.2 +++ api/src/java/org/apache/commons/attributes/AttributeIndex.java 26 Jan 2005 15:24:48 - @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -219,9 +219,9 @@ */ public AttributeIndex (ClassLoader cl) throws Exception { this.classLoader = cl; -Enumeration enum = cl.getResources (META-INF/attrs.index); -while (enum.hasMoreElements ()) { -URL url = (URL) enum.nextElement (); +Enumeration e = cl.getResources (META-INF/attrs.index); +while (e.hasMoreElements ()) { +URL url = (URL) e.nextElement (); loadFromURL (url); } Index: compiler/src/java/org/apache/commons/attributes/compiler/AttributeIndexer.java === RCS file: /home/cvspublic/jakarta-commons/attributes/compiler/src/java/org/apache/commons/attributes/compiler/AttributeIndexer.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 AttributeIndexer.java --- compiler/src/java/org/apache/commons/attributes/compiler/AttributeIndexer.java 6 Jul 2004 20:42:04 - 1.1.1.1 +++ compiler/src/java/org/apache/commons/attributes/compiler/AttributeIndexer.java 26 Jan 2005 15:24:48 - @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -150,9 +150,9 @@ File newJarFile = new File (jarFile.getPath () + .new); JarOutputStream output = new JarOutputStream (new FileOutputStream (newJarFile)); try { -Enumeration enum = jar.entries (); -while (enum.hasMoreElements ()) { -JarEntry entry = (JarEntry) enum.nextElement (); +Enumeration e = jar.entries (); +while (e.hasMoreElements ()) { +JarEntry entry = (JarEntry) e.nextElement (); if (!entry.isDirectory ()) { String className = entry.getName (); if (className.endsWith (SUFFIX)) { Index: compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java === RCS file: /home/cvspublic/jakarta-commons/attributes/compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 AttributeValidatorTask.java --- compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java 6 Jul 2004 20:42:09 - 1.1.1.1 +++ compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java 26 Jan 2005 15:24:49 - @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -143,9 +143,9 @@ JarFile jar = new JarFile (jarFile); try { -Enumeration enum = jar.entries (); -while (enum.hasMoreElements ()) { -JarEntry entry = (JarEntry) enum.nextElement (); +Enumeration e = jar.entries (); +while (e.hasMoreElements ()) { +JarEntry entry = (JarEntry) e.nextElement (); if (!entry.isDirectory ()) { String className = entry.getName (); if (className.endsWith (SUFFIX)) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL] Make it compile with JDK 1.5
subject says it all. Some trivial enum replacements. Stefan Index: src/java/org/apache/commons/mail/Email.java === RCS file: /home/cvspublic/jakarta-commons/email/src/java/org/apache/commons/mail/Email.java,v retrieving revision 1.5 diff -u -r1.5 Email.java --- src/java/org/apache/commons/mail/Email.java 15 Jan 2005 17:15:31 - 1.5 +++ src/java/org/apache/commons/mail/Email.java 26 Jan 2005 15:31:32 - @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 The Apache Software Foundation + * Copyright 2001-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 ( the License ); * you may not use this file except in compliance with the License. @@ -797,11 +797,11 @@ if (this.headers.size() 0) { -Enumeration enum = this.headers.keys(); +Enumeration enumHeaderKeys = this.headers.keys(); -while (enum.hasMoreElements()) +while (enumHeaderKeys.hasMoreElements()) { -String name = (String) enum.nextElement(); +String name = (String) enumHeaderKeys.nextElement(); String value = (String) headers.get(name); this.message.addHeader(name, value); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DISCOVERY] Make it compile on JDK 1.5
subject says it all. Some trivial enum replacements. Stefan Index: src/java/org/apache/commons/discovery/resource/DiscoverResources.java === RCS file: /home/cvspublic/jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/DiscoverResources.java,v retrieving revision 1.4 diff -u -r1.4 DiscoverResources.java --- src/java/org/apache/commons/discovery/resource/DiscoverResources.java 27 Feb 2004 23:36:55 - 1.4 +++ src/java/org/apache/commons/discovery/resource/DiscoverResources.java 26 Jan 2005 15:38:07 - @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation + * Copyright 1999-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -108,9 +108,9 @@ if (log.isDebugEnabled()) log.debug(getNextResources: search using ClassLoader ' + loader + '); try { -Enumeration enum = JDKHooks.getJDKHooks().getResources(loader, resourceName); -if (enum != null enum.hasMoreElements()) { -return enum; +Enumeration e = JDKHooks.getJDKHooks().getResources(loader, resourceName); +if (e != null e.hasMoreElements()) { +return e; } } catch( IOException ex ) { log.warn(getNextResources: Ignoring Exception, ex); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [lang] 2.1...
I've been filling out some tests/overloads in ArrayUtils when I've found time. Need to commit my latest. I think we should wait until after the svn change, sounds like it'll happen pretty soon. I'm happy to volunteer to do the release management. Who wants to handle the WordUtils changes? Hen On Wed, 26 Jan 2005 00:14:24 -, Stephen Colebourne [EMAIL PROTECTED] wrote: Checking my mail history Still TODO: 5) - WordUtils Capitalize with separator methods need to define null handling for delimiter list, and better javadoc for two of the three methods And thats it, besides finding a volunteer to do the release (before a svn change?) Stephen - Original Message - From: Gary Gregory [EMAIL PROTECTED] Hello All: I just noticed it's been about a month since the last 2.1 ponderings. Where do we stand now? Curious, Gary -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED] Sent: Friday, December 17, 2004 7:22 PM To: Jakarta Commons Developers List Subject: [lang] 2.1... Sorry for the silence from me. As I've probably said a million times, baby happened. I'm full of coding energy, or perhaps the need to 'have coded' that leads to coding happening and looking to direct some of it to Lang 2.1. Looking at the wiki and bugzilla, we were nearly there as far as I recall. Not a lot has cropped up in the 2 months or so that have passed, couple of bugs I've easily closed out and a couple of trickier ones. Gary seems to have taken care of http://issues.apache.org/bugzilla/show_bug.cgi?id=32625. Is it ready for closure Gary? Despite Matt Blum's comment on a work-around, it still sounds like a fine change to the library. The only other new bug is a note on incorrect javadoc and should be an easy one: http://issues.apache.org/bugzilla/show_bug.cgi?id=32619. Stephen listed the following as smelling: --- 1) - ArrayUtils.lastIndex() Gets the last valid index of an array. Surely users would just call getLength() - 1? 2) - ClassUtils.CLASS_NAME_COMPARATOR - ClassUtils.PACKAGE_NAME_COMPARATOR Although potentially useful, they seem quite specific. What about comparing packages using Class objects? (I've never used a Package object in my work) Or comparing just the short name of a class? 3) - NotImplementedException This now implements Nestable, with a lot of extra methods. None of the other exception classes in the main package have been changed. We should revert this change, or find a lighter weight solution that works with ExceptionUtils. 4) - Validate.allElementsOfClass Should rename to allElementsOfType, and use instanceof style check, not class equals style check Still TODO: 5) - WordUtils Capitalize with separator methods need to define null handling for delimiter list, and better javadoc for two of the three methods 6) - time.DurationFormatUtils (complete?) 7) - time.StopWatch (complete?) 8) - text subpackage (not in 2.1) - I think we were all agreed on 8. 6+7 I'm open to ideas on improvements, I think they were complete but need to look again to convince myself. 3, 4 and 5 all look to be quite agreeable and so just need to be done. 1 and 2 look to be justify thy existence questions to the relevant features. So we need to decide whether we think they should go or not. 1 seems to be a classic it's semantically better argument, whereas 2 seems to be a it's not generic enough. Usually we keep code with semantically better arguments and drop not-generic enough code I think, so 1 would stay and 2 would be rm'd. I'm not tied to either though, so ymmv. I've clovered and uploaded to: http://www.apache.org/~bayard/commons-lang-2.1/clover/ Thoughts? Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/email/src/java/org/apache/commons/mail Email.java
dims2005/01/26 07:49:43 Modified:email/src/java/org/apache/commons/mail Email.java Log: trivial enum changes for jdk1.5 from Stefan Bodewig Revision ChangesPath 1.6 +6 -6 jakarta-commons/email/src/java/org/apache/commons/mail/Email.java Index: Email.java === RCS file: /home/cvs/jakarta-commons/email/src/java/org/apache/commons/mail/Email.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Email.java15 Jan 2005 17:15:31 - 1.5 +++ Email.java26 Jan 2005 15:49:42 - 1.6 @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 The Apache Software Foundation + * Copyright 2001-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 ( the License ); * you may not use this file except in compliance with the License. @@ -797,11 +797,11 @@ if (this.headers.size() 0) { -Enumeration enum = this.headers.keys(); +Enumeration enumHeaderKeys = this.headers.keys(); -while (enum.hasMoreElements()) +while (enumHeaderKeys.hasMoreElements()) { -String name = (String) enum.nextElement(); +String name = (String) enumHeaderKeys.nextElement(); String value = (String) headers.get(name); this.message.addHeader(name, value); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/attributes/compiler/src/java/org/apache/commons/attributes/validation AttributeValidatorTask.java
dims2005/01/26 07:54:19 Modified:attributes/api/src/java/org/apache/commons/attributes AttributeIndex.java attributes/compiler/src/java/org/apache/commons/attributes/compiler AttributeIndexer.java attributes/compiler/src/java/org/apache/commons/attributes/validation AttributeValidatorTask.java Log: trivial enum changes for jdk1.5 from Stefan Bodewig Revision ChangesPath 1.3 +4 -4 jakarta-commons/attributes/api/src/java/org/apache/commons/attributes/AttributeIndex.java Index: AttributeIndex.java === RCS file: /home/cvs/jakarta-commons/attributes/api/src/java/org/apache/commons/attributes/AttributeIndex.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AttributeIndex.java 27 Aug 2004 21:30:10 - 1.2 +++ AttributeIndex.java 26 Jan 2005 15:54:19 - 1.3 @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -219,9 +219,9 @@ */ public AttributeIndex (ClassLoader cl) throws Exception { this.classLoader = cl; -Enumeration enum = cl.getResources (META-INF/attrs.index); -while (enum.hasMoreElements ()) { -URL url = (URL) enum.nextElement (); +Enumeration e = cl.getResources (META-INF/attrs.index); +while (e.hasMoreElements ()) { +URL url = (URL) e.nextElement (); loadFromURL (url); } 1.2 +4 -4 jakarta-commons/attributes/compiler/src/java/org/apache/commons/attributes/compiler/AttributeIndexer.java Index: AttributeIndexer.java === RCS file: /home/cvs/jakarta-commons/attributes/compiler/src/java/org/apache/commons/attributes/compiler/AttributeIndexer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AttributeIndexer.java 6 Jul 2004 20:42:04 - 1.1 +++ AttributeIndexer.java 26 Jan 2005 15:54:19 - 1.2 @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -150,9 +150,9 @@ File newJarFile = new File (jarFile.getPath () + .new); JarOutputStream output = new JarOutputStream (new FileOutputStream (newJarFile)); try { -Enumeration enum = jar.entries (); -while (enum.hasMoreElements ()) { -JarEntry entry = (JarEntry) enum.nextElement (); +Enumeration e = jar.entries (); +while (e.hasMoreElements ()) { +JarEntry entry = (JarEntry) e.nextElement (); if (!entry.isDirectory ()) { String className = entry.getName (); if (className.endsWith (SUFFIX)) { 1.2 +4 -4 jakarta-commons/attributes/compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java Index: AttributeValidatorTask.java === RCS file: /home/cvs/jakarta-commons/attributes/compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AttributeValidatorTask.java 6 Jul 2004 20:42:09 - 1.1 +++ AttributeValidatorTask.java 26 Jan 2005 15:54:19 - 1.2 @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -143,9 +143,9 @@ JarFile jar = new JarFile (jarFile); try { -Enumeration enum = jar.entries (); -while (enum.hasMoreElements ()) { -JarEntry entry = (JarEntry) enum.nextElement (); +Enumeration e = jar.entries (); +while (e.hasMoreElements ()) { +JarEntry entry = (JarEntry) e.nextElement (); if (!entry.isDirectory ()) { String className = entry.getName (); if (className.endsWith (SUFFIX)) {
Re: [EMAIL] Make it compile with JDK 1.5
fixed. -- dims On Wed, 26 Jan 2005 16:31:59 +0100, Stefan Bodewig [EMAIL PROTECTED] wrote: subject says it all. Some trivial enum replacements. Stefan Index: src/java/org/apache/commons/mail/Email.java === RCS file: /home/cvspublic/jakarta-commons/email/src/java/org/apache/commons/mail/Email.java,v retrieving revision 1.5 diff -u -r1.5 Email.java --- src/java/org/apache/commons/mail/Email.java 15 Jan 2005 17:15:31 - 1.5 +++ src/java/org/apache/commons/mail/Email.java 26 Jan 2005 15:31:32 - @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 The Apache Software Foundation + * Copyright 2001-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 ( the License ); * you may not use this file except in compliance with the License. @@ -797,11 +797,11 @@ if (this.headers.size() 0) { -Enumeration enum = this.headers.keys(); +Enumeration enumHeaderKeys = this.headers.keys(); -while (enum.hasMoreElements()) +while (enumHeaderKeys.hasMoreElements()) { -String name = (String) enum.nextElement(); +String name = (String) enumHeaderKeys.nextElement(); String value = (String) headers.get(name); this.message.addHeader(name, value); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas - http://webservices.apache.org/~dims/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ATTRIBUTES] make it compile on JDK 1.5
fixed. -- dims On Wed, 26 Jan 2005 16:26:02 +0100, Stefan Bodewig [EMAIL PROTECTED] wrote: subject says it all. Some trivial enum replacements. Stefan Index: api/src/java/org/apache/commons/attributes/AttributeIndex.java === RCS file: /home/cvspublic/jakarta-commons/attributes/api/src/java/org/apache/commons/attributes/AttributeIndex.java,v retrieving revision 1.2 diff -u -r1.2 AttributeIndex.java --- api/src/java/org/apache/commons/attributes/AttributeIndex.java 27 Aug 2004 21:30:10 - 1.2 +++ api/src/java/org/apache/commons/attributes/AttributeIndex.java 26 Jan 2005 15:24:48 - @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -219,9 +219,9 @@ */ public AttributeIndex (ClassLoader cl) throws Exception { this.classLoader = cl; -Enumeration enum = cl.getResources (META-INF/attrs.index); -while (enum.hasMoreElements ()) { -URL url = (URL) enum.nextElement (); +Enumeration e = cl.getResources (META-INF/attrs.index); +while (e.hasMoreElements ()) { +URL url = (URL) e.nextElement (); loadFromURL (url); } Index: compiler/src/java/org/apache/commons/attributes/compiler/AttributeIndexer.java === RCS file: /home/cvspublic/jakarta-commons/attributes/compiler/src/java/org/apache/commons/attributes/compiler/AttributeIndexer.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 AttributeIndexer.java --- compiler/src/java/org/apache/commons/attributes/compiler/AttributeIndexer.java 6 Jul 2004 20:42:04 - 1.1.1.1 +++ compiler/src/java/org/apache/commons/attributes/compiler/AttributeIndexer.java 26 Jan 2005 15:24:48 - @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -150,9 +150,9 @@ File newJarFile = new File (jarFile.getPath () + .new); JarOutputStream output = new JarOutputStream (new FileOutputStream (newJarFile)); try { -Enumeration enum = jar.entries (); -while (enum.hasMoreElements ()) { -JarEntry entry = (JarEntry) enum.nextElement (); +Enumeration e = jar.entries (); +while (e.hasMoreElements ()) { +JarEntry entry = (JarEntry) e.nextElement (); if (!entry.isDirectory ()) { String className = entry.getName (); if (className.endsWith (SUFFIX)) { Index: compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java === RCS file: /home/cvspublic/jakarta-commons/attributes/compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 AttributeValidatorTask.java --- compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java 6 Jul 2004 20:42:09 - 1.1.1.1 +++ compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java 26 Jan 2005 15:24:49 - @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 The Apache Software Foundation + * Copyright 2003-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -143,9 +143,9 @@ JarFile jar = new JarFile (jarFile); try { -Enumeration enum = jar.entries (); -while (enum.hasMoreElements ()) { -JarEntry entry = (JarEntry) enum.nextElement (); +Enumeration e = jar.entries (); +while (e.hasMoreElements ()) { +JarEntry entry = (JarEntry) e.nextElement (); if (!entry.isDirectory ()) { String className = entry.getName (); if (className.endsWith (SUFFIX)) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas - http://webservices.apache.org/~dims/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
[MESSENGER] Make it compile with JDK 1.5
subject says it all. Some trivial enum replacements. Stefan Index: src/java/org/apache/commons/messagelet/BridgeMDO.java === RCS file: /home/cvspublic/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/BridgeMDO.java,v retrieving revision 1.7 diff -u -r1.7 BridgeMDO.java --- src/java/org/apache/commons/messagelet/BridgeMDO.java 4 Mar 2003 10:21:06 - 1.7 +++ src/java/org/apache/commons/messagelet/BridgeMDO.java 26 Jan 2005 15:54:44 - @@ -1,5 +1,5 @@ /* - * Copyright (C) The Apache Software Foundation. All rights reserved. + * Copyright (C) 2002-2005 The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in @@ -344,8 +344,8 @@ MapMessage answer = getOutputMessenger().createMapMessage(); // copy across all values -for ( Enumeration enum = inputMessage.getMapNames(); enum.hasMoreElements(); ) { -String name = (String) enum.nextElement(); +for ( Enumeration e = inputMessage.getMapNames(); e.hasMoreElements(); ) { +String name = (String) e.nextElement(); Object value = inputMessage.getObject( name ); answer.setObject( name, value ); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DISCOVERY] Make it compile on JDK 1.5
fixed. -- dims On Wed, 26 Jan 2005 16:38:41 +0100, Stefan Bodewig [EMAIL PROTECTED] wrote: subject says it all. Some trivial enum replacements. Stefan Index: src/java/org/apache/commons/discovery/resource/DiscoverResources.java === RCS file: /home/cvspublic/jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/DiscoverResources.java,v retrieving revision 1.4 diff -u -r1.4 DiscoverResources.java --- src/java/org/apache/commons/discovery/resource/DiscoverResources.java 27 Feb 2004 23:36:55 - 1.4 +++ src/java/org/apache/commons/discovery/resource/DiscoverResources.java 26 Jan 2005 15:38:07 - @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation + * Copyright 1999-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -108,9 +108,9 @@ if (log.isDebugEnabled()) log.debug(getNextResources: search using ClassLoader ' + loader + '); try { -Enumeration enum = JDKHooks.getJDKHooks().getResources(loader, resourceName); -if (enum != null enum.hasMoreElements()) { -return enum; +Enumeration e = JDKHooks.getJDKHooks().getResources(loader, resourceName); +if (e != null e.hasMoreElements()) { +return e; } } catch( IOException ex ) { log.warn(getNextResources: Ignoring Exception, ex); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas - http://webservices.apache.org/~dims/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource DiscoverResources.java
dims2005/01/26 07:56:31 Modified:discovery/src/java/org/apache/commons/discovery/resource DiscoverResources.java Log: trivial enum changes for jdk1.5 from Stefan Bodewig Revision ChangesPath 1.5 +3 -3 jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/DiscoverResources.java Index: DiscoverResources.java === RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/resource/DiscoverResources.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- DiscoverResources.java27 Feb 2004 23:36:55 - 1.4 +++ DiscoverResources.java26 Jan 2005 15:56:31 - 1.5 @@ -108,9 +108,9 @@ if (log.isDebugEnabled()) log.debug(getNextResources: search using ClassLoader ' + loader + '); try { -Enumeration enum = JDKHooks.getJDKHooks().getResources(loader, resourceName); -if (enum != null enum.hasMoreElements()) { -return enum; +Enumeration e = JDKHooks.getJDKHooks().getResources(loader, resourceName); +if (e != null e.hasMoreElements()) { +return e; } } catch( IOException ex ) { log.warn(getNextResources: Ignoring Exception, ex); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [MESSENGER] Make it compile with JDK 1.5
Messenger is dead I think, James moved the dev over to Codehaus and suggesting we consider removing Messenger has been on my todo list for a year or so :) Still, no reason not to fix the code, just mentioning it before another year passes. Hen On Wed, 26 Jan 2005 16:55:12 +0100, Stefan Bodewig [EMAIL PROTECTED] wrote: subject says it all. Some trivial enum replacements. Stefan Index: src/java/org/apache/commons/messagelet/BridgeMDO.java === RCS file: /home/cvspublic/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/BridgeMDO.java,v retrieving revision 1.7 diff -u -r1.7 BridgeMDO.java --- src/java/org/apache/commons/messagelet/BridgeMDO.java 4 Mar 2003 10:21:06 - 1.7 +++ src/java/org/apache/commons/messagelet/BridgeMDO.java 26 Jan 2005 15:54:44 - @@ -1,5 +1,5 @@ /* - * Copyright (C) The Apache Software Foundation. All rights reserved. + * Copyright (C) 2002-2005 The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in @@ -344,8 +344,8 @@ MapMessage answer = getOutputMessenger().createMapMessage(); // copy across all values -for ( Enumeration enum = inputMessage.getMapNames(); enum.hasMoreElements(); ) { -String name = (String) enum.nextElement(); +for ( Enumeration e = inputMessage.getMapNames(); e.hasMoreElements(); ) { +String name = (String) e.nextElement(); Object value = inputMessage.getObject( name ); answer.setObject( name, value ); } - 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: [MESSENGER] Make it compile with JDK 1.5
fixed. thanks, dims On Wed, 26 Jan 2005 16:55:12 +0100, Stefan Bodewig [EMAIL PROTECTED] wrote: subject says it all. Some trivial enum replacements. Stefan Index: src/java/org/apache/commons/messagelet/BridgeMDO.java === RCS file: /home/cvspublic/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/BridgeMDO.java,v retrieving revision 1.7 diff -u -r1.7 BridgeMDO.java --- src/java/org/apache/commons/messagelet/BridgeMDO.java 4 Mar 2003 10:21:06 - 1.7 +++ src/java/org/apache/commons/messagelet/BridgeMDO.java 26 Jan 2005 15:54:44 - @@ -1,5 +1,5 @@ /* - * Copyright (C) The Apache Software Foundation. All rights reserved. + * Copyright (C) 2002-2005 The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in @@ -344,8 +344,8 @@ MapMessage answer = getOutputMessenger().createMapMessage(); // copy across all values -for ( Enumeration enum = inputMessage.getMapNames(); enum.hasMoreElements(); ) { -String name = (String) enum.nextElement(); +for ( Enumeration e = inputMessage.getMapNames(); e.hasMoreElements(); ) { +String name = (String) e.nextElement(); Object value = inputMessage.getObject( name ); answer.setObject( name, value ); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas - http://webservices.apache.org/~dims/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet BridgeMDO.java
dims2005/01/26 08:45:30 Modified:messenger/src/java/org/apache/commons/messagelet BridgeMDO.java Log: trivial enum changes for jdk1.5 from Stefan Bodewig Revision ChangesPath 1.8 +4 -4 jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/BridgeMDO.java Index: BridgeMDO.java === RCS file: /home/cvs/jakarta-commons-sandbox/messenger/src/java/org/apache/commons/messagelet/BridgeMDO.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- BridgeMDO.java4 Mar 2003 10:21:06 - 1.7 +++ BridgeMDO.java26 Jan 2005 16:45:30 - 1.8 @@ -344,8 +344,8 @@ MapMessage answer = getOutputMessenger().createMapMessage(); // copy across all values -for ( Enumeration enum = inputMessage.getMapNames(); enum.hasMoreElements(); ) { -String name = (String) enum.nextElement(); +for ( Enumeration e = inputMessage.getMapNames(); e.hasMoreElements(); ) { +String name = (String) e.nextElement(); Object value = inputMessage.getObject( name ); answer.setObject( name, value ); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[pipeline] API documentation
Hi, all, I just noticed that the links to the API documentation are broken from the commons/sandbox/pipeline homepage. Is there someone out there who can fix this? Thanks, Kris -- = Kris Nuttycombe Associate Scientist Geospatial Data Services Group CIRES, National Geophysical Data Center/NOAA (303) 497-6337 [EMAIL PROTECTED] = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31457] - [dbcp] Transaction conflicts in Oracle will corrupt prepared statements in the dbcp pool.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=31457. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31457 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2005-01-26 20:02 --- The JDBC driver that was being used in the test (i.e., ojdbc14_g.jar version 10.1.0.2.0) is inappropriate for use wtih Oracle 9.2.0.1. The problem goes away when this driver is replaced by version 9.0.2.0.0. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [logging] Enterprise Common Logging... dare we say 2.0?
Well I've had a few days to cool off, and my head feels better too. I acknowledge that there are problems with the discovery process in JCL. We aim to fix that, it is one of the tenants of what is being proposed for JCL version 'next'. I wish it were as simple to resolve these issues in the more difficult environments [of which J2EE is a prime example], so the bottom line is that the UGLI solution doesn't *solve* the problems, it just doesn't complain as much... which admittedly might be considered a step forward depending on your point of view [silently operate in an unexpected manner vs. loudly proclaiming that a problem exists]. For JCL 'next' I'm looking for something of a middle ground that really solves the problems... all of them [alternate notes have/will discuss this]. I'm thrilled that Log4J mapped their interface to an independent interface. I'm sorry we couldn't coordinate that better between Log4J and JCL way back before JCL 1.0. What concerns me is that we have competing abstractions that are intended to be layered above interfaces. I also recognize the value of an interface not tied to Log4J, that we can grow forward and continue to layer above the implementations. So... let me toss out a not-so-random thought, and let's see how we all feel about this after some discussion: Can we bring these two together? Ceki, would your team be willing to make some concessions in the UGLI implementation, in the interest of supporting a common abstraction? Thoughts include: - Leaving JCL 1.0.x alone... and retiring it altogether in favor of an UGLI based approach. - Adopting the UGLI style interface as the base interface. - Layering in the JCL Log methods [support backwards compatibility] as deprecated methods where they differ from the UGLI interface? - We proposed a separate jar file per impl approach, in line with yours, to help minimize the JCL problems for JCL 'next'... so we're in sync with the fundamental advantages that offers - Adopting a more sophisticated discovery that allows the separate jar file per impl approach to work in a defined way for class hierarchies [such as J2EE] that might include multiple/different UGLI jar files [and yes, I'm talking about a *FIXED* process, not the current broken process]. - Log4J MUST be willing to accept extentions to UGLI [via interfaces that extend] that might go over and beyond the Log4J native supported methods [i.e., open to the types of discussions that are occuring now with JCL]. If I'm out of line here, set me straight.. but Ceki I still see Log4J as being under your thumb, and there are others in the community with valid differences of opinions that are looking for a voice. I'd like to point out that the JCL interface has been rigid, we've resisted change, and are only recently proposing any new change as extensions... I don't see this being a common occurance. dream on In short, can we merge these two in one fashion or another, and still accomplish our goals? dream off ras news [EMAIL PROTECTED] wrote on 01/25/2005 03:43:54 PM: I'm sorry, I didn't mean for my post to sound angry, and I'm sorry if anyone took offense. I was just asking :) Ceki, thanks for that link. You have many excellent points, and I may migrate my projects away from commons-logging. Matt Vic wrote: Matt Sgarlata wrote: You've spent a lot of time discussing commons-logging on this list, while at the same time supporting development of UGLI. Which component is your favorite? How come you're working on 2? Simmer down now. Lets act intelligent. Many people work on many things and share code across projects its a friendly license. Look at Struts, it has JSF subprojects under it, or lets play how many duplicate projects we can name under ASF. Its all good. Much duplication in Apache, all of it good. Choice = = good. What was that platform where they have the ONE true way? ..V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** Richard A. Sitze IBM WebSphere WebServices Development
DO NOT REPLY [Bug 33255] New: - [VFS] ftp file system depends on ORO for a MalformedPatternException
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=33255. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=33255 Summary: [VFS] ftp file system depends on ORO for a MalformedPatternException Product: Commons Version: 1.0 Beta 2 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Sandbox AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] The FTP file system throws a ClassNotFoundException because common-net seems to depend on jakarta-oro for FTP. java -cp .:target/commons-vfs-1.0-dev.jar:target/lib/commons-logging-1.0.4.jar:target/lib/commons-net-1.2.1.jar org.apache.commons.vfs.example.ShowProperties ftp://gnu.kookel.org/pub/apache/ant/ Exception in thread main java.lang.NoClassDefFoundError: org/apache/oro/text/r egex/MalformedPatternException at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createUnixFTPEntryParser(DefaultFTPFileEntryParserFactory.java:121) at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:84) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2306) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2055) at org.apache.commons.vfs.provider.ftp.FTPClientWrapper.listFiles(FTPCli entWrapper.java:100) at org.apache.commons.vfs.provider.ftp.FtpFileObject.doGetChildren(FtpFileObject.java:117) at org.apache.commons.vfs.provider.ftp.FtpFileObject.getChildFile(FtpFileObject.java:86) at org.apache.commons.vfs.provider.ftp.FtpFileObject.getInfo(FtpFileObject.java:162) at org.apache.commons.vfs.provider.ftp.FtpFileObject.doAttach(FtpFileObject.java:151) at org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1199) at org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:401) at org.apache.commons.vfs.example.ShowProperties.main(ShowProperties.jav -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[vfs] proposal: MemoryFS
I'm thinking of implementing a memory filesystem with VFS as a demonstration. The demo filesystems for local files and URLs are fine and good, but they are not very pedagogic for implementing virtual features. For example, they do not do much with attributes. A filesystem implementation which stored everything in memory would permit demonstration of the full range of features for VFS. I suppose there might be practical use as well as a scratch filesystem which does not use the disk (unlike tempfs). One might also provide layering ala BSD's union filesystem so that one could rollback changes just by removing the most recent layer (I believe this is how ClearCase works, IIRC). And it would be fun. :-) Cheers, --binkley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 33256] New: - [VFS] SoftRefFilesCache does not work
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=33256. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=33256 Summary: [VFS] SoftRefFilesCache does not work Product: Commons Version: 1.0 Beta 2 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Sandbox AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] The SoftRefFilesCache does not work. It's not it's fault ;-) but it goes more about the principal that garbage collection happens every 2 or 3 seconds and that it removes some of the files in the cache and this produce an inconsistent cache. This is particulary true when listing the content of a zip/jar file, the first read seems ok then some files disappear until eventually the directory get empty :-(. I know about the small article about soft reference in cache wrote in Javalobby ;-) but I disagree with it and this prove that caching using soft reference does not work for caching. Please change the DefaultFileSystem to use the DefaultFilesCache, I did it, now it works much better. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [logging] Enterprise Common Logging... dare we say 2.0?
Richard Sitze wrote: Can we bring these two together? Ceki, would your team be willing to make some concessions in the UGLI implementation, in the interest of supporting a common abstraction? Thoughts include: - Leaving JCL 1.0.x alone... and retiring it altogether in favor of an UGLI based approach. - Adopting the UGLI style interface as the base interface. Hey, that sounds good to me as a user. Even cross merging teams? .V -- Forums, Boards, Blogs and News in RiA http://www.boardVU.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jelly] Jline 0.9.0 now on ibiblio
FYI for interaction patch. I'll apply the patch later unless someone beats me to it. - Brett - Forwarded message from [EMAIL PROTECTED] [EMAIL PROTECTED] - Date: Wed, 26 Jan 2005 17:04:20 -0500 (EST) From: [EMAIL PROTECTED] [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] [EMAIL PROTECTED] Subject: [jira] Closed: (MAVENUPLOAD-294) Jline 0.9.0 To: [EMAIL PROTECTED] [EMAIL PROTECTED] Issue (View Online) Key: MAVENUPLOAD-294 Type: Task Status: Closed Resolution: Fixed Assignee: Carlos Sanchez Reporter: Brett Porter Operations View all View comments View change history Jline 0.9.0 Updated: Wed, 26 Jan 2005 5:03 PM Created: Mon, 24 Jan 2005 7:15 AM The following issue has been closed. Project: maven-upload-requests Description JLine is a console interface with command history, completion, etc. This message was automatically generated by Atlassian JIRA Enterprise Edition, Version: 2.6.1-#65 - Bug/feature request If you think it was sent incorrectly contact one of this server's administrators. - End forwarded message - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [lang] new token for FastDateFormat
Damn. I'd thought that this class would be new in 2.1. That's a pain. Given that a formatting pattern is a String, I'm sure you can see many reasons why solutions that involve coding bits of Java are bad :) Hen On Tue, 25 Jan 2005 08:06:46 +0800, Brett Porter [EMAIL PROTECTED] wrote: Last time I checked, Long.toString(date.getTime()) did that anyway, and in less characters :) Cheers, Brett Quoting Stephen Colebourne [EMAIL PROTECTED]: Adding any token would be a backwards incompatible change, as it would previously have been output as text. Why not just have a DateUtils.getMillisAsText(Date) method? (Well maybe because it seems like a very odd case.) Stephen - Original Message - From: Henri Yandell [EMAIL PROTECTED] I just noticed that there's no way to output the milliseconds since 1970 with SimpleDateFormat (or with FastDateFormat). Any interest in having a token for FastDateFormat that lets you do that? Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Logging/1.0.5ReleasePlan
Date: 2005-01-26T14:32:43 Editor: 82.38.65.173 Wiki: Jakarta Commons Wiki Page: Logging/1.0.5ReleasePlan URL: http://wiki.apache.org/jakarta-commons/Logging/1.0.5ReleasePlan Updated release plan Change Log: -- @@ -6,7 +6,7 @@ == Status == -DRAFT RELEASE PLAN UNDER DEVELOPMENT +RELEASE PLAN is waiting on conversion of repository to subversion @@ -22,13 +22,21 @@ == Bug Review == * Bug 28291 ''[logging] Context``Class``Loader may load Log impl from wrong context in JDK 1.4''. This one's about classloading and should not be handled in 1.0.5. + * +1 Any solution I had, I've now forgotten... * Bug 30131 ''[logging] Getting Logger to give trace Information''. I made a comment on this one back in July with some suggestions to try for the reporter. No reply was made on those suggestions. I propose we close this one. + * This looks very similar to #30632. Wonder whether there's a bad bit of example code somewhere... * Bug 30268 ''[logging] Add CLDC support''. Involves major changes - move to 1.1. + * +1 Hope that this might be fixable with proposed discovery code * Bug 30632 ''[logging] print/display the wire log!'' Related to using commons-logging in httpclient. Might be a documentation issue. + * Looks more like a plea for help than a bug. See if the documentation can be improved * Bug 31286 ''[logging] Memory leaks in JBoss due to Log``Factory cache''. Almost done. Requires some documentation according to the comments. + * This will be taken care of by the pre-release work * Bug 32618 ''[logging] Enterprise Commons Logging : Globalization more''. The new proposal by IBM. Will not be done in this release. + * +1 * Bug 32662 ''[logging] Log writer not closed with log4j after restarting a webapp (Tomcat 5.0)''. A modified version of org.apache.commons.logging.impl.Log4j``Factory.java is attached. + * Probably worth investigating and fixing (if possible) for this release * Bug 32691 ''[logging] Convenience methods for cleaner application code''. Involves API changes. Will have to wait for a later release. + * +1 (may want to rolled these ideas into the current discussions) == Bug Fix == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[lang] new method on ClassUtils
I'd like to add ClassUtils.forName; to all intents and purposes the same as Class.forName except that: 1) It understands arrays ending with [] instead of the [Lclass; ugliness. 2) It can handle primitives, int would correctly return int.class. 3) (perhaps?) null-safe. No idea really, just throwing it in :) Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[logging] 1.0.5 release plan
the consensus seems to be that a 1.0.5 release is a good thing and that people are happy with me acting as release manager. the release plan can be found here: http://wiki.apache.org/jakarta-commons/Logging/1_2e0_2e5ReleasePlan it's good to see that people have already started work (thanks denis :) please feel free to dive in! comments are especially useful for the bugs parade. it'd probably be best for folks to attached their comments in a sub-list below each one. i'll prepare an proposal containing the analysis for the list a little later. i propose to start work on this release pretty much as soon as the repository has been converted to subversion. i'll add replies to this thread to keep people up to date... - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jelly/jelly-tags/swing/src/java/org/apache/commons/jelly/tags/swing TrTag.java
polx2005/01/26 14:43:57 Modified: jelly/jelly-tags/swing/src/java/org/apache/commons/jelly/tags/swing TrTag.java Log: Cells are of size 1 now unless indicated. paul Revision ChangesPath 1.10 +3 -1 jakarta-commons/jelly/jelly-tags/swing/src/java/org/apache/commons/jelly/tags/swing/TrTag.java Index: TrTag.java === RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/java/org/apache/commons/jelly/tags/swing/TrTag.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- TrTag.java9 Sep 2004 12:16:57 - 1.9 +++ TrTag.java26 Jan 2005 22:43:57 - 1.10 @@ -69,6 +69,7 @@ invokeBody(output); // now iterate through the rows and add each one to the layout... +int colIndex = 0; for (Iterator iter = cells.iterator(); iter.hasNext(); ) { Cell cell = (Cell) iter.next(); GridBagConstraints c = cell.getConstraints(); @@ -76,7 +77,8 @@ // are we the last cell in the row if ( iter.hasNext() ) { // not last in row -c.gridwidth = GridBagConstraints.RELATIVE; +c.gridwidth = 1; +c.gridx = colIndex++; } else { // end of row - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jelly/jelly-tags/swing/src/java/org/apache/commons/jelly/tags/swing ComponentTag.java
polx2005/01/26 14:46:28 Modified: jelly/jelly-tags/swing/src/java/org/apache/commons/jelly/tags/swing ComponentTag.java Log: First stab at rerunnable tags. Using panel tagName=myTagDO SOMETHING${x}/panel One can invoke, later, e.g. in an action-tag, ${myTag.rerun()} which should repopulate the panel by removing first then re-running the body ot this tag. paul Revision ChangesPath 1.24 +49 -1 jakarta-commons/jelly/jelly-tags/swing/src/java/org/apache/commons/jelly/tags/swing/ComponentTag.java Index: ComponentTag.java === RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/java/org/apache/commons/jelly/tags/swing/ComponentTag.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- ComponentTag.java 12 Jan 2005 08:59:16 - 1.23 +++ ComponentTag.java 26 Jan 2005 22:46:28 - 1.24 @@ -168,6 +168,40 @@ } } } + + + private String tagName = null; + + private XMLOutput currentOutput = null; + + /** Puts this tag into the context under the given name + * allowing later calls to [EMAIL PROTECTED] #rerun()}. + * For example, it makes sense to use ${myTag.rerun()} as a child + * of an codeaction/code element. + * + * @param the name to be used + */ + public void setTagName(String name) { + this.tagName = name; + } + + /** Runs the body of this script again after clearing the content + * of this component. + * This is useful to use jelly-logic and re-populate a part of the user-interface + * after having updated a model part (e.g. an XML-document). + * @throws JellyTagException if anything + */ + public void rerun() throws JellyTagException { + Component comp = getComponent(); + if(comp instanceof java.awt.Container) { + ((java.awt.Container) comp).removeAll(); + } + this.doTag(currentOutput,false); + if ( comp instanceof javax.swing.JComponent ) { + ((javax.swing.JComponent) comp).revalidate(); + } + } + /** * Adds a WindowListener to this component @@ -290,6 +324,14 @@ * A class may be specified otherwise the Factory will be used. */ protected Object newInstance(Class theClass, Map attributes, XMLOutput output) throws JellyTagException { + if (attributes.containsKey(tagName)) { + this.setTagName((String)attributes.get(tagName)); + addIgnoreProperty(tagName); + } + if(tagName!=null) { + context.setVariable(tagName,this); + currentOutput = output; + } try { if (theClass != null ) { return theClass.newInstance(); @@ -363,6 +405,7 @@ component.setSize(d); addIgnoreProperty(size); } + if (attributes.containsKey(debugGraphicsOptions)) { try { @@ -398,8 +441,13 @@ * @see org.apache.commons.jelly.Tag#doTag(org.apache.commons.jelly.XMLOutput) */ public void doTag(XMLOutput output) throws JellyTagException { +this.doTag(output,true); +} + +public void doTag(XMLOutput output, boolean resetBean) throws JellyTagException { +if(resetBean) clearBean(); super.doTag(output); -clearBean(); +//clearBean(); } /** Sets the bean to null, to prevent it from - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[LANG] StringUtil reverseSplit
I noticed this method on the task list, so I've started implementing it. I have a few questions: 1. Should it allow for nulls as the input string? 2. Is null a permissible delimiter? 3. If the string is mary had a little lamb and reverseSplit is applied to it: a. if reverse is applied first, we get back bmal elttil a dah yram, splitting this using as the delimiter, the first String of the resulting array is bmal b. If split is applied first, {mary, had, a, little, lamb}, and reverse yields lamb Is 3a or 3b the correct behaviour? Thanks in advance for the help! -- Cheers, Hasan Diwan [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly/util CommandLineParser.java
dion2005/01/26 15:57:42 Modified:jelly/src/java/org/apache/commons/jelly/util CommandLineParser.java Log: Remove unused code Revision ChangesPath 1.11 +1 -2 jakarta-commons/jelly/src/java/org/apache/commons/jelly/util/CommandLineParser.java Index: CommandLineParser.java === RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/util/CommandLineParser.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- CommandLineParser.java24 Jan 2005 00:34:06 - 1.10 +++ CommandLineParser.java26 Jan 2005 23:57:42 - 1.11 @@ -25,7 +25,6 @@ import java.util.Properties; import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.GnuParser; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.commons.cli.Parser; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [all][VOTE][Results] commons svn migration
On Tue, 25 Jan 2005 23:03:04 -0500, Tim O'Brien [EMAIL PROTECTED] wrote: More than 72 hours have passed for this vote, I think everyone has had ample opportunity to weigh in. Is CVS going away permanently? Or will it be running concurrently with Subversion? -- Cheers, Hasan Diwan [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] proposal: MemoryFS
It may be useful for testing also. B. K. Oxley (binkley) wrote: I'm thinking of implementing a memory filesystem with VFS as a demonstration. The demo filesystems for local files and URLs are fine and good, but they are not very pedagogic for implementing virtual features. For example, they do not do much with attributes. A filesystem implementation which stored everything in memory would permit demonstration of the full range of features for VFS. I suppose there might be practical use as well as a scratch filesystem which does not use the disk (unlike tempfs). One might also provide layering ala BSD's union filesystem so that one could rollback changes just by removing the most recent layer (I believe this is how ClearCase works, IIRC). And it would be fun. :-) Cheers, --binkley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- = Jeffrey D. Brekke [EMAIL PROTECTED] Wisconsin, USA [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [all][VOTE][Results] commons svn migration
It'll be there, but read-only. Obviously it will not keep up to date however. - Brett Quoting Hasan Diwan [EMAIL PROTECTED]: On Tue, 25 Jan 2005 23:03:04 -0500, Tim O'Brien [EMAIL PROTECTED] wrote: More than 72 hours have passed for this vote, I think everyone has had ample opportunity to weigh in. Is CVS going away permanently? Or will it be running concurrently with Subversion? -- Cheers, Hasan Diwan [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 33259] New: - Patch for xml:set to set var to string list or delimited string
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=33259. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=33259 Summary: Patch for xml:set to set var to string list or delimited string Product: Commons Version: Nightly Builds Platform: Other OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: Jelly AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] The patch below enhances the xml:set tag so that it can set its variable (1) to a list of strings and (2) to a single string with result node string delimited by a given string. Michael Index: src/java/org/apache/commons/jelly/tags/xml/SetTag.java === RCS file: /home/cvspublic/jakarta-commons/jelly/jelly-tags/xml/src/java/org/apache/commons/jelly/tags/xml/SetTag.java,v retrieving revision 1.12 diff -u -r1.12 SetTag.java --- src/java/org/apache/commons/jelly/tags/xml/SetTag.java 17 Jan 2005 22:09:28 - 1.12 +++ src/java/org/apache/commons/jelly/tags/xml/SetTag.java 27 Jan 2005 01:10:08 - @@ -30,6 +30,7 @@ import org.jaxen.JaxenException; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import java.util.Collections; @@ -44,6 +45,12 @@ */ public class SetTag extends XPathTagSupport { +private static final int RETURN_NODE_LIST = 0; +private static final int RETURN_FIRST_NODE = 1; +private static final int RETURN_STRING_LIST = 2; +private static final int RETURN_DELIMITED_STRING_LIST = 3; +private static final int RETURN_FIRST_AS_STRING = 4; + /** The Log to which logging calls will be made. */ private Log log = LogFactory.getLog(SetTag.class); @@ -60,6 +67,8 @@ private Boolean asString = null; +private String delim = null; + public SetTag() { } @@ -86,36 +95,30 @@ catch (JaxenException e) { throw new JellyTagException(e); } - + if (value instanceof List) { // sort the list if xpCmp is set. if (xpCmp != null (xpCmp.getXpath() != null)) { Collections.sort((List)value, xpCmp); } } -if (single!=null) { -if (single.booleanValue()==true) { -if(value instanceof List) { -List l = (List) value; -if (l.size()==0) -value=null; -else -value=l.get(0); -} -if(asString!=null asString.booleanValue() value instanceof Node) -value = ((Node) value).getStringValue(); -} else { // single == false -if(! (value instanceof List) ) { -List l = null; -if (value==null) { -l = new ArrayList(0); -} else { -l = new ArrayList(1); -l.add(value); -} -value = l; -} -} + +switch ( determineReturnType() ) { +case RETURN_NODE_LIST: +value = valueAsList(value); +break; +case RETURN_FIRST_NODE: +value = valueAsSingle(value); +break; +case RETURN_STRING_LIST: +value = nodeListToStringList(valueAsList(value)); +break; +case RETURN_DELIMITED_STRING_LIST: +value = joinDelimitedElements(nodeListToStringList(valueAsList(value))); +break; +case RETURN_FIRST_AS_STRING: +value = singleValueAsString(valueAsSingle(value)); +break; } //log.info( Evaluated xpath: + select + as: + value + of type: + value.getClass().getName() ); @@ -123,6 +126,84 @@ context.setVariable(var, value); } +private List valueAsList( final Object value ) { +if (value instanceof List) { +return (List)value; +} else { +if (value == null) { +return Collections.EMPTY_LIST; +} else { +return Collections.singletonList(value); +} +} +} + +private Object valueAsSingle( final Object value ) { +if (value instanceof List) { +List l = (List) value; +if (l.isEmpty()) +return null; +else +return l.get(0); +} else { +return value; +
DO NOT REPLY [Bug 33259] - Patch for xml:set to set var to string list or delimited string
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=33259. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=33259 --- Additional Comments From [EMAIL PROTECTED] 2005-01-27 02:29 --- Created an attachment (id=14110) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14110action=view) Patch for SetTag.java and suite.jelly Grrr, why doesn't Bugzilla tell me from the start that I can attach a file later on? So, here's the patch with intact lines. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [LANG] StringUtil reverseSplit
It's really on the task list? :) Hadn't noticed it. Which task list? Not sure what it's meant to be. Either seems quite easy as they'd either be: ArrayUtils.reverse(StringUtils.split(string,string)) or StringUtils.split( StringUtils.reverse(string), string)) The latter might be slightly off and instead need a loop, not sure how well the delimiters would work. The former seems the only one with an obvious use-case (reversing a DNS name/IP address), and it'd only be replacing two method calls with one, so seems overkill. Sorry for the negative reply, Hen On Wed, 26 Jan 2005 15:47:55 -0800, Hasan Diwan [EMAIL PROTECTED] wrote: I noticed this method on the task list, so I've started implementing it. I have a few questions: 1. Should it allow for nulls as the input string? 2. Is null a permissible delimiter? 3. If the string is mary had a little lamb and reverseSplit is applied to it: a. if reverse is applied first, we get back bmal elttil a dah yram, splitting this using as the delimiter, the first String of the resulting array is bmal b. If split is applied first, {mary, had, a, little, lamb}, and reverse yields lamb Is 3a or 3b the correct behaviour? Thanks in advance for the help! -- Cheers, Hasan Diwan [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [all][VOTE][Results] commons svn migration
Not sure how long it stays either. The jakarta-regexp one vanished almost immediately, which I wasn't expecting. I'll find out. Hen On Thu, 27 Jan 2005 08:11:55 +0800, Brett Porter [EMAIL PROTECTED] wrote: It'll be there, but read-only. Obviously it will not keep up to date however. - Brett Quoting Hasan Diwan [EMAIL PROTECTED]: On Tue, 25 Jan 2005 23:03:04 -0500, Tim O'Brien [EMAIL PROTECTED] wrote: More than 72 hours have passed for this vote, I think everyone has had ample opportunity to weigh in. Is CVS going away permanently? Or will it be running concurrently with Subversion? -- Cheers, Hasan Diwan [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [all][VOTE][Results] commons svn migration
Not sure how long [CVS] stays either. The CVS repositories stick around for Committers, but are generally removed from public view to prevent confusion. --- Noel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] proposal: MemoryFS
I can definitely see this being useful for unit-tests. I was working on some code a while ago that manipulated files, and found it very hard to write unit tests, particularly ones that could be run cross-platform. Having an in-memory filesystem available for unit tests to store files on would have been great.. On Wed, 2005-01-26 at 18:07 -0600, Jeffrey D. Brekke wrote: It may be useful for testing also. B. K. Oxley (binkley) wrote: I'm thinking of implementing a memory filesystem with VFS as a demonstration. The demo filesystems for local files and URLs are fine and good, but they are not very pedagogic for implementing virtual features. For example, they do not do much with attributes. A filesystem implementation which stored everything in memory would permit demonstration of the full range of features for VFS. I suppose there might be practical use as well as a scratch filesystem which does not use the disk (unlike tempfs). One might also provide layering ala BSD's union filesystem so that one could rollback changes just by removing the most recent layer (I believe this is how ClearCase works, IIRC). And it would be fun. :-) Cheers, --binkley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [all][VOTE][Results] commons svn migration
Henri Yandell wrote: On Tue, 25 Jan 2005 23:03:04 -0500, Tim O'Brien [EMAIL PROTECTED] wrote: More than 72 hours have passed for this vote, I think everyone has had ample opportunity to weigh in. We need to do this when Justin is free, and that happens to be Thursday morning or afternoon. Most other conversions are simple one shot conversions, but commons is really more of a series of conversions - each component is converted separately, combined, and then dumped to a dump which we can then import into the ASF repository. It takes 3-4 hours, so when I confirm with Justin, I'll send a note to commons-dev with the time we'll lock the CVS repository. I'll make sure I lurk on the #asfinfra channel on Thursday in case you need any help testing etc. Henri, what, if anything, do we need to do to migrate karma? Check with Justin, but they usually handle karma. It's pretty much a cut and paste from avail to the svn authorization, and then they comment out the line in avail. If you can't commit after the migration, it means an update script needs to be run as they've not got it hooked up yet so that a change to the svn auth file goes live when it's committed. Committers who have not used ASF svn yet will have to run svnpasswd to get set up, right? Phil Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [all][VOTE][Results] commons svn migration
I say that if it's to die, let's not have it sitting around rotting. Who wants CVS is it's not up to date? Hans -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2005 8:41 PM To: Jakarta Commons Developers List Subject: Re: [all][VOTE][Results] commons svn migration Not sure how long it stays either. The jakarta-regexp one vanished almost immediately, which I wasn't expecting. I'll find out. Hen On Thu, 27 Jan 2005 08:11:55 +0800, Brett Porter [EMAIL PROTECTED] wrote: It'll be there, but read-only. Obviously it will not keep up to date however. - Brett Quoting Hasan Diwan [EMAIL PROTECTED]: On Tue, 25 Jan 2005 23:03:04 -0500, Tim O'Brien [EMAIL PROTECTED] wrote: More than 72 hours have passed for this vote, I think everyone has had ample opportunity to weigh in. Is CVS going away permanently? Or will it be running concurrently with Subversion? -- Cheers, Hasan Diwan [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly JellyContext.java
hgilde 2005/01/26 21:52:27 Modified:jelly/src/java/org/apache/commons/jelly JellyContext.java Log: fix memory leak related to ThreadLocal managing memory in a way that doesn't jive with Jelly's usage Revision ChangesPath 1.66 +15 -8 jakarta-commons/jelly/src/java/org/apache/commons/jelly/JellyContext.java Index: JellyContext.java === RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/JellyContext.java,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- JellyContext.java 20 Jan 2005 05:18:27 - 1.65 +++ JellyContext.java 27 Jan 2005 05:52:27 - 1.66 @@ -20,10 +20,12 @@ import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; +import java.util.Collections; import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; import java.util.Map; +import java.util.WeakHashMap; import org.apache.commons.jelly.parser.XMLParser; import org.apache.commons.jelly.util.ClassLoaderUtils; @@ -90,11 +92,15 @@ /** Should we export tag libraries to our parents context */ private boolean exportLibraries = true; -/** Holds a Map containing thread-specific data for Scripts. - * Scripts may hold a single object in this map using the +/** Maps a Thread to its local Script data cache. It's + * like a ThreadLocal, but it reclaims memory better + * when the JellyCointext goes out of scope. + * This isn't a ThreadLocal because of the typical usage scenario of + * JellyContext. ThreadLocal is meant to be sued as a static variable, + * we were using it as a local variable. * [EMAIL PROTECTED] #setThreadLocalScriptData(Script,Object)} */ -private ThreadLocal threadLocalScriptData = new ThreadLocal(); +private Map threadLocalScriptData = Collections.synchronizedMap(new WeakHashMap()); // THINKME: Script objects are like Object (for equals and hashCode) I think. // It should be asy to optimize hash-map distribution, e.g. by // shifting the hashcode return value (presuming Object.hashcode() @@ -406,10 +412,11 @@ * @return the thread local Map of Script data */ public Map getThreadScriptDataMap() { Map rv; -Map data = (Map) threadLocalScriptData.get(); +Thread t = Thread.currentThread(); +Map data = (Map) threadLocalScriptData.get(t); if (data == null) { rv = new HashMap(); -threadLocalScriptData.set(rv); +threadLocalScriptData.put(t, rv); } else { rv = data; } @@ -433,8 +440,8 @@ * @see #clearScriptData() */ public void clear() { -getThreadScriptDataMap().clear(); -variables.clear(); +clearScriptData(); +clearVariables(); } /** Clears variables set by Tags (variables set while running a Jelly script) @@ -467,7 +474,7 @@ * @see #clearVariables() */ public void clearScriptData() { -threadLocalScriptData = new ThreadLocal(); +threadLocalScriptData.clear(); } /** Registers the given tag library against the given namespace URI. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [jelly] Maven JSL memory leak and Jelly
It was just a little issue, it should be fixed now. -Original Message- From: Brett Porter [mailto:[EMAIL PROTECTED] Sent: Monday, January 24, 2005 10:09 PM To: Jakarta Commons Developers List Subject: RE: [jelly] Maven JSL memory leak and Jelly Thanks Hans! That's what I was thinking of doing, so I'm glad you've got it under control. When I was testing, the size of the included JSL affected the amount of memory leaked, so I guess it is tag caching again? I tried a context.clear[Thread]ScriptData after the execution of runScript in include, but that didn't help. Unfortunately that's all I had time for this morning before work. Good luck... Cheers, Brett Quoting Hans Gilde [EMAIL PROTECTED]: I just added a super-simple test case for the include tag to the core test suite. Include is a special kind of tag, so hopefully it's the only one leaking. Once we fix this problem, a retest will definitely be in order. -Original Message- From: Brett Porter [mailto:[EMAIL PROTECTED] Sent: Monday, January 24, 2005 9:47 PM To: Jakarta Commons Developers List Subject: RE: [jelly] Maven JSL memory leak and Jelly Yup. AFAICT, it's been there since it's creation. Do you need some additional info from me? I'm happy to try to make a smaller test case and/or test with Maven later if required. - Brett Quoting Hans Gilde [EMAIL PROTECTED]: There's definitely a leak in the include tag. Brett, I'm guessing that this leak also exists pre-RC2, right? -Original Message- From: Brett Porter [mailto:[EMAIL PROTECTED] Sent: Monday, January 24, 2005 7:30 AM To: Jakarta Commons Developers List Subject: Re: [jelly] Maven JSL memory leak and Jelly Paul Libbrecht wrote: Ideally, a test-case would be awesome, even if it refers to some far-away stylesheet... I'll try and narrow it down first by cutting down site.jsl to the minimum that leaks. Can you try calling .clear() on the result of this context.runScript(uri, output, isExport(), isInherit()) (and the other call). so try with context.clear() inside IncludeTag? Ok, will try tomorrow. Maybe that'll help. In all cases, this context is gc-ed shortly after, I believe... so I see no reasons for big leaks at the tag-cache level. It leaks 200k every time site.jsl is run, so should be easy to find, right? :) Also, maybe it would help to give more details where to go... I think this was reported about very long ago so maybe a distribution maven-1.0.2 or such should have this bug ? easiest to run it against Maven's trunk really as it is compatible with Jelly RC2 (RC1 was broken, so it currently uses beta-4 until RC2 is released). RC2 won't work with Maven 1.0.x. If you want to give it a go: - check out Maven from SVN and build: svn co http://svn.apache.org/repos/asf/maven/maven-1/core/trunk maven-1/core/trunk svn co http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk maven-1/plugins/trunk - build maven inside maven-1/core/trunk (see http://www.apache.org/~brett/maven-stage-site/developers/building-from-sourc e.html, make sure you reassign a new MAVEN_HOME!) - run maven xdoc and watch memory go... - twiddle xdoc plugin and run maven plugin:install to test. Use the memory tag lib I just added to jelly to test. memory:gc/ and memory:showFree /. Hopefully I'll have more information tomorrow, I'm going to bed now. I'm keen to kill this before Jelly 1.0 if possible. Thanks, Brett - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
[jira] Commented: (JELLY-199) Leak in IncludeTag or JellyContext.runScript
[ http://issues.apache.org/jira/browse/JELLY-199?page=comments#action_58142 ] Hans Gilde commented on JELLY-199: -- Fixed! Leak in IncludeTag or JellyContext.runScript Key: JELLY-199 URL: http://issues.apache.org/jira/browse/JELLY-199 Project: jelly Type: Bug Components: core / taglib.core Versions: 1.0-RC1 Reporter: Hans Gilde Priority: Critical Now that the new tag caching has solved some problems, we have a leak in the IncludeTag. This leak probably comes from some interaction between JellyContext.runScript an the tag cache. I marked this one critical because it's (hopefully) the last leak affecting Maven. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/feedparser/xdocs index.xml
burton 2005/01/26 22:07:32 Modified:feedparser/xdocs index.xml Log: document the formats we support... Revision ChangesPath 1.4 +45 -4 jakarta-commons-sandbox/feedparser/xdocs/index.xml Index: index.xml === RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/xdocs/index.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- index.xml 5 Sep 2004 22:06:38 - 1.3 +++ index.xml 27 Jan 2005 06:07:32 - 1.4 @@ -54,10 +54,6 @@ /li li -Outline Parser Markup Language (OPML) -/li - -li An HTML link parser for finding all links in an HTML source file and expanding them to become full /li @@ -66,6 +62,51 @@ /section +section name=Supported Feed Formats + +p +Jakarta FeedParser supports the following syndication formats: +/p + +dl + +dtRSS 1.0/dt + +dtRSS 0.9/dt +dtRSS 0.91/dt +dtRSS 0.92/dt +dtRSS 2.0/dt +dtAtom 0.3/dt +dtAtom 0.4/dt +dtOPML/dt +dtFOAF/dt +dtChanges.xml/dt +dtXFN/dt + +/dl + +p +In addition the following module supports is available: +/p + +dl + +dtDublin Core (mod_dc)/dt + +dtmod_content/dt + +dtmod_aggregation/dt + +dtmod_dcterms/dt + +dtxhtml:body/dt + +ddProvided for XHTML RSS bodies/dd + +/dl + +/section + section name=Example p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/feedparser/xdocs index.xml
burton 2005/01/26 22:08:24 Modified:feedparser/xdocs index.xml Log: document the formats we support... Revision ChangesPath 1.5 +7 -1 jakarta-commons-sandbox/feedparser/xdocs/index.xml Index: index.xml === RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/xdocs/index.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- index.xml 27 Jan 2005 06:07:32 - 1.4 +++ index.xml 27 Jan 2005 06:08:24 - 1.5 @@ -102,7 +102,13 @@ dtxhtml:body/dt ddProvided for XHTML RSS bodies/dd - + +dtmod_taxonomy/dt + +dd +Helps enables tags within RSS feeds +/dd + /dl /section - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/feedparser/xdocs index.xml
burton 2005/01/26 22:14:28 Modified:feedparser/xdocs index.xml Log: more docx... Revision ChangesPath 1.6 +24 -0 jakarta-commons-sandbox/feedparser/xdocs/index.xml Index: index.xml === RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/xdocs/index.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- index.xml 27 Jan 2005 06:08:24 - 1.5 +++ index.xml 27 Jan 2005 06:14:28 - 1.6 @@ -62,6 +62,30 @@ /section +section name=Feed Location + +p +The qlocate/q package provides an API for determing all +valid feeds for a given weblog URL. We also attempt to profile +popular blogging services including Moveable Type, Blogger, +Xanga, etc. Some of these services have subtle incorrect +behavior and we can correct these to return feeds for sites that +would otherwise fail. +/p + +/section + +section name=Liberal Parsing + +p +We support so called qliberal/q parsing to accept feeds +which while strongnot/strong valid XML would parse with just +a few modifications. These include subtle modifications to text +before the XML declaration, entity decoding, etc. +/p + +/section + section name=Supported Feed Formats p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jelly] a memory leak fix without a tag cache
Heres a patch for HEAD with a thread-safe cache thats got no JellyContext tag cache, no memory leak and no dumb WeakReferences. And it even passes the unit tests. Its so simple that it was invisible; its less than 10 lines of change from the pre-RC1 TagScript. Sigh. Anyway, I didnt want to commit it because we already have consensus on the tag cache. Could everyone test with this one too? If it works, Ill commit it. Hans Index: src/java/org/apache/commons/jelly/JellyContext.java === RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/JellyContext.java,v retrieving revision 1.66 diff -u -r1.66 JellyContext.java --- src/java/org/apache/commons/jelly/JellyContext.java 27 Jan 2005 05:52:27 - 1.66 +++ src/java/org/apache/commons/jelly/JellyContext.java 27 Jan 2005 06:11:11 - @@ -92,20 +92,6 @@ /** Should we export tag libraries to our parents context */ private boolean exportLibraries = true; -/** Maps a Thread to its local Script data cache. It's - * like a ThreadLocal, but it reclaims memory better - * when the JellyCointext goes out of scope. - * This isn't a ThreadLocal because of the typical usage scenario of - * JellyContext. ThreadLocal is meant to be sued as a static variable, - * we were using it as a local variable. - * [EMAIL PROTECTED] #setThreadLocalScriptData(Script,Object)} - */ -private Map threadLocalScriptData = Collections.synchronizedMap(new WeakHashMap()); -// THINKME: Script objects are like Object (for equals and hashCode) I think. -// It should be asy to optimize hash-map distribution, e.g. by -// shifting the hashcode return value (presuming Object.hashcode() -// is something like an address) - /** * Create a new context with the currentURL set to the rootURL */ @@ -390,93 +376,20 @@ return createChildContext(); } - -/** Gets the Script data item that may have previously been stored - * by the script, in this context, for the current thread. - * - * @return the tag associated with the current context and thread - */ -public Object getThreadScriptData(Script script) { -if( script == null ) -return null; -Tag tag = (Tag) getThreadScriptDataMap().get(script); - if( tag == null getParent() != null) { - return getParent().getThreadScriptData(script); - } else { - return tag; - } -} - - /** Gets a per-thread (thread local) Map of data for use by - * Scripts. - * @return the thread local Map of Script data */ - public Map getThreadScriptDataMap() { -Map rv; -Thread t = Thread.currentThread(); -Map data = (Map) threadLocalScriptData.get(t); -if (data == null) { -rv = new HashMap(); -threadLocalScriptData.put(t, rv); -} else { -rv = data; -} - return rv; - } - -/** Stores an object that lasts for the life of this context - * and is local to the current thread. This method is - * mainly intended to store Tag instances. However, any - * Script that wants to cache data can use this - * method. - */ -public void setThreadScriptData(Script script, Object data) { -getThreadScriptDataMap().put(script,data); -} - -/** Clears variables set by Tags (basically, variables set in a Jelly script) - * and data stored by [EMAIL PROTECTED] Script} instances. +/** Clears variables set by Tags. * @see #clearVariables() - * @see #clearThreadScriptData() - * @see #clearScriptData() */ public void clear() { -clearScriptData(); clearVariables(); } /** Clears variables set by Tags (variables set while running a Jelly script) * @see #clear() - * @see #clearThreadScriptData() - * @see #clearScriptData() */ -public void clearVariables() { +protected void clearVariables() { variables.clear(); } -/** Clears data cached by [EMAIL PROTECTED] Script} instances, - * for this context, strongfor the current thread/strong. - * The data cleared could be cached Tag instances or other data - * saved by Script classes. - * @see #clear() - * @see #clearVariables() - * @see #clearScriptData() - */ -public void clearThreadScriptData() { -getThreadScriptDataMap().clear(); -} - -/** Clears data cached by [EMAIL PROTECTED] Script} instances, - * for this context, strongfor all threads/strong. - * The data cleared could be cached Tag instances or other data - * saved by Script classes. - * @see #clear() - * @see #clearThreadScriptData() - * @see #clearVariables() -
cvs commit: jakarta-commons-sandbox/feedparser project.xml
burton 2005/01/26 22:33:55 Modified:feedparser project.xml Log: updated POM Revision ChangesPath 1.2 +53 -48jakarta-commons-sandbox/feedparser/project.xml Index: project.xml === RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/project.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- project.xml 22 May 2004 12:37:37 - 1.1 +++ project.xml 27 Jan 2005 06:33:55 - 1.2 @@ -1,52 +1,57 @@ ?xml version=1.0? project - extend../sandbox-build/project.xml/extend - nameCommons Feedparser/name - idcommons-feedparser/id - logo/images/feedparser-logo-white.png/logo - urlhttp://jakarta.apache.org/commons/sandbox/feedparser//url - inceptionYear2001/inceptionYear - shortDescriptionCommons Feedparser/shortDescription - descriptionCommons Feedparser/description - - currentVersion0.1-dev/currentVersion - versions - /versions - branches - /branches - - developers -developer - nameKevin A. Burton/name - idburton/id - email/email - organization/organization -/developer - /developers - - dependencies -dependency - idjdom/id - versionb10/version -/dependency -dependency - idjaxen/id - version1.1-beta-4/version -/dependency -dependency - idlucene/id - version1.3/version -/dependency - -dependency - idjunit/id - version3.8.1/version -/dependency - -!-- these two are required by maven -- -dependencyidxml-apis/idversion2.0.2/version/dependency -dependencyidxerces/idversion2.0.2/version/dependency -!-- /these two are required by maven -- - /dependencies +extend../sandbox-build/project.xml/extend +nameCommons FeedParser/name +idcommons-feedparser/id +logo/images/feedparser-logo-white.png/logo +urlhttp://jakarta.apache.org/commons/sandbox/feedparser//url +inceptionYear2004/inceptionYear +shortDescriptionJakarta FeedParser/shortDescription +descriptionJakarta FeedParser/description + +currentVersion0.5-beta/currentVersion + +versions +/versions +branches +/branches + +developers + + developer +nameKevin A. Burton/name + +idburton/id +emailburton1--at--rojo.com/email +organizationRojo Networks Inc./organization + + /developer + +/developers + +dependencies + +dependency +idjdom/id +versionb10/version +/dependency + +dependency +idjaxen/id +version1.1-beta-4/version +/dependency + +dependency +idjunit/id +version3.8.1/version +/dependency + +!-- these two are required by maven -- +dependencyidxml-apis/idversion2.0.2/version/dependency +dependencyidxerces/idversion2.0.2/version/dependency + +!-- /these two are required by maven -- + +/dependencies /project - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] proposal: MemoryFS
B. K. Oxley (binkley) wrote: I'm thinking of implementing a memory filesystem with VFS as a demonstration. This would be great, I am looking forward to to add this to VFS. --- Mario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] proposal: MemoryFS
Simon Kitching wrote: I can definitely see this being useful for unit-tests. I was working on some code a while ago that manipulated files, and found it very hard to write unit tests, particularly ones that could be run cross-platform. Having an in-memory filesystem available for unit tests to store files on would have been great.. But please keep in mind, even if the unit-test works with this MemoryFS it doesnt mean it works with the others too. It is really hard to test VFS. I use the LocalFS for a first fast test and sometimes it passed but e.g. ssh wont. --- Mario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang ArrayUtilsAddTest.java
bayard 2005/01/26 22:43:20 Modified:lang/src/java/org/apache/commons/lang ArrayUtils.java lang/src/test/org/apache/commons/lang ArrayUtilsAddTest.java Log: overloaded addAll for all primitives Revision ChangesPath 1.51 +238 -7 jakarta-commons/lang/src/java/org/apache/commons/lang/ArrayUtils.java Index: ArrayUtils.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/ArrayUtils.java,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- ArrayUtils.java 22 Jan 2005 04:22:12 - 1.50 +++ ArrayUtils.java 27 Jan 2005 06:43:20 - 1.51 @@ -2887,13 +2887,244 @@ return clone(array2); } else if (array2 == null) { return clone(array1); -} else { -Object[] joinedArray = (Object[]) Array.newInstance(array1.getClass().getComponentType(), array1.length -+ array2.length); -System.arraycopy(array1, 0, joinedArray, 0, array1.length); -System.arraycopy(array2, 0, joinedArray, array1.length, array2.length); -return joinedArray; } +Object[] joinedArray = (Object[]) Array.newInstance(array1.getClass().getComponentType(), +array1.length + array2.length); +System.arraycopy(array1, 0, joinedArray, 0, array1.length); +System.arraycopy(array2, 0, joinedArray, array1.length, array2.length); +return joinedArray; +} + +/** + * pAdds all the elements of the given arrays into a new array./p + * pThe new array contains all of the element of codearray1/code followed + * by all of the elements codearray2/code. When an array is returned, it is always + * a new array./p + * + * pre + * ArrayUtils.addAll(array1, null) = cloned copy of array1 + * ArrayUtils.addAll(null, array2) = cloned copy of array2 + * ArrayUtils.addAll([], []) = [] + * /pre + * + * @param array1 the first array whose elements are added to the new array. + * @param array2 the second array whose elements are added to the new array. + * @return The new boolean[] array. + * @since 2.1 + */ +public static boolean[] addAll(boolean[] array1, boolean[] array2) { +if (array1 == null) { +return clone(array2); +} else if (array2 == null) { +return clone(array1); +} +boolean[] joinedArray = new boolean[array1.length + array2.length]; +System.arraycopy(array1, 0, joinedArray, 0, array1.length); +System.arraycopy(array2, 0, joinedArray, array1.length, array2.length); +return joinedArray; +} + +/** + * pAdds all the elements of the given arrays into a new array./p + * pThe new array contains all of the element of codearray1/code followed + * by all of the elements codearray2/code. When an array is returned, it is always + * a new array./p + * + * pre + * ArrayUtils.addAll(array1, null) = cloned copy of array1 + * ArrayUtils.addAll(null, array2) = cloned copy of array2 + * ArrayUtils.addAll([], []) = [] + * /pre + * + * @param array1 the first array whose elements are added to the new array. + * @param array2 the second array whose elements are added to the new array. + * @return The new char[] array. + * @since 2.1 + */ +public static char[] addAll(char[] array1, char[] array2) { +if (array1 == null) { +return clone(array2); +} else if (array2 == null) { +return clone(array1); +} +char[] joinedArray = new char[array1.length + array2.length]; +System.arraycopy(array1, 0, joinedArray, 0, array1.length); +System.arraycopy(array2, 0, joinedArray, array1.length, array2.length); +return joinedArray; +} + +/** + * pAdds all the elements of the given arrays into a new array./p + * pThe new array contains all of the element of codearray1/code followed + * by all of the elements codearray2/code. When an array is returned, it is always + * a new array./p + * + * pre + * ArrayUtils.addAll(array1, null) = cloned copy of array1 + * ArrayUtils.addAll(null, array2) = cloned copy of array2 + * ArrayUtils.addAll([], []) = [] + * /pre + * + * @param array1 the first array whose elements are added to the new array. + * @param array2 the second array whose elements are added to the new array. + * @return The new byte[] array. + * @since 2.1 + */ +public static byte[]
cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang ClassUtilsTest.java
bayard 2005/01/26 22:45:11 Modified:lang/src/java/org/apache/commons/lang ClassUtils.java lang/src/test/org/apache/commons/lang ClassUtilsTest.java Log: added Class.forName improvement to see what people think Revision ChangesPath 1.35 +74 -1 jakarta-commons/lang/src/java/org/apache/commons/lang/ClassUtils.java Index: ClassUtils.java === RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/ClassUtils.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- ClassUtils.java 19 Dec 2004 22:35:38 - 1.34 +++ ClassUtils.java 27 Jan 2005 06:45:11 - 1.35 @@ -480,6 +480,79 @@ } return convertedClasses; } + +/** + * pEnhanced version of java.lang.Class.forName(String) that can handle + * primitive types and arrays using the Foo[] notation. + * + * @param name the fully qualified name of the class to create + * @return the desired class + * @since 2.1 + */ +public static Class forName(String name) throws ClassNotFoundException { +String fixedName = name; +if(name.endsWith([])) { +fixedName = [L + name.substring(0, name.length() - [].length()) + ;; +} +try { +return Class.forName(fixedName); +} catch(ClassNotFoundException cnfe) { +// try primitives +if(boolean.equals(name)) { +return boolean.class; +} else +if(char.equals(name)) { +return char.class; +} else +if(byte.equals(name)) { +return byte.class; +} else +if(short.equals(name)) { +return short.class; +} else +if(int.equals(name)) { +return int.class; +} else +if(long.equals(name)) { +return long.class; +} else +if(float.equals(name)) { +return float.class; +} else +if(double.equals(name)) { +return double.class; +} + +// try primitive arrays +if(boolean[].equals(name)) { +return boolean[].class; +} else +if(char[].equals(name)) { +return char[].class; +} else +if(byte[].equals(name)) { +return byte[].class; +} else +if(short[].equals(name)) { +return short[].class; +} else +if(int[].equals(name)) { +return int[].class; +} else +if(long[].equals(name)) { +return long[].class; +} else +if(float[].equals(name)) { +return float[].class; +} else +if(double[].equals(name)) { +return double[].class; +} + +throw cnfe; +} + +} // Inner class // -- 1.15 +30 -1 jakarta-commons/lang/src/test/org/apache/commons/lang/ClassUtilsTest.java Index: ClassUtilsTest.java === RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/ClassUtilsTest.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- ClassUtilsTest.java 19 Dec 2004 22:35:38 - 1.14 +++ ClassUtilsTest.java 27 Jan 2005 06:45:11 - 1.15 @@ -389,6 +389,35 @@ assertNotSame(unmodified, noPrimitives, ClassUtils.primitivesToWrappers(noPrimitives)); } +public void testForName() { +String[] names = new String[] { +boolean, char, byte, short, int, long, float, double, +boolean[], char[], byte[], short[], int[], long[], float[], double[], +java.lang.Object[], java.lang.String, java.lang.String[] +}; + +Class[] classes = new Class[] { +boolean.class, char.class, byte.class, short.class, int.class, long.class, float.class, double.class, +boolean[].class, char[].class, byte[].class, short[].class, int[].class, long[].class, float[].class, double[].class, +Object[].class, String.class, String[].class +}; + +for(int i=0; inames.length; i++) { +try { +assertEquals( Incorrect class found. , classes[i], ClassUtils.forName(names[i]) ); +} catch(ClassNotFoundException cnfe) { +
DO NOT REPLY [Bug 33256] - [VFS] SoftRefFilesCache does not work
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=33256. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=33256 --- Additional Comments From [EMAIL PROTECTED] 2005-01-27 07:49 --- You migt be right with the zip/jar/tar filesystem. In fact there need some work to do that they hold a strong reference. The other filesystems should work. Even if the fileobject is delete from the cache on the first access it will be refetched. This is exactly what is wanted. Step back to the DefaultFilesCache isnt a good idea as this would result in a huge memory-leak if you use the VFS-Manager using its singleton, then your app would end up in an out-of-memory exception sooner or later. However, you are free to use it, you could do that without patching VFS. Just instead of simply using VFS.getManager implement your own MyVFS.getManager() StandardFileSystemManager fsm = new StandardFileSystemManager(); fsm.setFilesCache(new DefaultFilesCache()); fsm.init(); I will have a look on the archive-type-filesystems. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/network ResourceRequestFactory.java
burton 2005/01/26 23:15:50 Modified:feedparser build.xml project.xml feedparser/src/java/org/apache/commons/feedparser/locate AnchorParser.java feedparser/src/java/org/apache/commons/feedparser/network ResourceRequestFactory.java Log: Fixed really stupid regression in package Revision ChangesPath 1.13 +6 -6 jakarta-commons-sandbox/feedparser/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/build.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- build.xml 20 Jan 2005 08:54:06 - 1.12 +++ build.xml 27 Jan 2005 07:15:50 - 1.13 @@ -9,9 +9,9 @@ property name=project value=feedparser/ property name=version.major value=0/ -property name=version.minor value=0/ -property name=version.sub value=1/ -property name=version.desc value=alpha/ +property name=version.minor value=5/ +property name=version.sub value=0/ +property name=version.desc value=beta/ property name=docs.dest value=./site/ property name=docs.src value=./xdocs/ @@ -177,11 +177,11 @@ /javadoc /target -!--target name=docs-- +target name=docs !-- anakia config borrowed from Lucene -- -!--taskdef name=anakia +taskdef name=anakia classname=org.apache.velocity.anakia.AnakiaTask classpathref=anakia.classpath @@ -197,7 +197,7 @@ lastModifiedCheck=true templatePath=${jakarta.site2.home}/xdocs/stylesheets/ -/target-- +/target target name=help echo message=U S A G E :/ 1.3 +9 -0 jakarta-commons-sandbox/feedparser/project.xml Index: project.xml === RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/project.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- project.xml 27 Jan 2005 06:33:55 - 1.2 +++ project.xml 27 Jan 2005 07:15:50 - 1.3 @@ -1,18 +1,27 @@ ?xml version=1.0? project + extend../sandbox-build/project.xml/extend + nameCommons FeedParser/name + idcommons-feedparser/id + logo/images/feedparser-logo-white.png/logo + urlhttp://jakarta.apache.org/commons/sandbox/feedparser//url + inceptionYear2004/inceptionYear + shortDescriptionJakarta FeedParser/shortDescription + descriptionJakarta FeedParser/description currentVersion0.5-beta/currentVersion versions /versions + branches /branches 1.9 +2 -0 jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/locate/AnchorParser.java Index: AnchorParser.java === RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/locate/AnchorParser.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AnchorParser.java 20 Jan 2005 09:00:37 - 1.8 +++ AnchorParser.java 27 Jan 2005 07:15:50 - 1.9 @@ -38,6 +38,8 @@ AnchorParserListener listener ) throws AnchorParserException { +//FIXME: we do NOT obey base right now and this is a BIG problem! + parseAnchors( content, listener ); } 1.2 +10 -2 jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/network/ResourceRequestFactory.java Index: ResourceRequestFactory.java === RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/network/ResourceRequestFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ResourceRequestFactory.java 25 Jan 2005 07:55:19 - 1.1 +++ ResourceRequestFactory.java 27 Jan 2005 07:15:50 - 1.2 @@ -65,8 +65,14 @@ * resource. */ public static int DEFAULT_CONNECT_TIMEOUT = 1 * 60 * 1000; + public static int DEFAULT_READ_TIMEOUT = DEFAULT_CONNECT_TIMEOUT; +/** + * Specify the maximum number of redirects to use. + */ +public static int DEFAULT_MAX_REDIRECTS = 5; + //FIXME: (should this be a linked list?) private static ArrayList listeners = new ArrayList( 30 ); @@ -209,6 +215,9 @@ System.setProperty( sun.net.client.defaultConnectTimeout, Integer.toString( DEFAULT_CONNECT_TIMEOUT ) ); +
cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip ZipFileSystem.java
imario 2005/01/26 23:15:49 Modified:vfs/src/java/org/apache/commons/vfs/provider AbstractFileObject.java vfs/src/java/org/apache/commons/vfs/provider/tar TarFileSystem.java vfs/src/java/org/apache/commons/vfs/provider/zip ZipFileSystem.java Log: hold strong reference of archive children on the container (parent) fileobject. Thus they should only be garbage collected if the parent itself is garbage collected Revision ChangesPath 1.53 +17 -1 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java Index: AbstractFileObject.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- AbstractFileObject.java 21 Dec 2004 21:54:32 - 1.52 +++ AbstractFileObject.java 27 Jan 2005 07:15:49 - 1.53 @@ -74,7 +74,7 @@ // go into the global files cache // private FileObject[] children; private FileName[] children; - +private List objects; protected AbstractFileObject(final FileName name, final AbstractFileSystem fs) @@ -1446,4 +1446,20 @@ { type = fileType; } + +/** + * This method is meant to add a object where this object holds a strong reference then. + * E.g. a archive-filesystem creates a list of all childs and they shouldnt get + * garbage collected until the container is garbage collected + * + * @param strongRef + */ +public void holdObject(Object strongRef) +{ +if (objects == null) +{ +objects = new ArrayList(5); +} +objects.add(strongRef); +} } 1.3 +9 -1 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/tar/TarFileSystem.java Index: TarFileSystem.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/tar/TarFileSystem.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TarFileSystem.java11 Jan 2005 16:14:46 - 1.2 +++ TarFileSystem.java27 Jan 2005 07:15:49 - 1.3 @@ -27,6 +27,7 @@ import org.apache.commons.vfs.Selectors; import org.apache.commons.vfs.VfsLog; import org.apache.commons.vfs.provider.AbstractFileSystem; +import org.apache.commons.vfs.provider.AbstractFileObject; import org.apache.commons.vfs.provider.bzip2.Bzip2FileObject; import java.io.File; @@ -34,6 +35,8 @@ import java.io.IOException; import java.io.InputStream; import java.util.Collection; +import java.util.List; +import java.util.ArrayList; import java.util.zip.GZIPInputStream; /** @@ -79,6 +82,7 @@ // Build the index try { +List strongRef = new ArrayList(100); TarEntry entry; while ((entry = getTarFile().getNextEntry()) != null) { @@ -95,6 +99,7 @@ fileObj = createTarFileObject(name, entry); putFileToCache(fileObj); +strongRef.add(fileObj); // Make sure all ancestors exist // TODO - create these on demand @@ -109,12 +114,15 @@ { parent = createTarFileObject(parentName, null); putFileToCache(parent); +strongRef.add(fileObj); } // Attach child to parent parent.attachChild(fileObj.getName()); } } + +((AbstractFileObject) getParentLayer()).holdObject(strongRef); } catch (IOException e) { 1.32 +7 -0 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileSystem.java Index: ZipFileSystem.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileSystem.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- ZipFileSystem.java4 Jul 2004 18:45:56 - 1.31 +++ ZipFileSystem.java27 Jan 2005 07:15:49 - 1.32 @@ -25,11 +25,14 @@ import org.apache.commons.vfs.Selectors; import org.apache.commons.vfs.VfsLog; import org.apache.commons.vfs.provider.AbstractFileSystem; +import org.apache.commons.vfs.provider.AbstractFileObject; import
cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip ZipFileSystem.java
imario 2005/01/26 23:33:08 Modified:vfs/src/java/org/apache/commons/vfs/provider/tar TarFileSystem.java vfs/src/java/org/apache/commons/vfs/provider/zip ZipFileSystem.java Log: hold strong reference of archive children on the container (parent) fileobject. Thus they should only be garbage collected if the parent itself is garbage collected Revision ChangesPath 1.4 +2 -2 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/tar/TarFileSystem.java Index: TarFileSystem.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/tar/TarFileSystem.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TarFileSystem.java27 Jan 2005 07:15:49 - 1.3 +++ TarFileSystem.java27 Jan 2005 07:33:08 - 1.4 @@ -114,7 +114,7 @@ { parent = createTarFileObject(parentName, null); putFileToCache(parent); -strongRef.add(fileObj); +strongRef.add(parent); } // Attach child to parent 1.33 +1 -1 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileSystem.java Index: ZipFileSystem.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/zip/ZipFileSystem.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- ZipFileSystem.java27 Jan 2005 07:15:49 - 1.32 +++ ZipFileSystem.java27 Jan 2005 07:33:08 - 1.33 @@ -110,7 +110,7 @@ { parent = createZipFileObject(parentName, null); putFileToCache(parent); -strongRef.add(fileObj); +strongRef.add(parent); } // Attach child to parent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/network HTTPClientNetworkResource.java
burton 2005/01/26 23:35:09 Modified:feedparser/src/java/org/apache/commons/feedparser/network HTTPClientNetworkResource.java Log: Refactored Jakarta HttpClient network implementation to compile correctly... Revision ChangesPath 1.2 +27 -64 jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/network/HTTPClientNetworkResource.java Index: HTTPClientNetworkResource.java === RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/network/HTTPClientNetworkResource.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HTTPClientNetworkResource.java25 Jan 2005 07:55:19 - 1.1 +++ HTTPClientNetworkResource.java27 Jan 2005 07:35:08 - 1.2 @@ -24,6 +24,10 @@ import org.apache.commons.httpclient.methods.*; /** + * + * This is an exprimental ResourceRequest which used Jakarta HttpClient as the + * backend. Current its only meant for use in development as its not as + * reliable and stable as the URLResourceRequest. * * @author a href=mailto:[EMAIL PROTECTED]Kevin A. Burton/a * @version $Id$ @@ -32,9 +36,7 @@ public static final int TIMEOUT = 3 * 1000 * 60; -public static HttpConnectionManager hcm = new HttpConnectionManager(); - -private HttpConnection conn = null; +private HttpClient client = new HttpClient(); /** * @@ -42,25 +44,17 @@ * * @author a href=mailto:[EMAIL PROTECTED]Kevin A. Burton (burtonator)/a */ -public void init() throws IOException { +public void init() throws NetworkException { try { - -this.conn = hcm.getConnection( getResource() ); - -if ( this.conn.isOpen() == false ) { - -//set socket timeout... -this.conn.setSoTimeout( TIMEOUT ); - -} - -} catch ( HttpException e ) { -IOException e1 = new IOException( e.getMessage() ); -e1.initCause( e ); - -throw e1; +client.setConnectionTimeout( TIMEOUT ); +client.setStrictMode( false ); +//client.setFollowRedirects( true ); + +} catch ( Exception e ) { + +throw new NetworkException( e ); } @@ -73,58 +67,27 @@ */ public InputStream getInputStream() throws IOException { -// try { - -// //now get the method so that we can execute it. -// HttpMethod method = new GetMethod( new HttpMethod( getResource() ).getPath() ); -// method.setFollowRedirects( true ); - -// int result = method.execute( new HttpState(), conn ); - -// //FIXME: 302 isn't being followed. +try { -// //302 redirect -// if ( method.getStatusCode() == HttpURLConnection.HTTP_MOVED_TEMP ) { +//now get the method so that we can execute it. +HttpMethod method = new GetMethod( getResource() ); +method.setFollowRedirects( true ); -// //technically we shouldn't get this.. but if we do +int result = client.executeMethod( method); -// String location = method.getResponseHeader( Location ).getValue(); - -// Log.message( Redirect: + location ); - -// HTTPClientNetworkResource redirect = new HTTPClientNetworkResource(); -// redirect.setResource( location ); -// redirect.init(); - -// return redirect.getInputStream(); - -// } - -// // when should we throw an exception? 404? - -// if ( method.getStatusCode() != 200 ) { -// throw new IOException( HTTP + method.getStatusCode() + - + method.getStatusText() ); -// } +if ( result = 400 result 500 ) { +throw new NetworkException( HTTP + result + - + method.getStatusText() ); +} -// InputStream is = new AdvancedInputStream( method.getResponseBodyAsStream(), this ); +InputStream is = new AdvancedInputStream( method.getResponseBodyAsStream(), this ); -// return is; +return is; -// } catch ( HttpException e ) { +} catch ( Exception e ) { -// throw new IOException( e.getMessage() ); - -// } finally { - -// //we have to release this connection when done or else we run
cvs commit: jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/network HTTPClientNetworkResource.java
burton 2005/01/26 23:36:24 Modified:feedparser/src/java/org/apache/commons/feedparser/network HTTPClientNetworkResource.java Log: more docs... Revision ChangesPath 1.3 +4 -1 jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/network/HTTPClientNetworkResource.java Index: HTTPClientNetworkResource.java === RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/network/HTTPClientNetworkResource.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- HTTPClientNetworkResource.java27 Jan 2005 07:35:08 - 1.2 +++ HTTPClientNetworkResource.java27 Jan 2005 07:36:24 - 1.3 @@ -29,6 +29,9 @@ * backend. Current its only meant for use in development as its not as * reliable and stable as the URLResourceRequest. * + * Most of this code isn't as functional as the URLResourceRequest including + * correct timeout behavior, redirect limits, header and etag support, etc. + * * @author a href=mailto:[EMAIL PROTECTED]Kevin A. Burton/a * @version $Id$ */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 33264] New: - GenericObjectPool is a LIFO, not a FIFO implementation
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=33264. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=33264 Summary: GenericObjectPool is a LIFO, not a FIFO implementation Product: Commons Version: 1.2 Final Platform: All OS/Version: All Status: NEW Severity: normal Priority: P3 Component: Pool AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Hi, the GenericObjectPool implementation is (like the StackedObjectPool) a LIFO, not a FIFO implementation as stated here: http://jakarta.apache.org/commons/pool/guide/index.html). When borrowObject() is called, the first available object is extracted from the pool using removeFirst(). When returnObject(obj) is called, the object is returned to the pool using addFirst(). I would expect that addLast() is used if this is supposed to be a FIFO implementation. But perhaps the developers guide is wrong, not the implementation. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]