[GUMP@brutus]: Project commons-id (in module jakarta-commons-sandbox) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at [EMAIL PROTECTED] Project commons-id has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 10 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - commons-id : Commons Identifier Package Full details are available at: http://brutus.apache.org/gump/public/jakarta-commons-sandbox/commons-id/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Sole output [commons-id-13022005.jar] identifier set to project name -DEBUG- (Gump generated) Maven Properties in: /usr/local/gump/public/workspace/jakarta-commons-sandbox/id/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /usr/local/gump/public/workspace/jakarta-commons-sandbox/id/project.xml -DEBUG- Maven project properties in: /usr/local/gump/public/workspace/jakarta-commons-sandbox/id/project.properties -INFO- Failed to extract fallback artifacts from Gump Repository The following work was performed: http://brutus.apache.org/gump/public/jakarta-commons-sandbox/commons-id/gump_work/build_jakarta-commons-sandbox_commons-id.html Work Name: build_jakarta-commons-sandbox_commons-id (Type: Build) Work ended in a state of : Failed Elapsed: 1 sec Command Line: maven --offline jar [Working Directory: /usr/local/gump/public/workspace/jakarta-commons-sandbox/id] CLASSPATH: /opt/jdk1.4/lib/tools.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-commons/discovery/dist/commons-discovery.jar:/usr/local/gump/public/workspace/dist/junit/junit.jar:/usr/local/gump/public/workspace/xml-commons/java/build/resolver.jar:/usr/local/gump/public/workspace/ant/bootstrap/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/bootstrap/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging-api.jar - __ __ | \/ |__ _Apache__ ___ | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~ |_| |_\__,_|\_/\___|_||_| v. 1.0.2 org.apache.maven.MavenException: Error reading XML or initializing at org.apache.maven.MavenUtils.getProject(MavenUtils.java:156) at org.apache.maven.MavenUtils.getProject(MavenUtils.java:122) at org.apache.maven.MavenSession.initializeRootProject(MavenSession.java:232) at org.apache.maven.MavenSession.initialize(MavenSession.java:172) at org.apache.maven.cli.App.doMain(App.java:475) at org.apache.maven.cli.App.main(App.java:1239) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.werken.forehead.Forehead.run(Forehead.java:551) at com.werken.forehead.Forehead.main(Forehead.java:581) --- Nested Exception --- java.io.FileNotFoundException: Parent POM not found: /home/gump/workspaces2/public/workspace/jakarta-commons-sandbox/sandbox-build/project.xml at org.apache.maven.MavenUtils.getNonJellyProject(MavenUtils.java:230) at org.apache.maven.MavenUtils.getProject(MavenUtils.java:143) at org.apache.maven.MavenUtils.getProject(MavenUtils.java:122) at org.apache.maven.MavenSession.initializeRootProject(MavenSession.java:232) at org.apache.maven.MavenSession.initialize(MavenSession.java:172) at org.apache.maven.cli.App.doMain(App.java:475) at org.apache.maven.cli.App.main(App.java:1239) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.werken.forehead.Forehead.run(Forehead.java:551) at com.werken.forehead.Forehead.main(Forehead.java:581) You have encountered an unknown error
[GUMP@brutus]: Project commons-jelly-tags-xml (in module commons-jelly) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at [EMAIL PROTECTED] Project commons-jelly-tags-xml has an issue affecting its community integration. This issue affects 12 projects, and has been outstanding for 3 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - commons-jelly-tags-define : Commons Jelly - commons-jelly-tags-html : Commons Jelly - commons-jelly-tags-http : Commons Jelly - commons-jelly-tags-jaxme : Commons Jelly - commons-jelly-tags-jetty : Commons Jelly - commons-jelly-tags-jface : Commons Jelly - commons-jelly-tags-jsl : Commons Jelly - commons-jelly-tags-swing : Commons Jelly - commons-jelly-tags-xml : Commons Jelly - commons-jelly-tags-xmlunit : Commons Jelly - maven : Project Management Tools - maven-bootstrap : Project Management Tools Full details are available at: http://brutus.apache.org/gump/public/commons-jelly/commons-jelly-tags-xml/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Sole output [commons-jelly-tags-xml-13022005.jar] identifier set to project name -DEBUG- Dependency on xml-xerces exists, no need to add for property maven.jar.xerces. -DEBUG- (Gump generated) Maven Properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/project.xml -DEBUG- Maven project properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/project.properties -INFO- Project Reports in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/target/test-reports -DEBUG- Extracted fallback artifacts from Gump Repository The following work was performed: http://brutus.apache.org/gump/public/commons-jelly/commons-jelly-tags-xml/gump_work/build_commons-jelly_commons-jelly-tags-xml.html Work Name: build_commons-jelly_commons-jelly-tags-xml (Type: Build) Work ended in a state of : Failed Elapsed: 13 secs Command Line: maven --offline jar [Working Directory: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml] CLASSPATH: /opt/jdk1.4/lib/tools.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/dist/junit/junit.jar:/usr/local/gump/public/workspace/xml-commons/java/build/resolver.jar:/usr/local/gump/public/workspace/ant/bootstrap/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/bootstrap/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-13022005.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-13022005.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-13022005.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-13022005.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging-api.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/public/workspace/jaxen/target/jaxen-13022005.jar - [mkdir] Created dir: /home/gump/workspaces2/public/workspace/commons-jelly/jelly-tags/xml/target/classes java:compile: [echo] Compiling to /home/gump/workspaces2/public/workspace/commons-jelly/jelly-tags/xml/target/classes [echo] == NOTE: Targetting JVM 1.4, classes will not run on earlier JVMs == [javac] Compiling 16 source files to /home/gump/workspaces2/public/workspace/commons-jelly/jelly-tags/xml/target/classes java:jar-resources: test:prepare-filesystem: [mkdir] Created dir: /home/gump/workspaces2/public/workspace/commons-jelly/jelly-tags/xml/target/test-classes [mkdir] Created dir: /home/gump/workspaces2/public/workspace/commons-jelly/jelly-tags/xml/target/test-reports test:test-resources: Copying 36 files to
[GUMP@brutus]: Project commons-jelly-tags-ant (in module commons-jelly) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at [EMAIL PROTECTED] Project commons-jelly-tags-ant has an issue affecting its community integration. This issue affects 2 projects, and has been outstanding for 3 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - commons-jelly-tags-ant : Commons Jelly - commons-jelly-tags-fmt : Commons Jelly Full details are available at: http://brutus.apache.org/gump/public/commons-jelly/commons-jelly-tags-ant/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Sole output [commons-jelly-tags-ant-13022005.jar] identifier set to project name -DEBUG- Dependency on ant exists, no need to add for property maven.jar.ant-optional. -DEBUG- Dependency on xml-xerces exists, no need to add for property maven.jar.xerces. -DEBUG- (Gump generated) Maven Properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/project.xml -DEBUG- Maven project properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/project.properties -INFO- Project Reports in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/target/test-reports -INFO- Failed to extract fallback artifacts from Gump Repository The following work was performed: http://brutus.apache.org/gump/public/commons-jelly/commons-jelly-tags-ant/gump_work/build_commons-jelly_commons-jelly-tags-ant.html Work Name: build_commons-jelly_commons-jelly-tags-ant (Type: Build) Work ended in a state of : Failed Elapsed: 11 secs Command Line: maven --offline jar [Working Directory: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant] CLASSPATH: /opt/jdk1.4/lib/tools.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-swing.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-trax.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-junit.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/dist/junit/junit.jar:/usr/local/gump/public/workspace/xml-commons/java/build/resolver.jar:/usr/local/gump/public/workspace/ant/bootstrap/lib/ant-launcher.jar:/usr/local/gump/public/workspace/ant/bootstrap/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-commons/cli/target/commons-cli-13022005.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-13022005.jar:/usr/local/gump/public/workspace/jakarta-commons-sandbox/grant/target/commons-grant-13022005.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-13022005.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-13022005.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/util/target/commons-jelly-tags-util-13022005.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-13022005.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging-api.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/public/workspace/jaxen/target/jaxen-13022005.jar - java:prepare-filesystem: [mkdir] Created dir: /home/gump/workspaces2/public/workspace/commons-jelly/jelly-tags/ant/target/classes java:compile: [echo] Compiling to /home/gump/workspaces2/public/workspace/commons-jelly/jelly-tags/ant/target/classes [echo] == NOTE: Targetting JVM 1.4, classes will not run on earlier JVMs == [javac] Compiling 10 source files to /home/gump/workspaces2/public/workspace/commons-jelly/jelly-tags/ant/target/classes [javac] /home/gump/workspaces2/public/workspace/commons-jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/AntTag.java:385: warning: createElement(org.apache.tools.ant.Project,java.lang.Object,java.lang.String) in org.apache.tools.ant.IntrospectionHelper has been deprecated [javac] dataType = ih.createElement( getAntProject(), object, name.toLowerCase() ); [javac]
Re: [lang] release strategy
This is why I ([collections]) use ant for builds and maven only for website building. Basically, IMHO, a src-zip should contain not only the source java, but the source for building a local copy of the website. Stephen - Original Message - From: Henri Yandell [EMAIL PROTECTED] Pretty sure Maven doesn't put xdocs in the src zip. If we have to do this, then I think we shouldn't branch for a release, it's going to be too painful to keep the two sites synced. Starting to see negatives to the tying of site to code that Maven does :) Hen On Sun, 13 Feb 2005 01:51:52 -, Stephen Colebourne [EMAIL PROTECTED] wrote: Er, no. The xdocs should be shipped in the src zip file. They are used by people outside Apache building a website. Stephen - Original Message - From: Henri Yandell [EMAIL PROTECTED] Cool. I'll remove the xdocs from the branch. Hen On Sat, 12 Feb 2005 21:39:33 -, Stephen Colebourne [EMAIL PROTECTED] wrote: It needs to be like [collections], but probably not as automated Website is built from trunk. Javadoc of 2.1 release is built from 2.1 branch and copied to server in apidocs-2.1 directory Hyperlink of 2.1 javadoc is inserted into navigation.xml of trunk Stephen - Original Message - From: Henri Yandell [EMAIL PROTECTED] Though now I'm a bit confused about whether the website should exist on the 2.1 branch or not :) Odd as it sounds, I think we should we be releasing code from 2.1 branch, and building the site from trunk. Otherwise it'll be a bit odd I think. Sound insane? Hen On Sat, 12 Feb 2005 15:22:08 -0500, Henri Yandell [EMAIL PROTECTED] wrote: Only question is whether to specify a 0 for the 0th maintenance. Not a big deal though, I've setup the following release branch: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/branches/LANG_2_1_BRANCH the naming matches the syntax we used for 1.0 when making 1.0.1. I know it could be a lot better (especially as SVN doesn't barf on . as CVS does), but I'm going with consistency for the moment. I'll start tweaking that towards a release. Trunk is 2.2-dev now. Hen On Mon, 7 Feb 2005 18:36:13 -0500, Gary Gregory [EMAIL PROTECTED] wrote: Personally, I've always liked the following numbering scheme: Major.Minor.Maintenance. Gary -Original Message- From: Stephen Colebourne [mailto:[EMAIL PROTECTED] Sent: Monday, February 07, 2005 2:08 PM To: Jakarta Commons Developers List Subject: Re: [lang] release strategy Personally I find the three digit release numbers just confusing. I much prefer to reserve the third digit for essential patches. So, I'm happy to have a 2.1-branch, but I want the release to be 2.1, not 2.1.0 or 2.1.1. Stephen - Original Message - From: Henri Yandell [EMAIL PROTECTED] I'm very tempted to try the branch then release strategy, and wondered what people thought about the idea. It might suggest a slight change to the version number style: Create 2.1 branch. Make changes to 2.1 branch until we're ready for release. Tag 2.1 branch with 2.1.0 tag. ... later Change 2.1 branch until we're ready for release Tag 2.1 branch with 2.1.1tag. ... later in parallel Change trunk until we're near a release Create 2.2 branch (or 3.0) Change 2.2 until ready Tag 2.2 with 2.2.0 etc. If we called it 2.1-head or something, it wouldn't need the version change, it just feels more logical to go with a 2.1.0 release than a 2.1 one if we use this style of development. Anyway, it seems to me that this fits us more nowadays. We end up with the text package slowing down because it's not planned for the next release, and having to avoid various other bugzilla requests as they're not wanting to be fixed until later. Any 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -
svn commit: r153616 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java
Author: skitching Date: Sun Feb 13 02:59:56 2005 New Revision: 153616 URL: http://svn.apache.org/viewcvs?view=revrev=153616 Log: Keep local copy of root object, so context can be discarded after parse completes. Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java?view=diffr1=153615r2=153616 == --- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java (original) +++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java Sun Feb 13 02:59:56 2005 @@ -206,6 +206,10 @@ * The Locator associated with our parser object. This object can be * consulted to find out which line of the input xml document we are * currently on - very useful when generating error messages. + * p + * We store this variable on the SAXHandler class as well as the Context + * because the Context object is not created until the startDocument + * method is invoked - which is after setDocumentLocator. */ private Locator documentLocator = null; @@ -227,6 +231,15 @@ */ private String dtdSystemId = null; +/** + * The object that forms the root of the tree of objects being + * created during a parse. + * p + * Note that this info is not on the Context because the user may + * access this data after the parse has completed. + */ +private Object root; + // - // Constructors // - @@ -474,7 +487,8 @@ /** * Set the object that the stack should be primed with before parsing - * starts. + * starts. Note that this value is reset to null after parsing a document, + * so must be set before each parse. */ public void setInitialObject(Object o) { initialObject = o; @@ -485,11 +499,7 @@ * should not be called until parsing has completed. */ public Object getRoot() { -if (context == null) { -return null; -} else { -return context.getRoot(); -} +return root; } /** @@ -654,15 +664,23 @@ /** * Cleanup method which releases any memory that is no longer needed - * after a parse has completed. There is one exception: the root - * object generated during the parse is retained so that it can be - * retrieved by getRoot(). If this is no longer needed, then setRoot(null) - * should be called to release this member. + * after a parse has completed. + * p + * This method should generally be called if the reference to the digester + * is to be retained for some time (eg returned to a pool) in order to + * avoid holding memory occupied for more time than is necessary. + * p + * This method definitely needs to be called after a parse has failed, ie + * an exception has been thrown, in order to free memory (unless all + * references to the digester itself are discarded, allowing it to be + * recycled together with its dependent objects). + * p + * After this call, the getRoot method will return null. */ public void clear() { -// It would be nice to set -// context = null; -// but currently that would stuff up the getRoot() method. +context = null; // only necessary if parse failed +initialObject = null; // should not be necessary +root = null; } // --- @@ -780,6 +798,7 @@ numEntitiesResolved = 0; dtdPublicId = null; dtdSystemId = null; +root = null; // just in case // Create a new parsing context. This guarantees that Actions have // a clean slate for handling this new input document. @@ -787,6 +806,10 @@ if (initialObject != null) { context.setRoot(initialObject); + +// Initial object should apply to a single parse only, so lets +// enforce it here. +initialObject = null; } // give subclasses a chance to do custom configuration before each @@ -846,8 +869,14 @@ throw new NestedSAXException(ex); } -// Perform final cleanup to release memory that is no longer needed. -clear(); +// store the root object so the user can access it +root = context.getRoot(); + +// And now we don't need the context any more, so allow it to be +//
svn commit: r153617 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Context.java
Author: skitching Date: Sun Feb 13 03:14:46 2005 New Revision: 153617 URL: http://svn.apache.org/viewcvs?view=revrev=153617 Log: Added checkForProblems method that checks the sanity of the Context stacks after digestion has completed. Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Context.java Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Context.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Context.java?view=diffr1=153616r2=153617 == --- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Context.java (original) +++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Context.java Sun Feb 13 03:14:46 2005 @@ -859,4 +859,32 @@ public SAXException createSAXException(String message) { return createSAXException(message, null); } + +/** + * Verify that no Actions have misbehaved, leaving the stacks in a bad + * state or anything. This should only be called at the end of a + * successful parse. It's really a debug method intended particularly for + * use with unit tests but as it is pretty quick to check things we leave + * it in at runtime, to ensure that any bad custom actions also get + * reported. + */ +public void checkForProblems() throws ParseException { +if (!scratchStacks.isEmpty()) { +StringBuffer stacklist = new StringBuffer(); +for(Iterator i = scratchStacks.keySet().iterator(); i.hasNext(); ) { +// The keys should all be StackId objects which have nice +// descriptive toString methods. If any bad keys have been +// added, then toString() will still work. +String id = i.next().toString(); +stacklist.append(id); +stacklist.append(,); +} +// remove last unused comma +stacklist.setLength(stacklist.length()-1); + +throw new ParseException( +An action has not executed correctly; an item has been ++ left on stack(s) + stacklist); +} +} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153618 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java
Author: skitching Date: Sun Feb 13 03:16:08 2005 New Revision: 153618 URL: http://svn.apache.org/viewcvs?view=revrev=153618 Log: Invoke new Context.checkForProblems method at end of a successful parse, just in case actions have made errors. This will make any bugs in actions much easier to detect and solve. Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java?view=diffr1=153617r2=153618 == --- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java (original) +++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SAXHandler.java Sun Feb 13 03:16:08 2005 @@ -865,13 +865,24 @@ // And finally for the RuleManager too ruleManager.finishParse(context); } catch(DigestionException ex) { -log.error(finishParse threw exception, ex); +log.error(RuleManager.finishParse threw exception, ex); throw new NestedSAXException(ex); } // store the root object so the user can access it root = context.getRoot(); - + +// This method verifies that no Actions have misbehaved, leaving the +// stacks in a bad state or anything. Of course this is called only +// after a parse has successfully completed. It's really a debug method +// but as it is pretty quick to check things we leave it in at runtime. +try { +context.checkForProblems(); +} catch(ParseException ex) { +log.error(Context.checkForProblems threw exception, ex); +throw new NestedSAXException(ex); +} + // And now we don't need the context any more, so allow it to be // reclaimed. Note that in the case where a parse failed, this // method is never called, so the user is responsible for calling - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153619 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java
Author: skitching Date: Sun Feb 13 03:17:29 2005 New Revision: 153619 URL: http://svn.apache.org/viewcvs?view=revrev=153619 Log: Change references to BeanPropertySetterAction to SetPropertyAction, in line with changes made to class names. Also add factory method for the SetPropertyAction constructor that takes the target property from an xml attribute. Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java?view=diffr1=153618r2=153619 == --- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java (original) +++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/factory/ActionFactory.java Sun Feb 13 03:17:29 2005 @@ -195,27 +195,50 @@ } /** - * Add a bean property setter rule for the specified parameters. + * Add a property setter rule for the specified parameters. * * @param pattern Element matching pattern - * @see BeanPropertySetterAction + * @see SetPropertyAction */ -public Action addBeanPropertySetter(String pattern) +public Action addSetProperty(String pattern) throws InvalidRuleException { -Action action = new BeanPropertySetterAction(); +Action action = new SetPropertyAction(); return addRule(pattern, action); } /** - * Add a bean property setter rule for the specified parameters. + * Add a property setter rule for the specified parameters. * * @param pattern Element matching pattern * @param propertyName Name of property to set - * @see BeanPropertySetterAction + * @see SetPropertyAction */ -public Action addBeanPropertySetter(String pattern, String propertyName) +public Action addSetProperty(String pattern, String propertyName) throws InvalidRuleException { -Action action = new BeanPropertySetterAction(propertyName); +Action action = new SetPropertyAction(propertyName); +return addRule(pattern, action); +} + +/** + * Add a property setter rule for the specified parameters. + * + * @param pattern Element matching pattern + * @param xmlAttributeNS is the namespace of the xml attribute that will + * indicate which property to set. Null means the default namespace. + * @param xmlAttributeName is the name of the xml attribute that will + * indicate which property to set. Must not be null. + * @param defaultPropertyName is the name of a property to set if the + * specified xml attribute is not defined. If null, then it is an error + * if the xml attribute is not present in the input. + * @see SetPropertyAction + */ +public Action addSetProperty( +String pattern, +String xmlAttributeNS, String xmlAttributeName, +String defaultPropertyName) +throws InvalidRuleException { +Action action = new SetPropertyAction( +xmlAttributeNS, xmlAttributeName, defaultPropertyName); return addRule(pattern, action); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153620 - jakarta/commons/proper/collections/trunk/build.xml
Author: scolebourne Date: Sun Feb 13 03:28:49 2005 New Revision: 153620 URL: http://svn.apache.org/viewcvs?view=revrev=153620 Log: Change script to satisfy nightly build process Modified: jakarta/commons/proper/collections/trunk/build.xml Modified: jakarta/commons/proper/collections/trunk/build.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/collections/trunk/build.xml?view=diffr1=153619r2=153620 == --- jakarta/commons/proper/collections/trunk/build.xml (original) +++ jakarta/commons/proper/collections/trunk/build.xml Sun Feb 13 03:28:49 2005 @@ -69,6 +69,7 @@ property name=build.src.tar.name value=${build.dist}/${component.name}-${component.version}-src.tar/ property name=build.src.gz.name value=${build.dist}/${component.name}-${component.version}-src.tar.gz/ property name=build.src.zip.name value=${build.dist}/${component.name}-${component.version}-src.zip/ + property name=dist.homevalue=dist/ !-- for nightly builds -- !-- == Settings == -- @@ -489,10 +490,19 @@ !-- == -- - target name=dist depends=jar,testjar,javadoc,tf.validate,tf.jar,dist.bin,dist.src + !-- Target needed for nightly builds -- + target name=dist depends=dist.create description=Create distribution folders +delete dir=${dist.home}/ +mkdir dir=${dist.home} / +copy todir=${dist.home} + fileset dir=${build.dist.bin} / + /copy /target - + + target name=dist.create depends=jar,testjar,javadoc,tf.validate,tf.jar,dist.bin,dist.src + /target + target name=dist.bin mkdir dir=${build.dist.bin.work}/ copy todir=${build.dist.bin.work} @@ -545,8 +555,11 @@ !-- == -- - target name=zip depends=zip.bin,zip.src - description=Create zipped distribution + target name=release depends=dist.create,zip + description=Create release + /target + + target name=zip depends=zip.bin,zip.src /target target name=zip.bin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [collections] nightly build failures
Should work now - Original Message - From: Stephen Colebourne [EMAIL PROTECTED] To: Jakarta Commons Developers List commons-dev@jakarta.apache.org Sent: Saturday, February 12, 2005 11:05 PM Subject: Re: [collections] nightly build failures Well, the binary dist is currently getting built into build/bin/commons-collections-3.2-dev and the source distribution into build/src/commons-collections-3.2-dev This is all neatly setup then for the zip target. Another reason for moving it was to avoid creating two build folder, which I reckon is a better layout. But then I didn't know about the nightlies dependency. The best I can think of is to rename the collections dist target to gather, and make dist copy the folder from its current location. Stephen - Original Message - From: Craig McClanahan [EMAIL PROTECTED] On Sat, 12 Feb 2005 18:33:06 -, Stephen Colebourne [EMAIL PROTECTED] wrote: That got changed ages ago IIRC. Can your scripts handle an ant property override to change the output directory, or must we change the checked in script. Stephen The part of the processing that fails due to this is a shell script that renames the dist directory to something like commons-collections-MMDD before tarring and zipping it up, then renames it back again. I can probably hand code an exception for collections, but it's not even obvious (from looking at the directory structure) what stuff should go into the binary tar or zip files. Is there a particular reason that your build script is unique (across Commons Proper and Commons Sandbox) in this respect? Craig - Original Message - From: Craig McClanahan [EMAIL PROTECTED] The nightly build script expects that the output of ant dist will show up in a dist subdirectory, like it does for every other commons package. That no longer seems to be the case for [collections]. Craig On Sat, 12 Feb 2005 00:29:17 -0500, Phil Steitz [EMAIL PROTECTED] wrote: The nightlies seem to be failing for [collections], but the ant build works fine for me. Any ideas why the nigthlies are failing? Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
svn commit: r153621 - jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullOutputStream.java
Author: scolebourne Date: Sun Feb 13 03:35:42 2005 New Revision: 153621 URL: http://svn.apache.org/viewcvs?view=revrev=153621 Log: Remove synchronized from methods, general tidy bug 33481 Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullOutputStream.java Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullOutputStream.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullOutputStream.java?view=diffr1=153620r2=153621 == --- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullOutputStream.java (original) +++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullOutputStream.java Sun Feb 13 03:35:42 2005 @@ -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. @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.commons.io.output; import java.io.IOException; @@ -21,22 +20,26 @@ /** * This OutputStream writes all data to the famous b/dev/null/b. - * @author a href=mailto:[EMAIL PROTECTED]Jeremias Maerki/a - * @version $Id: NullOutputStream.java,v 1.4 2004/02/23 04:40:29 bayard Exp $ + * p + * This output stream has no destination (file/socket etc.) and all + * bytes written to it are ignored and lost. + * + * @author Jeremias Maerki + * @version $Id$ */ public class NullOutputStream extends OutputStream { /** * @see java.io.OutputStream#write(byte[], int, int) */ -public synchronized void write(byte[] b, int off, int len) { +public void write(byte[] b, int off, int len) { //to /dev/null } /** * @see java.io.OutputStream#write(int) */ -public synchronized void write(int b) { +public void write(int b) { //to /dev/null } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 33481] - [io] Synchronized methods in NullOutputStream
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=33481. 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=33481 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2005-02-13 12:36 --- Done -- 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]
svn commit: r153622 - jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java
Author: jeremias Date: Sun Feb 13 04:08:41 2005 New Revision: 153622 URL: http://svn.apache.org/viewcvs?view=revrev=153622 Log: Removed TAB characters. Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java?view=diffr1=153621r2=153622 == --- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java (original) +++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java Sun Feb 13 04:08:41 2005 @@ -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. @@ -79,7 +79,7 @@ * @author Martin Cooper * @author a href=mailto:[EMAIL PROTECTED]Jeremias Maerki/a * @author Stephen Colebourne - * @version $Id: FilenameUtils.java,v 1.32 2004/12/10 22:36:56 scolebourne Exp $ + * @version $Id$ * @since Commons IO 1.1 */ public class FilenameUtils { @@ -922,16 +922,16 @@ ArrayList list = new ArrayList(); StringBuffer buffer = new StringBuffer(); for (int i = 0; i array.length; i++) { - if (array[i] == '?' || array[i] == '*') { - if (buffer.length() != 0) { - list.add(buffer.toString()); - buffer.setLength(0); - } - list.add(new String(new char[] { array[i] })); - } else { - buffer.append(array[i]); - } - } +if (array[i] == '?' || array[i] == '*') { +if (buffer.length() != 0) { +list.add(buffer.toString()); +buffer.setLength(0); +} +list.add(new String(new char[] { array[i] })); +} else { +buffer.append(array[i]); +} +} if (buffer.length() != 0) { list.add(buffer.toString()); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153623 - in jakarta/commons/proper/io/trunk: project.xml src/java/org/apache/commons/io/filefilter/FileFilterUtils.java src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java
Author: scolebourne Date: Sun Feb 13 04:09:53 2005 New Revision: 153623 URL: http://svn.apache.org/viewcvs?view=revrev=153623 Log: Fix bug in makeCVSAware that rendered the method useless bug 33023, from Masato Tezuka Modified: jakarta/commons/proper/io/trunk/project.xml jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java Modified: jakarta/commons/proper/io/trunk/project.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/project.xml?view=diffr1=153622r2=153623 == --- jakarta/commons/proper/io/trunk/project.xml (original) +++ jakarta/commons/proper/io/trunk/project.xml Sun Feb 13 04:09:53 2005 @@ -156,11 +156,14 @@ contributors contributor + nameJason Anderson/name +/contributor +contributor nameAlban Peignier/name emailalban.peignier at free.fr/email /contributor contributor - nameJason Anderson/name + nameMasato Tezuka/name /contributor /contributors Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java?view=diffr1=153622r2=153623 == --- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java (original) +++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/FileFilterUtils.java Sun Feb 13 04:09:53 2005 @@ -24,11 +24,12 @@ * every class you use. * * @since Commons IO 1.0 - * @version $Revision: 1.8 $ $Date: 2004/02/23 04:37:57 $ + * @version $Id$ * * @author Henri Yandell * @author Stephen Colebourne * @author Jeremias Maerki + * @author Masato Tezuka */ public class FileFilterUtils { @@ -156,20 +157,21 @@ //--- /* Constructed on demand and then cached */ -private static IOFileFilter cvsFilter = null; +private static IOFileFilter cvsFilter; /** - * Resturns an IOFileFilter that ignores CVS directories. You may optionally + * Returns an IOFileFilter that ignores CVS directories. You may optionally * pass in an existing IOFileFilter in which case it is extended to exclude * CVS directories. - * @param filter IOFileFilter to modify, null if a new IOFileFilter + * @param filter IOFileFilter to wrap, null if a new IOFileFilter * should be created * @return the requested (combined) filter + * @since 1.1 (method existed but had bug in 1.0) */ public static IOFileFilter makeCVSAware(IOFileFilter filter) { if (cvsFilter == null) { -cvsFilter = andFileFilter(directoryFileFilter(), -notFileFilter(nameFileFilter(CVS))); +cvsFilter = notFileFilter( +andFileFilter(directoryFileFilter(), nameFileFilter(CVS))); } if (filter == null) { return cvsFilter; Modified: jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java?view=diffr1=153622r2=153623 == --- jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java (original) +++ jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/FileFilterTestCase.java Sun Feb 13 04:09:53 2005 @@ -17,14 +17,16 @@ import java.io.File; -import junit.framework.TestCase; import junit.framework.TestSuite; import junit.textui.TestRunner; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.testtools.FileBasedTestCase; + /** - * Used to test an unknown FileFilter + * Used to test FileFilterUtils. */ -public class FileFilterTestCase extends TestCase { +public class FileFilterTestCase extends FileBasedTestCase { public FileFilterTestCase(String name) { super(name); @@ -39,9 +41,11 @@ } public void setUp() { +getTestDirectory().mkdirs(); } -public void tearDown() { +public void tearDown() throws Exception { +FileUtils.deleteDirectory(getTestDirectory()); } public void assertFiltering(IOFileFilter filter, File file, boolean expected) throws Exception { @@ -226,6 +230,32 @@ } } - +public void testMakeCVSAware() throws Exception { +IOFileFilter filter1 = FileFilterUtils.makeCVSAware(null); +IOFileFilter filter2 =
DO NOT REPLY [Bug 33023] - [io] IOFileFilter created by FileFilterUtils.makeCVSAware(IOFileFilter) only accept directory
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=33023. 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=33023 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2005-02-13 13:10 --- Applied thanks -- 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]
svn commit: r153629 - in jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient: HttpClientTestBase.java TestProxy.java params/TestHttpParams.java server/SimpleProxy.java
Author: olegk Date: Sun Feb 13 06:06:34 2005 New Revision: 153629 URL: http://svn.apache.org/viewcvs?view=revrev=153629 Log: Tunnelling proxy test cases restructured Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/HttpClientTestBase.java jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestProxy.java jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/params/TestHttpParams.java jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/server/SimpleProxy.java Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/HttpClientTestBase.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/HttpClientTestBase.java?view=diffr1=153628r2=153629 == --- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/HttpClientTestBase.java (original) +++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/HttpClientTestBase.java Sun Feb 13 06:06:34 2005 @@ -1,7 +1,7 @@ /* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/test/org/apache/commons/httpclient/HttpClientTestBase.java,v 1.7 2004/11/07 12:31:42 olegk Exp $ * $Revision: 1.7 $ - * $Date: 2004/11/07 12:31:42 $ + * $Date$ * * * Copyright 1999-2004 The Apache Software Foundation @@ -35,8 +35,13 @@ import junit.framework.TestSuite; import org.apache.commons.httpclient.protocol.Protocol; +import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; import org.apache.commons.httpclient.server.SimpleHttpServer; +import org.apache.commons.httpclient.server.SimplePlainSocketFactory; import org.apache.commons.httpclient.server.SimpleProxy; +import org.apache.commons.httpclient.server.SimpleSocketFactory; +import org.apache.commons.httpclient.ssl.SimpleSSLSocketFactory; +import org.apache.commons.httpclient.ssl.SimpleSSLTestProtocolSocketFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -47,7 +52,7 @@ * * @author Oleg Kalnichevski * - * @version $Id: HttpClientTestBase.java,v 1.7 2004/11/07 12:31:42 olegk Exp $ + * @version $Id$ */ public class HttpClientTestBase extends TestCase { @@ -58,6 +63,7 @@ protected SimpleProxy proxy = null; private boolean useProxy = false; +private boolean useSSL = false; // Constructor public HttpClientTestBase(final String testName) throws IOException { @@ -80,18 +86,40 @@ this.useProxy = useProxy; } +public void setUseSSL(boolean b) { +this.useSSL = b; +} + +public boolean isUseSSL() { +return this.useSSL; +} + // - TestCase setup/shutdown public void setUp() throws IOException { -this.server = new SimpleHttpServer(); // use arbitrary port +// Configure socket factories +SimpleSocketFactory serversocketfactory = null; +Protocol testhttp = null; +if (this.useSSL) { +serversocketfactory = new SimpleSSLSocketFactory(); +testhttp = new Protocol(https, +(ProtocolSocketFactory)new SimpleSSLTestProtocolSocketFactory(), 443); +} else { +serversocketfactory = new SimplePlainSocketFactory(); +testhttp = Protocol.getProtocol(http); +} + +this.server = new SimpleHttpServer(serversocketfactory, 0); // use arbitrary port this.server.setTestname(getName()); this.client = new HttpClient(); + this.client.getHostConfiguration().setHost( -this.server.getLocalAddress(), -this.server.getLocalPort(), -Protocol.getProtocol(http)); -if (useProxy) { +this.server.getLocalAddress(), +this.server.getLocalPort(), +testhttp); + +if (this.useProxy) { this.proxy = new SimpleProxy(); client.getHostConfiguration().setProxy( proxy.getLocalAddress(), Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestProxy.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestProxy.java?view=diffr1=153628r2=153629 == --- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestProxy.java (original) +++
svn commit: r153630 - jakarta/commons/proper/logging/tags/LOGGING_1_0_5_RC1
Author: rdonkin Date: Sun Feb 13 07:16:07 2005 New Revision: 153630 URL: http://svn.apache.org/viewcvs?view=revrev=153630 Log: Tagged release candidate 1.0.5 RC1 Added: jakarta/commons/proper/logging/tags/LOGGING_1_0_5_RC1/ - copied from r153629, jakarta/commons/proper/logging/branches/RELEASE_BRANCH_1_0_5/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153631 - jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/server/TransparentProxyRequestHandler.java
Author: olegk Date: Sun Feb 13 07:16:19 2005 New Revision: 153631 URL: http://svn.apache.org/viewcvs?view=revrev=153631 Log: Removed hardcoded HTTP/1.1 version in the tunnelling proxy code Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/server/TransparentProxyRequestHandler.java Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/server/TransparentProxyRequestHandler.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/server/TransparentProxyRequestHandler.java?view=diffr1=153630r2=153631 == --- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/server/TransparentProxyRequestHandler.java (original) +++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/server/TransparentProxyRequestHandler.java Sun Feb 13 07:16:19 2005 @@ -1,7 +1,7 @@ /* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/test/org/apache/commons/httpclient/server/TransparentProxyRequestHandler.java,v 1.7 2004/12/11 22:35:26 olegk Exp $ * $Revision: 1.7 $ - * $Date: 2004/12/11 22:35:26 $ + * $Date$ * * * @@ -58,6 +58,7 @@ { RequestLine line = request.getRequestLine(); +HttpVersion ver = line.getHttpVersion(); String method = line.getMethod(); if (!CONNECT.equalsIgnoreCase(method)) { return false; @@ -67,7 +68,7 @@ targetSocket = connect(line.getUri()); } catch (IOException e) { SimpleResponse response = new SimpleResponse(); -response.setStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_NOT_FOUND); +response.setStatusLine(ver, HttpStatus.SC_NOT_FOUND); response.setHeader(new Header(Server, test proxy)); response.setBodyString(Cannot connect to + line.getUri()); conn.writeResponse(response); @@ -75,7 +76,7 @@ } SimpleResponse response = new SimpleResponse(); response.setHeader(new Header(Server, test proxy)); -response.setStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, Connection established); +response.setStatusLine(ver, HttpStatus.SC_OK, Connection established); conn.writeResponse(response); SimpleHttpServerConnection target = new SimpleHttpServerConnection(targetSocket); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153637 - in jakarta/commons/proper/digester/branches/digester2/src: java/org/apache/commons/digester2/Path.java java/org/apache/commons/digester2/SupplementaryRuleManager.java test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java
Author: ozeigermann Date: Sun Feb 13 08:16:53 2005 New Revision: 153637 URL: http://svn.apache.org/viewcvs?view=revrev=153637 Log: Moved match methods into supplementary rule manager Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Path.java jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Path.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Path.java?view=diffr1=153636r2=153637 == --- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Path.java (original) +++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/Path.java Sun Feb 13 08:16:53 2005 @@ -142,32 +142,6 @@ localNames.clear(); } -public boolean matches(String pathToMatch) { -if (pathToMatch.charAt(0) == '/') { -// absolute -return getPath().equals(pathToMatch); -} else { -// relative -// XXX looks wrong but protects a match of -// a/b against a path of /gotcha/b, but -// still allows -// a/b to match against /a/b -return getPath().endsWith(/ + pathToMatch); -} -} - -/** - * Checks if this path matches any of the paths given. This means we iterate through - * codepathsToMatch/code and match every entry to this path. - */ -public boolean matchsAny(String[] pathsToMatch) { -for (int i = 0; i pathsToMatch.length; i++) { -if (matches(pathsToMatch[i])) -return true; -} -return false; -} - public String toString() { return getPath(); } Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java?view=diffr1=153636r2=153637 == --- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java (original) +++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java Sun Feb 13 08:16:53 2005 @@ -31,6 +31,32 @@ public class SupplementaryRuleManager extends DefaultRuleManager { +public static boolean matches(String path, String pathToMatch) { +if (pathToMatch.charAt(0) == '/') { +// absolute +return path.equals(pathToMatch); +} else { +// relative +// XXX looks wrong but protects a match of +// a/b against a path of /gotcha/b, but +// still allows +// a/b to match against /a/b +return path.endsWith(/ + pathToMatch); +} +} + +/** + * Checks if this path matches any of the paths given. This means we iterate through + * codepathsToMatch/code and match every entry to this path. + */ +public static boolean matchsAny(String path, String[] pathsToMatch) { +for (int i = 0; i pathsToMatch.length; i++) { +if (matches(path, pathsToMatch[i])) +return true; +} +return false; +} + protected final Action supplementaryAction; protected final Action fallbackAction; Modified: jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java?view=diffr1=153636r2=153637 == --- jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java (original) +++ jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java Sun Feb 13 08:16:53 2005 @@ -44,20 +44,20 @@ public void begin(Context context, String namespace, String name, Attributes attrs) { -Path path = context.getCurrentPath(); -if (path.matches(/root)) { +String path = context.getMatchPath(); +if (SupplementaryRuleManager.matches(path, /root)) {
svn commit: r153638 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java
Author: ozeigermann Date: Sun Feb 13 08:21:25 2005 New Revision: 153638 URL: http://svn.apache.org/viewcvs?view=revrev=153638 Log: Set id property Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java (props changed) Propchange: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java -- Id = SupplementaryRuleManager - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [digester2] Additions
One design goal was to avoid using protected members. The problem here is that using protected for a *member variable* locks us into an implementation forever (a protected member is part of the external api that users can access). I think it preferable to add a public or protected method that provides access to the member rather than exposing the member directly. The method can later get the data in some manner other than reading from a member if we change the implementation. Note that having a method that returns a Map isn't a *whole* lot better. I think what we need is a copy-helper type method rather than exposing the namespace member just so a subclass can copy it. I can't think what the best solution is at the moment, but I feel there's an elegant (and probably fairly well known) solution nearby. How does clone() solve this issue? Note that I have (I think) been rigorous about avoiding protected members in the o.a.c.digester2 package, but not so rigorous in the action subpackage. I think it probably is a good idea to apply this to the action package too, though. In case those member variables really change this would be a general redesign I guess. In this case you might just as well create a copy from DefaultRuleManager maybe called NewDefaultRuleManager or DefaultRuleManager2 or whatever. I agree that passing the information using a method is no better. And having something like a copy helper is not enough as people might want have access to DefaultRuleManager guts in other scenarios as well. === I would suggest that the match method be placed somewhere other than on the Path class. Digester could well provide multiple different matching implementations in future. I think a static method on some XMLIOUtils class might be appropriate. The user's hand-written Action can then choose whether to use that matching algorithm or some other. All that Path currently does is return a String representing the canonical form of the Path, and that seems clean focussed to me. OK. If you think so. Done. === This bit in SupplementaryRuleManager will cause problems I think: public List getMatchingActions(String path) { List actionList = super.getMatchingActions(path); ... if (supplementaryAction != null) { actionList.add(supplementaryAction); } The list the RuleManager returns should not be modified; it is actually an internal data structure. This does point out that DefaultRuleManager I see. You are right. should be a little more defensive, perhaps returning Collections.unmodifiableList(actionList) which would cause the above add call to fail and throw an exception. That would, however, cause an object to be created on each getMatchingActions call, which I would prefer to avoid if possible. How about this instead? public List getMatchingActions(String path) { List actionList = super.getMatchingActions(path); ... if (supplementaryAction != null) { newActionList = new ArrayList(actionList); newActionList.add(supplementaryAction) } I suppose this could be done instead: if (supplementaryAction != null) { if (actionList.contains(supplementaryAction) { // nothing to do, we must have added the // supplementary action to this list earlier } else { // permanently modify DefaultRuleManager's // internal data structure; yecch! actionList.add(action) } } but as the comments indicate, I think that having one class manipulate another's internal data is not in terribly good taste, nor easy to maintain. Got that. I will think about that and provide something new. Why is there only facility for one fallback action, and one supplementary action? Wouldn't having a List of actions for each be no more difficult and potentially more useful? Maybe. Will do so. === On a minor SVN note, the SVN property svn:keywords needs to be set on a file in order to enable expansion of $Id$ into the appropriate text. This can be done manually via: svn propset svn:keywords Id filename It takes a commit to update the repository. I suggest this would be nice to do next time you update the SupplementaryRuleManager class, otherwise that text in the first line of the file will never change. Adding the following to your ~/.subversion/config file will ensure that each .java file that you add to subversion automatically gets $Id$ expansion enabled: [auto-props] *.java = svn:keywords=Id Tried that. Hopefully done now. (2) Why are the guts of Context accessible to the Action as well? They should only be interesting to the Digester core, not to the application. Why not adding an interface that hides the implentation details? Like public interface Context { Path getCurrentPath(); String getMatchPath();
Re: [logging] discovery error handling
On Fri, 2005-02-11 at 21:49, Ceki Gülcü wrote: At 11:25 PM 2/8/2005, you wrote: one of the drawbacks about JCL 1.0.x is the approach to handling errors in the configuration and discovery mechanism. JCL falls down and (in most commons use cases) takes the application with it. it also fails to provide useful diagnostic information. i've been considering for a while adopting a system for error handling which allows a system property to be used to tune the exactly behaviour: classic more would throw runtimes (as per now), silent more would suppress all issues continuing to function as well as it is able and diagnostic would print diagnostic information to System.out. though not all environments would allow system properties to be set, i think that this would improve matters for many common use cases. Considering that logging often doubles as an error reporting system, it must be very robust to begin with. One of the toughest problems addressed in log4j version 1.3 the way log4j logs internally generated messages using itself recursively. In certain special cases, log4j needed a fallback logging API for its own use and that is how UGLI came into being. Coming back to JCL, printing something on the console in case of errors is not enough. JCL must to also return a valid Logger back to the application. valid loggers are pretty easy to return. the problem is that the type of logger may differ from the one the deployer expects. at the moment, JCL just throws a runtime when things go wrong. this can be very annoying. i suspect that this was done as part of the conservative approach to isolating different application in containers. Anyway, before camouflaging errors occurring during Logger retrieval, I'd recommend that you fix the bug exposed by Example 2 in my analysis [1]. In my opinion it cannot be fixed without a major redesign and overhaul of JCL, but maybe I am wrong... this general issued was discussed earlier. i suspect that it would be possible to improve the situation in JCL1 but richard's more sceptical and seems keener to push straight towards JCL2. i think that there's some danger that momentum is starting to slip away so i'm probably not going to look at fix the issue in the 1.0.x stream right now. - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [lang] release strategy
Stephen Colebourne wrote: This is why I ([collections]) use ant for builds and maven only for website building. Basically, IMHO, a src-zip should contain not only the source java, but the source for building a local copy of the website. I agree (that the xdoc should be included in the src distro). This could be done using a maven preGoal: preGoal name=dist:build-src ant:copy todir=${maven.dist.src.assembly.dir}/xdocs ant:fileset dir=xdocs/ /ant:copy /preGoal I don't see this as a big maintenance issue, but could be I am missing Hen's point below. Phil Stephen - Original Message - From: Henri Yandell [EMAIL PROTECTED] Pretty sure Maven doesn't put xdocs in the src zip. If we have to do this, then I think we shouldn't branch for a release, it's going to be too painful to keep the two sites synced. Starting to see negatives to the tying of site to code that Maven does :) Hen On Sun, 13 Feb 2005 01:51:52 -, Stephen Colebourne [EMAIL PROTECTED] wrote: Er, no. The xdocs should be shipped in the src zip file. They are used by people outside Apache building a website. Stephen - Original Message - From: Henri Yandell [EMAIL PROTECTED] Cool. I'll remove the xdocs from the branch. Hen On Sat, 12 Feb 2005 21:39:33 -, Stephen Colebourne [EMAIL PROTECTED] wrote: It needs to be like [collections], but probably not as automated Website is built from trunk. Javadoc of 2.1 release is built from 2.1 branch and copied to server in apidocs-2.1 directory Hyperlink of 2.1 javadoc is inserted into navigation.xml of trunk Stephen - Original Message - From: Henri Yandell [EMAIL PROTECTED] Though now I'm a bit confused about whether the website should exist on the 2.1 branch or not :) Odd as it sounds, I think we should we be releasing code from 2.1 branch, and building the site from trunk. Otherwise it'll be a bit odd I think. Sound insane? Hen On Sat, 12 Feb 2005 15:22:08 -0500, Henri Yandell [EMAIL PROTECTED] wrote: Only question is whether to specify a 0 for the 0th maintenance. Not a big deal though, I've setup the following release branch: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/branches/LANG_2_1_BRANCH the naming matches the syntax we used for 1.0 when making 1.0.1. I know it could be a lot better (especially as SVN doesn't barf on . as CVS does), but I'm going with consistency for the moment. I'll start tweaking that towards a release. Trunk is 2.2-dev now. Hen On Mon, 7 Feb 2005 18:36:13 -0500, Gary Gregory [EMAIL PROTECTED] wrote: Personally, I've always liked the following numbering scheme: Major.Minor.Maintenance. Gary -Original Message- From: Stephen Colebourne [mailto:[EMAIL PROTECTED] Sent: Monday, February 07, 2005 2:08 PM To: Jakarta Commons Developers List Subject: Re: [lang] release strategy Personally I find the three digit release numbers just confusing.I much prefer to reserve the third digit for essential patches. So, I'm happy to have a 2.1-branch, but I want the release to be 2.1, not 2.1.0 or 2.1.1. Stephen - Original Message - From: Henri Yandell [EMAIL PROTECTED] I'm very tempted to try the branch then release strategy, and wondered what people thought about the idea. It might suggest a slight change to the version number style: Create 2.1 branch. Make changes to 2.1 branch until we're ready for release. Tag 2.1 branch with 2.1.0 tag. ... later Change 2.1 branch until we're ready for release Tag 2.1 branch with 2.1.1tag. ... later in parallel Change trunk until we're near a release Create 2.2 branch (or 3.0) Change 2.2 until ready Tag 2.2 with 2.2.0 etc. If we called it 2.1-head or something, it wouldn't need the version change, it just feels more logical to go with a 2.1.0 release than a 2.1 one if we use this style of development. Anyway, it seems to me that this fits us more nowadays. We end up with the text package slowing down because it's not planned for the next release, and having to avoid various other bugzilla requests as they're not wanting to be fixed until later. Any thoughts? Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153643 - jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
Author: olegk Date: Sun Feb 13 09:24:39 2005 New Revision: 153643 URL: http://svn.apache.org/viewcvs?view=revrev=153643 Log: PR #33468 (httpclient doesn't read and parse response from certain types of proxy servers when POST method is used) Changelog: HttpClient no longer flushes the request line and request headers prior to writing the request body if the 'expect: continue' handshake is not used. Contributed by Peter Tolmachov peter.tolmachov at agfa.com Reviewed by Oleg Kalnichevski, Michael Becke Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java?view=diffr1=153642r2=153643 == --- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java (original) +++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java Sun Feb 13 09:24:39 2005 @@ -1,7 +1,7 @@ /* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v 1.222 2005/01/14 21:16:40 olegk Exp $ * $Revision: 1.222 $ - * $Date: 2005/01/14 21:16:40 $ + * $Date$ * * * @@ -92,7 +92,7 @@ * @author a href=mailto:[EMAIL PROTECTED]Gary Gregory/a * @author Christian Kohlschuetter * - * @version $Revision: 1.222 $ $Date: 2005/01/14 21:16:40 $ + * @version $Revision: 1.222 $ $Date$ */ public abstract class HttpMethodBase implements HttpMethod { @@ -1916,8 +1916,6 @@ writeRequestLine(state, conn); writeRequestHeaders(state, conn); conn.writeLine(); // close head -// make sure the status line and headers have been sent -conn.flushRequestOutputStream(); if (Wire.HEADER_WIRE.enabled()) { Wire.HEADER_WIRE.output(\r\n); } @@ -1931,6 +1929,10 @@ if ((expectvalue != null) (expectvalue.compareToIgnoreCase(100-continue) == 0)) { if (ver.greaterEquals(HttpVersion.HTTP_1_1)) { + +// make sure the status line and headers have been sent +conn.flushRequestOutputStream(); + int readTimeout = conn.getParams().getSoTimeout(); try { conn.setSocketTimeout(RESPONSE_WAIT_TIME_MS); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153644 - jakarta/commons/proper/httpclient/trunk/release_notes.txt
Author: olegk Date: Sun Feb 13 09:26:35 2005 New Revision: 153644 URL: http://svn.apache.org/viewcvs?view=revrev=153644 Log: PR #33468 Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/release_notes.txt?view=diffr1=153643r2=153644 == --- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original) +++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Sun Feb 13 09:26:35 2005 @@ -1,3 +1,9 @@ +Changes since Release Candidate 1: + + * 33468 - HttpClient no longer flushes the request line and request headers prior to + writing the request body if the 'expect: continue' handshake is not used + Contributed by Peter Tolmachov peter.tolmachov at agfa.com + Release 3.0 Release Candidate 1 --- Changes since Beta 1: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [pool] Evictor thread
Hi Attila, You have made some good points, included you will find a new evictor implementation with the enhancements you proposed. I didn't want to use interrupt() so I used a wait/notify technique with synchronized blocks. Can you try this version and let me know if it works for you? Cheers Dirk = class Evictor implements Runnable { private boolean _cancelled = false; private long _delay = 0L; public Evictor(long delay) { _delay = delay; } synchronized void cancel() { _cancelled = true; notifyAll(); } synchronized boolean isCancelled() { return _cancelled; } private synchronized void sleep() { if (_delay 0) { long now = System.currentTimeMillis(); long wakeup = now + _delay; while (!isCancelled() (now wakeup)) { try { wait(wakeup - now); } catch (InterruptedException e) { // ignored } now = System.currentTimeMillis(); } } } public void run() { sleep(); while(!isCancelled()) { try { evict(); } catch(Exception e) { // ignored } try { ensureMinIdle(); } catch(Exception e) { // ignored } sleep(); } synchronized(GenericObjectPool.this) { if(null != _evictionCursor) { _evictionCursor.close(); _evictionCursor = null; } } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [lang] release strategy
On Sun, 13 Feb 2005 10:05:36 -0500, Phil Steitz [EMAIL PROTECTED] wrote: Stephen Colebourne wrote: This is why I ([collections]) use ant for builds and maven only for website building. Basically, IMHO, a src-zip should contain not only the source java, but the source for building a local copy of the website. I agree (that the xdoc should be included in the src distro). This could be done using a maven preGoal: preGoal name=dist:build-src ant:copy todir=${maven.dist.src.assembly.dir}/xdocs ant:fileset dir=xdocs/ /ant:copy /preGoal On this particular issue, I think the documentation should be included with the build and not the site. Even more importantly for Collections than for Lang; a Collections 2.1 downloader should not get lots of Collections 3.0 stuff. We don't separate documentation and site though, so I'm -0 for the xdocs being in there and will add them in, it just changes the release strategy. I don't see this as a big maintenance issue, but could be I am missing Hen's point below. If we branch off and do a release from a branch, we have to maintain the branch's site for the release and the trunk's site for our live site. So our previous release strategy makes more sense under this scenario, release from trunk and then tag at the release point. Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32120] - [dbutils] ResultSetIterator should rethrow SQLExceptions as RuntimException
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=32120. 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=32120 [EMAIL PROTECTED] changed: What|Removed |Added Attachment #13575|0 |1 is obsolete|| --- Additional Comments From [EMAIL PROTECTED] 2005-02-13 18:48 --- Created an attachment (id=14272) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14272action=view) Rethrow SQLException as plain RuntimeException This patch does what was asked for in comment 2. Could this be applied? -- 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]
[net] I would like to deprecate a FTPClient.listFiles() method
The introduction of FTPClientConfig a month ago has wrought a certain amount of confusion. There are five FTPClient.listFiles() methods. Two have already been deprecated. The other two are convenience methods and their existence causes confusion. This method is: public FTPFile[] listFiles(String parserKey, String pathname) This method calls initiateListParsing(). If parserKey is null, then the code will look for the __configuration member. The problem arises when the user sets the __configuration member AND calls listFiles with a parserKey. This non-intuively causes the __configuration to be ignored. Since it is possible to set the parserKey through the __configuration, I would like this method to be the preferred way to specify a parser key and the convenience method deprcated. Keep in mind that the no-param listFiles() is the most commonly used and defaults to auto-detection of system type if no configuration has been specified. I also question the utility of public FTPFile[] listFiles(String pathname) but not as strongly. This method is not necessary as it is always possible to call changeWorkingDirectory() before calling listFiles(). What does the team think of these changes? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [lang] release strategy
I get it now -- both points. Need to think about how to separate the docs site gen. Phil Henri Yandell wrote: On this particular issue, I think the documentation should be included with the build and not the site. Even more importantly for Collections than for Lang; a Collections 2.1 downloader should not get lots of Collections 3.0 stuff. We don't separate documentation and site though, so I'm -0 for the xdocs being in there and will add them in, it just changes the release strategy. I don't see this as a big maintenance issue, but could be I am missing Hen's point below. If we branch off and do a release from a branch, we have to maintain the branch's site for the release and the trunk's site for our live site. So our previous release strategy makes more sense under this scenario, release from trunk and then tag at the release point. 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]
svn commit: r153647 - jakarta/commons/proper/configuration/trunk/xdocs/navigation.xml
Author: oheger Date: Sun Feb 13 09:52:22 2005 New Revision: 153647 URL: http://svn.apache.org/viewcvs?view=revrev=153647 Log: Added javadoc to 1.0 release to navigation bar Modified: jakarta/commons/proper/configuration/trunk/xdocs/navigation.xml Modified: jakarta/commons/proper/configuration/trunk/xdocs/navigation.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/xdocs/navigation.xml?view=diffr1=153646r2=153647 == --- jakarta/commons/proper/configuration/trunk/xdocs/navigation.xml (original) +++ jakarta/commons/proper/configuration/trunk/xdocs/navigation.xml Sun Feb 13 09:52:22 2005 @@ -22,8 +22,9 @@ item name=Composite Config Howto href=/howto_compositeconfiguration.html/ item name=Runtime Dependencies href=/dependencies.html/ item name=Roadmap href=/tasks-report.html/ - item name=Javadoc href=/apidocs/index.html/ - item name=CVS href=http://cvs.apache.org/viewcvs/jakarta-commons/configuration// + item name=Javadoc (latest) href=/apidocs/index.html/ + item name=Javadoc (Release 1.0) href=/apidocs_1.0/index.html/ + item name=SVN href=http://svn.apache.org/repos/asf/jakarta/commons/proper/configuration// /menu menu name=Extensions - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 33427] - [configuration] Versioned Javadocs
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=33427. 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=33427 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2005-02-13 19:17 --- I modified the navigation.xml so that we have now two links to Javadocs: One to the latest version in SVN and one to the 1.0 release. I manually copied the 1.0 apidoc on the server. I'd like to know if there is a better way to achieve this. -- 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]
[Jakarta Commons Wiki] Updated: Logging/1.0.5ReleasePlan
Date: 2005-02-13T10:17:43 Editor: RobertBurrellDonkin Wiki: Jakarta Commons Wiki Page: Logging/1.0.5ReleasePlan URL: http://wiki.apache.org/jakarta-commons/Logging/1.0.5ReleasePlan no comment Change Log: -- @@ -6,7 +6,7 @@ == Status == -RELEASE PLAN: release branch taken, starting release candidate preparations +RELEASE PLAN: Release candidate 1 available @@ -78,6 +78,7 @@ Therefore a suitable gap (to allow this testing) will be left between the announcement of the release and the release vote. Committers will be encouraged to test this RC on their own application before VOTEing +1. +''RELEASE CANDIDATE ONE NOW AVAILABLE'' = Post Release = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANNOUNCEMENT] [logging] JCL 1.0.5 Release Candidate 1 Available
commons-logging 1.0.5 release candidate one is now available for download: http://jakarta.apache.org/~rdonkin/commons-logging/. - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 32120] - [dbutils] ResultSetIterator should rethrow SQLExceptions as RuntimException
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=32120. 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=32120 --- Additional Comments From [EMAIL PROTECTED] 2005-02-13 19:52 --- This may break current users of the iterator whether we throw a RuntimeException or a subclass of it. I'm hesitant to break backwards compatibility but supressing the exceptions makes the iterator rather useless anyways. -- 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]
svn commit: r153654 - jakarta/commons/proper/commons-build/trunk/xdocs/releases/release.xml
Author: rdonkin Date: Sun Feb 13 11:02:53 2005 New Revision: 153654 URL: http://svn.apache.org/viewcvs?view=revrev=153654 Log: Converted instructions to subversion Modified: jakarta/commons/proper/commons-build/trunk/xdocs/releases/release.xml Modified: jakarta/commons/proper/commons-build/trunk/xdocs/releases/release.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/commons-build/trunk/xdocs/releases/release.xml?view=diffr1=153653r2=153654 == --- jakarta/commons/proper/commons-build/trunk/xdocs/releases/release.xml (original) +++ jakarta/commons/proper/commons-build/trunk/xdocs/releases/release.xml Sun Feb 13 11:02:53 2005 @@ -60,17 +60,21 @@ subsection name='2 Update CVS to Release Tag' p -The release code should already have been tagged. Update the CVS checkout -(from which the release will be cut) to this tagged version. -/p +The release code should already have been tagged. + A tag (in subversion) is just a history-preserving copy. + To access the tagged code, you need to checkout all directories + for the component, not just the trunk directory. +/p + pre +$ svn co https://svn.apache.org/repos/asf/jakarta/commons/proper/foo + /pre + p + All tags are organized under the codetags/code directory. + + /p pre -$ cd jakarta-commons/foo/ -$ cvs -q up -A -$ cvs -q up -r FOO_1_2 +$ cd foo/tags/FOO_1_2 /pre -p -Check the build number (to make sure that the update worked correctly). This can be found in the codebuild.xml/code file. -/p /subsection subsection name=3 Build Binary Distribution @@ -112,11 +116,7 @@ li Export the tagged release: pre -$ cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login -Logging in to :pserver:[EMAIL PROTECTED]:/home/cvspublic -CVS password: (anoncvs) - -$ cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic export -r FOO_1_2 jakarta-commons +$ svn export https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/tags/FOO_1_2 /pre /li li @@ -197,7 +197,7 @@ p If this is the first release you've cut for this component, then the code signing public key must be added to the a href='#Check KEYS file'codeKEYS/code file for the component/a. -This can be found on Daedelus (www.apache.org) at +This can be found on Minotaur (www.apache.org) at pre /www/www.apache.org/dist/jakarta/commons/logging/foo/KEYS /pre - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[VOTE] [logging] Adopt
i'd like to use an alternative vote process for JCL 1.0.5. http://wiki.apache.org/jakarta-commons/CandidateQualityElection the main difference from the last release is that there will be multiple VOTEs as the release is promoted from candidate through alpha, beta before finally reaching full official release status. AIUI variations of this alternative process are used by other ASF projects (for example, tomcat, struts and httpd) and increase the chances of problems being picked up before the release is given official status. JCL is very widely used and i think would benefit from this treatment. - robert --8-- +1 [ ] Sounds great! +0 [ ] Sounds okay... -0 [ ] Can see some problems doing it this way... -1 [ ] No way! -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31194] - [validator] Investigate removing arg position= attribute
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=31194. 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=31194 --- Additional Comments From [EMAIL PROTECTED] 2005-02-13 20:23 --- The behavior described in comment 14 sounds very reasonable. If I understand it correctly, the rules are: 1. Arg positions are grouped by validator name. 2. If there are default Args, named Args start their positions after the defaults. 3. Specifying a position for an Arg resets the numbering for Args defined below. A user can keep the current functionality by giving each Arg a position and not worrying about the new implied positioning rules. So, I'm ok with applying the patch for this change. -- 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] release strategy
In the long term, yeah. In the short term I'll just do this the old way :) Hen On Sun, 13 Feb 2005 10:50:32 -0500, Phil Steitz [EMAIL PROTECTED] wrote: I get it now -- both points. Need to think about how to separate the docs site gen. Phil Henri Yandell wrote: On this particular issue, I think the documentation should be included with the build and not the site. Even more importantly for Collections than for Lang; a Collections 2.1 downloader should not get lots of Collections 3.0 stuff. We don't separate documentation and site though, so I'm -0 for the xdocs being in there and will add them in, it just changes the release strategy. I don't see this as a big maintenance issue, but could be I am missing Hen's point below. If we branch off and do a release from a branch, we have to maintain the branch's site for the release and the trunk's site for our live site. So our previous release strategy makes more sense under this scenario, release from trunk and then tag at the release point. 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]
Re: JCL problems
On Tue, 2005-02-08 at 11:30, Ceki Gülcü wrote: Richard et al., Before discussing relatively complex cases you mention, I think it would benefit everyone to realize that even in the most basic cases JCL will not work as expected. In your examples you refer to commons-logging-api.jar but commons-logging-api.jar and commons-logging.jar are not equivalent. The former does *not* include the classes org.apache.commons.logging.impl.Log4JLogger nor org.apache.commons.logging.impl.AvalonLogger. Thus, commons-logging-api.jar cannot bridge to log4j, for the simple reason that the bridge, Log4JLogger, is not there. Consider the following simple set up Parent [commons-logging.jar] ^ | Child [log4j.jar] Depending on how the thread context class loader is set,and the delegation model followed by the child loader, the above configuration, in the best case, will ignore log4j and in many other cases will throw a LogConfigurationException. The following set up will not fair much better (regardless of the delegation model): Parent [commons-logging.jar] ^ | Child [commons-logging.jar, log4j.jar] The only setup that will not blow in your face is the following: Parent [commons-logging-api.jar] ^ | Child [commons-logging.jar, log4j.jar] Note this is the set up used by Tomcat. Also note that it precludes the use of log4j by Tomcat itself as commons-logging-api.jar includes support for java.util.logging but not log4j. If you replace commons-logging-api.jar with commons-logging.jar, then you must place log4j.jar next to it unless you enjoy JCL throwing LogConfigurationExceptions at you. The bottom lines is that when compared with any statically bound bridging mechanism found in UGLI, JCL's dynamic discovery brings no added value but has a significant cost in aggravation. Richard, is there a point discussing complex cases when even the simplest ones don't work? Were you aware of problems in the above cases? (i'm not sure whether i'm missing your point.) it seems to me that it matters not whether the discovery is dynamic or static: the log4j library needs to be available in the classloader. static discovery would break in a similar fashion if a required library is not present. from a practical perspective, i don't really see having to put a number of libraries together so that they are loaded by the same classloader is really a restriction. what matters is that there are ways to achieve the required results and definite instructions are available which are easy for deployers to understand. - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VOTE] [logging] Adopt
On Sun, 2005-02-13 at 19:17, robert burrell donkin wrote: missed off my +1 --8-- +1 [X] Sounds great! +0 [ ] Sounds okay... -0 [ ] Can see some problems doing it this way... -1 [ ] No way! -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 33548] New: - CaseInsensitiveMap performance optimization suggestion
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=33548. 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=33548 Summary: CaseInsensitiveMap performance optimization suggestion Product: Commons Version: 3.1 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P4 Component: Collections AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Hi, I have written something similar until I found this class. I plan to use this instead. When browsing the implementation I notice an opportunity to improve performance of this class, and I'd like to make a suggestion. 1) Since this class works on keys of any type, and that only String (OK, maybe StringBuffer) are meaningful when converting to lowercase, it is not necessary to convert every key with key.toString().toLowerCase(). If the key is not of String type, it should just return the object itself. 2) Often times, the same set of keys are used repeatedly, and since String objects are immutable, it might help further optimize the repeating work of converting the same key to lowercase by reusing already converted key objects of String type by caching lowercase keys in an internal map. I am referring to CaseInsensitiveMap.convertKey() Thanks, -- Rick -- 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]
DO NOT REPLY [Bug 33331] - [betwixt] Custom Object-String Conversion in .betwixt file
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=1. 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=1 --- Additional Comments From [EMAIL PROTECTED] 2005-02-13 23:05 --- Hi Matt Thanks for the patch. I've taken a quick look at your code. I think I get the general idea but think that I would prefer an alternative implementation strategy. (Betwixt is a complex beast and it's important to keep an eye on code clarity.) I can't see any unit tests for this functionality or a documentation patch describing this extra feature. Documentation and tests are very important. I find that it frequently takes me as long to create tests and documentation as it does to create the implementation. If you could supply tests and documentation for the feature, it'd reduce the amount of time it'd take me to add this feature which would in turn increase the chance that I'd find time to add it soon. Robert -- 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]
DO NOT REPLY [Bug 33384] - [beanutils] add protected accessor to fundamental map in BeanUtils project
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=33384. 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=33384 --- Additional Comments From [EMAIL PROTECTED] 2005-02-13 23:12 --- Hi Marc Changing access to members means that future changes will be limited by backwards compatibility. So, it's wiser to consider carefully before executing these changes. What would be useful is knowing what members you needed access to and a description of the use case (why you needed access to them). Robert -- 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: [VOTE] [logging] Adopt
+1.. Mvgr, Martin robert burrell donkin wrote: On Sun, 2005-02-13 at 19:17, robert burrell donkin wrote: missed off my +1 --8-- +1 [X] Sounds great! +0 [ ] Sounds okay... -0 [ ] Can see some problems doing it this way... -1 [ ] No way! -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153680 - in jakarta/commons/proper/validator/trunk/src: share/org/apache/commons/validator/Field.java test/org/apache/commons/validator/FieldTest.java
Author: niallp Date: Sun Feb 13 15:50:12 2005 New Revision: 153680 URL: http://svn.apache.org/viewcvs?view=revrev=153680 Log: Re-apply New Patch for Bug 31194 Remove the need to specify an Arg's position Modified: jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/Field.java jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/FieldTest.java Modified: jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/Field.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/Field.java?view=diffr1=153679r2=153680 == --- jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/Field.java (original) +++ jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/validator/Field.java Sun Feb 13 15:50:12 2005 @@ -1,7 +1,7 @@ /* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Field.java,v 1.37 2004/12/07 00:00:15 niallp Exp $ * $Revision: 1.37 $ - * $Date: 2004/12/07 00:00:15 $ + * $Date$ * * * Copyright 2001-2004 The Apache Software Foundation @@ -245,6 +245,8 @@ return; } +determineArgPosition(arg); + this.ensureArgsCapacity(arg); Map argMap = this.args[arg.getPosition()]; @@ -258,6 +260,47 @@ } else { argMap.put(arg.getName(), arg); } + +} + +/** + * Calculate the position of the Arg + */ +private void determineArgPosition(Arg arg) { + +int position = arg.getPosition(); + +// position has been explicity set +if (position = 0) { +return; +} + +// first arg to be added +if (args == null || args.length == 0) { +arg.setPosition(0); +return; +} + +// determine the position of the last argument with +// the same name or the last default argument +String key = arg.getName() == null ? DEFAULT_ARG : arg.getName(); +int lastPosition = -1; +int lastDefault = -1; +for (int i = 0; i args.length; i++) { +if (args[i] != null args[i].containsKey(key)) { +lastPosition = i; +} +if (args[i] != null args[i].containsKey(DEFAULT_ARG)) { +lastDefault = i; +} +} + +if (lastPosition 0) { +lastPosition = lastDefault; +} + +// allocate the next position +arg.setPosition(++lastPosition); } Modified: jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/FieldTest.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/FieldTest.java?view=diffr1=153679r2=153680 == --- jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/FieldTest.java (original) +++ jakarta/commons/proper/validator/trunk/src/test/org/apache/commons/validator/FieldTest.java Sun Feb 13 15:50:12 2005 @@ -1,7 +1,7 @@ /* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/FieldTest.java,v 1.4 2004/11/12 16:02:52 niallp Exp $ * $Revision: 1.4 $ - * $Date: 2004/11/12 16:02:52 $ + * $Date$ * * * Copyright 2001-2004 The Apache Software Foundation @@ -66,23 +66,72 @@ public void testEmptyArgs() { assertEquals(Empty Args(1) , 0, field.getArgs(required).length); -assertEquals(Empty Args(2) , 0, field.getArgs(required).length); + +} +/** + * test Field with only 'default' arguments, no positions specified. + */ +public void testDefaultPositionImplied() { + +field.addArg(createArg(default-position-0)); +field.addArg(createArg(default-position-1)); +field.addArg(createArg(default-position-2)); + +assertEquals(testDefaultPositionImplied(1) , 3, field.getArgs(required).length); +assertEquals(testDefaultPositionImplied(2) , default-position-0, field.getArg(required, 0).getKey()); +assertEquals(testDefaultPositionImplied(3) , default-position-1, field.getArg(required, 1).getKey()); +assertEquals(testDefaultPositionImplied(4) , default-position-2, field.getArg(required, 2).getKey()); } /** - * test Field with only 'default' arguments + * test Field with only 'default' arguments, positions specified. */ -public void testDefaultArgs() { +public void testDefaultUsingPositions() { -
DO NOT REPLY [Bug 31194] - [validator] Investigate removing arg position= attribute
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=31194. 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=31194 [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED Target Milestone|--- |2.1 Alpha 2 --- Additional Comments From [EMAIL PROTECTED] 2005-02-14 00:54 --- Thanks for the feedback. I've applied the patch. Tests should run OK now. Niall -- 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]
svn commit: r153683 - jakarta/commons/proper/validator/trunk/build.properties.sample jakarta/commons/proper/validator/trunk/build.xml
Author: niallp Date: Sun Feb 13 16:20:16 2005 New Revision: 153683 URL: http://svn.apache.org/viewcvs?view=revrev=153683 Log: Update build to reflect current dependencies Modified: jakarta/commons/proper/validator/trunk/build.properties.sample jakarta/commons/proper/validator/trunk/build.xml Modified: jakarta/commons/proper/validator/trunk/build.properties.sample URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/build.properties.sample?view=diffr1=153682r2=153683 == --- jakarta/commons/proper/validator/trunk/build.properties.sample (original) +++ jakarta/commons/proper/validator/trunk/build.properties.sample Sun Feb 13 16:20:16 2005 @@ -1,4 +1,4 @@ -# 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. @@ -12,24 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -# $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/build.properties.sample,v 1.13 2004/09/24 16:04:41 rwinston Exp $ -# $Revision: 1.13 $ -# $Date: 2004/09/24 16:04:41 $ +# $Id$ +# $Rev$ +# $Date$ # - # This is an example build.properties file. Make any changes you need, # and rename this file to build.properties in the same directory that # contains the build.xml file. # - apache.dir=D:/Java/Programs/Apache -# The JAR file containing version 1.6.1 (or later) of the Beanutils package +# The JAR file containing version 1.7.0 (or later) of the Beanutils package # from the Jakarta Commons project. commons-beanutils.jar=../beanutils/dist/commons-beanutils.jar -# The JAR file containing version 2.1 (or later) of the Collections package -# from the Jakarta Commons project. -commons-collections.jar=../collections/dist/commons-collections.jar - -# The JAR file containing version 1.5 (or later) of the Digester package +# The JAR file containing version 1.6 (or later) of the Digester package # from the Jakarta Commons project. commons-digester.jar=../digester/dist/commons-digester.jar Modified: jakarta/commons/proper/validator/trunk/build.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/build.xml?view=diffr1=153682r2=153683 == --- jakarta/commons/proper/validator/trunk/build.xml (original) +++ jakarta/commons/proper/validator/trunk/build.xml Sun Feb 13 16:20:16 2005 @@ -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. @@ -18,7 +18,8 @@ !-- Validator component of the Jakarta Commons Subproject -$Id: build.xml,v 1.34 2004/04/04 13:53:25 rleland Exp $ +$Id$ +$Rev$ $Date$ -- @@ -49,7 +50,6 @@ !-- The locations of necessary jar files -- property name=junit.jar value=${junit.home}/junit.jar/ property name=commons-beanutils.jar value=${beanutils.home}/dist/commons-beanutils.jar/ - property name=commons-collections.jar value=${collections.home}/dist/commons-collections.jar/ property name=commons-digester.jar value=${digester.home}/dist/commons-digester.jar/ property name=commons-logging.jar value=${logging.home}/dist/commons-logging.jar/ @@ -122,7 +122,6 @@ path id=compile.classpath pathelement location=${build.home}/classes/ pathelement location=${commons-beanutils.jar}/ -pathelement location=${commons-collections.jar}/ pathelement location=${commons-digester.jar}/ pathelement location=${commons-logging.jar}/ pathelement location=${oro.jar}/ @@ -137,7 +136,6 @@ pathelement location=${build.home}/classes/ pathelement location=${build.home}/tests/ pathelement location=${commons-beanutils.jar}/ -pathelement location=${commons-collections.jar}/ pathelement location=${commons-digester.jar}/ pathelement location=${commons-logging.jar}/ pathelement location=${oro.jar}/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Validator] svn commit: r153692 -ezmlm-reject, message larger than 100000 bytes
I just made some changes to validator, updating SVN keywords copyright - but the commit message got rejected because it was 10 bytes - forwarding this to dev for info. Niall - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 14, 2005 1:33 AM Subject: failure notice Hi. This is the qmail-send program at apache.org. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. commons-dev@jakarta.apache.org: ezmlm-reject: fatal: Sorry, I don't accept messages larger than 10 bytes (#5.2.3) --- Below this line is a copy of the message. Return-Path: [EMAIL PROTECTED] Received: (qmail 69521 invoked by uid 500); 14 Feb 2005 01:33:47 - Delivered-To: [EMAIL PROTECTED] Received: (qmail 69518 invoked by uid 99); 14 Feb 2005 01:33:47 - X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Sun, 13 Feb 2005 17:33:44 -0800 Received: (qmail 75969 invoked by uid 65534); 14 Feb 2005 01:33:42 - Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Mon, 14 Feb 2005 01:33:42 - Subject: svn commit: r153692 - in jakarta/commons/proper/validator/trunk/src: example/org/apache/commons/validator/example/ javascript/org/apache/commons/validator/javascript/ share/org/apache/commons/validator/ share/org/apache/commons/validator/util/ test/org/apache/commons/validator/ test/org/apache/commons/validator/util/ To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] X-Virus-Checked: Checked Author: niallp Date: Sun Feb 13 17:33:31 2005 New Revision: 153692 URL: http://svn.apache.org/viewcvs?view=3Drevrev=3D153692 Log: Update keywords for SVN and change Copyright to 2005 Modified: jakarta/commons/proper/validator/trunk/src/example/org/apache/commons/v= alidator/example/ValidateBean.java jakarta/commons/proper/validator/trunk/src/example/org/apache/commons/v= alidator/example/ValidateExample.java jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateByte.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateCreditCard.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateDate.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateEmail.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateFloat.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateFloatRange.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateIntRange.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateInteger.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateMask.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateMaxLength.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateMinLength.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateRequired.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateShort.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateUtilities.js jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/Arg.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/CreditCardValidator.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/DateValidator.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/EmailValidator.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/Field.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/Form.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/FormSet.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/GenericTypeValidator.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/GenericValidator.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/ISBNValidator.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val=
[Subversion] Revision Keyword
When Struts moved from CVS to Subversion we changed $Revision$ keyword to $Rev$ which gets replaced with the Revision number. I just did this in Commons Validator but $Rev$ seems to be ignored (Changing $Header$ to $Id$ seems fine). Is the revision number just not available as a keyword in Commons or should I be using something else - or is it working for others and must be something to do with my config? Niall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 33550] New: - [digester] Add support for CallMethodRule with target offset in xml rules
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=33550. 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=33550 Summary: [digester] Add support for CallMethodRule with target offset in xml rules Product: Commons Version: 1.6 Final Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Digester AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] It is currently not possible to specify a target offset on a CallMethodRule when using xml-based rules. The attribute needs to be added to the DTD, and the CallMethodRuleFactory class in DigesterRuleParser needs to be modified. -- 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: [Subversion] Revision Keyword
I think it's something you have to set on the svn partition in question. Unsure exactly how though, seems poor if each new directory would need it to be set. I'm sure others know though, and when they answer I'd like to ask how we do .cvsignore too :) Hen On Mon, 14 Feb 2005 01:52:49 -, Niall Pemberton [EMAIL PROTECTED] wrote: When Struts moved from CVS to Subversion we changed $Revision$ keyword to $Rev$ which gets replaced with the Revision number. I just did this in Commons Validator but $Rev$ seems to be ignored (Changing $Header$ to $Id$ seems fine). Is the revision number just not available as a keyword in Commons or should I be using something else - or is it working for others and must be something to do with my config? Niall - 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: [Subversion] Revision Keyword
Henri Yandell wrote: I think it's something you have to set on the svn partition in question. It's a property. Unsure exactly how though, seems poor if each new directory would need it to be set. Yep, it does, but you can use auto-props in your subversion configuration (some defaults for svn:eol-style are in the version-control document: http://www.apache.org/dev/version-control.html). I have this: *.java = svn:eol-style=native;svn:keywords=Author Date Id Revision This only applies to new files - you'll need to edit the properties for existing ones to add svn:keywords I'm sure others know though, and when they answer I'd like to ask how we do .cvsignore too :) svn propedit svn:ignore . Again, applies only to the current directory. The SVN Red book has some useful information on properties - the chapter is well worth a read. Cheers, Brett Hen On Mon, 14 Feb 2005 01:52:49 -, Niall Pemberton [EMAIL PROTECTED] wrote: When Struts moved from CVS to Subversion we changed $Revision$ keyword to $Rev$ which gets replaced with the Revision number. I just did this in Commons Validator but $Rev$ seems to be ignored (Changing $Header$ to $Id$ seems fine). Is the revision number just not available as a keyword in Commons or should I be using something else - or is it working for others and must be something to do with my config? Niall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 33550] - [digester] Add support for CallMethodRule with target offset in xml rules
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=33550. 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=33550 --- Additional Comments From [EMAIL PROTECTED] 2005-02-14 03:15 --- Created an attachment (id=14275) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14275action=view) patch to DigesterRuleParser and DTD -- 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: [Subversion] Revision Keyword
- Original Message - From: Brett Porter [EMAIL PROTECTED] Yep, it does, but you can use auto-props in your subversion configuration (some defaults for svn:eol-style are in the version-control document: http://www.apache.org/dev/version-control.html). I have this: *.java = svn:eol-style=native;svn:keywords=Author Date Id Revision I configured auto-props when Struts moved to Subversion, but in the struts conversion all the .java files were changed from using $Revision$ to $Rev$ and my auto-props is configured as follows *.java = svn:eol-style=native;svn:keywords=date author id rev I just went through changing Commons Validator from $Revision$ to $Rev$ - does that mean I need to change them back? Shouldn't the keywords be consistent accross all Apache Subversion? Niall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Subversion] Revision Keyword
that's probably a good idea, though as I understand it they are synonymous. - Brett Niall Pemberton wrote: - Original Message - From: Brett Porter [EMAIL PROTECTED] Yep, it does, but you can use auto-props in your subversion configuration (some defaults for svn:eol-style are in the version-control document: http://www.apache.org/dev/version-control.html). I have this: *.java = svn:eol-style=native;svn:keywords=Author Date Id Revision I configured auto-props when Struts moved to Subversion, but in the struts conversion all the .java files were changed from using $Revision$ to $Rev$ and my auto-props is configured as follows *.java = svn:eol-style=native;svn:keywords=date author id rev I just went through changing Commons Validator from $Revision$ to $Rev$ - does that mean I need to change them back? Shouldn't the keywords be consistent accross all Apache Subversion? Niall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153693 - jakarta/commons/proper/lang/branches/LANG_2_1_BRANCH
Author: bayard Date: Sun Feb 13 18:21:28 2005 New Revision: 153693 URL: http://svn.apache.org/viewcvs?view=revrev=153693 Log: going with the old style of releasing from trunk instead of from a branch, so this is a dead branch for the moment Removed: jakarta/commons/proper/lang/branches/LANG_2_1_BRANCH/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Validator] svn commit: r153692 -ezmlm-reject, message larger than 100000 bytes
I'm hoping that by change Copyright to 2005 you really meant change Copyright to *add* 2005. The copyright needs to include, for each file, all years in which the file was created or modified, not just the current year. -- Martin Cooper On Mon, 14 Feb 2005 01:45:17 -, Niall Pemberton [EMAIL PROTECTED] wrote: I just made some changes to validator, updating SVN keywords copyright - but the commit message got rejected because it was 10 bytes - forwarding this to dev for info. Niall - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 14, 2005 1:33 AM Subject: failure notice Hi. This is the qmail-send program at apache.org. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. commons-dev@jakarta.apache.org: ezmlm-reject: fatal: Sorry, I don't accept messages larger than 10 bytes (#5.2.3) --- Below this line is a copy of the message. Return-Path: [EMAIL PROTECTED] Received: (qmail 69521 invoked by uid 500); 14 Feb 2005 01:33:47 - Delivered-To: [EMAIL PROTECTED] Received: (qmail 69518 invoked by uid 99); 14 Feb 2005 01:33:47 - X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Sun, 13 Feb 2005 17:33:44 -0800 Received: (qmail 75969 invoked by uid 65534); 14 Feb 2005 01:33:42 - Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Mon, 14 Feb 2005 01:33:42 - Subject: svn commit: r153692 - in jakarta/commons/proper/validator/trunk/src: example/org/apache/commons/validator/example/ javascript/org/apache/commons/validator/javascript/ share/org/apache/commons/validator/ share/org/apache/commons/validator/util/ test/org/apache/commons/validator/ test/org/apache/commons/validator/util/ To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] X-Virus-Checked: Checked Author: niallp Date: Sun Feb 13 17:33:31 2005 New Revision: 153692 URL: http://svn.apache.org/viewcvs?view=3Drevrev=3D153692 Log: Update keywords for SVN and change Copyright to 2005 Modified: jakarta/commons/proper/validator/trunk/src/example/org/apache/commons/v= alidator/example/ValidateBean.java jakarta/commons/proper/validator/trunk/src/example/org/apache/commons/v= alidator/example/ValidateExample.java jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateByte.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateCreditCard.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateDate.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateEmail.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateFloat.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateFloatRange.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateIntRange.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateInteger.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateMask.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateMaxLength.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateMinLength.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateRequired.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateShort.js jakarta/commons/proper/validator/trunk/src/javascript/org/apache/common= s/validator/javascript/validateUtilities.js jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/Arg.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/CreditCardValidator.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/DateValidator.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/EmailValidator.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/Field.java jakarta/commons/proper/validator/trunk/src/share/org/apache/commons/val= idator/Form.java
Re: [Validator] svn commit: r153692 -ezmlm-reject, message larger than 100000 bytes
Yes, I added it. Niall - Original Message - From: Martin Cooper [EMAIL PROTECTED] Sent: Monday, February 14, 2005 2:36 AM I'm hoping that by change Copyright to 2005 you really meant change Copyright to *add* 2005. The copyright needs to include, for each file, all years in which the file was created or modified, not just the current year. -- Martin Cooper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Subversion] Revision Keyword
Just to expand on Brett's reply: Keywords in subversion files are not expanded unless that file has the keyword-name in the svn:keywords property associated with that file. The svn:keywords property can be set using: svn propset svn:keywords Id Rev filename svn commit filename I presume you can update multiple files at the same time; I just haven't tried You can automatically ensure the svn:keywords property gets set on files you add to subversion by editing your ~/.subversion/config file: [miscellany] enable-auto-props = yes [auto-props] *.java = svn:keywords=Id Rev And you can get subversion commands to ignore certain files by setting the global-ignores entry in ~/.subversion/config. I have the following: [miscellany] global-ignores = *.o *.lo *.la .*~ *~ .#* *.class .*.marks Subversion keywords are described in the subversion documentation: http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.4 Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Subversion] Revision Keyword
Any hints for a Subclipse user where the 'default config location' is? On Mon, 14 Feb 2005 16:07:24 +1300, Simon Kitching [EMAIL PROTECTED] wrote: Just to expand on Brett's reply: Keywords in subversion files are not expanded unless that file has the keyword-name in the svn:keywords property associated with that file. The svn:keywords property can be set using: svn propset svn:keywords Id Rev filename svn commit filename I presume you can update multiple files at the same time; I just haven't tried You can automatically ensure the svn:keywords property gets set on files you add to subversion by editing your ~/.subversion/config file: [miscellany] enable-auto-props = yes [auto-props] *.java = svn:keywords=Id Rev And you can get subversion commands to ignore certain files by setting the global-ignores entry in ~/.subversion/config. I have the following: [miscellany] global-ignores = *.o *.lo *.la .*~ *~ .#* *.class .*.marks Subversion keywords are described in the subversion documentation: http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.4 Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.multitask.com.au/people/dion/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Subversion] Revision Keyword
Yep, that's it. Thanks. On Mon, 14 Feb 2005 14:07:39 +1100, Brett Porter [EMAIL PROTECTED] wrote: Given that it uses the same libraries as the native Subversion client build, it is most likely: c:\documents and settings\USER\Application Data\Subversion\config or something like that - it may not be in Application Data. You should be able to find it from your home directory. On Unix/cygwin subversion: ~/.subversion/config Cheers, Brett Dion Gillard wrote: Any hints for a Subclipse user where the 'default config location' is? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.multitask.com.au/people/dion/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [net] I would like to deprecate a FTPClient.listFiles() method
Steve Cohen wrote: The introduction of FTPClientConfig a month ago has wrought a certain amount of confusion. There are five FTPClient.listFiles() methods. Two have already been deprecated. The other two are convenience methods and their existence causes confusion. This method is: public FTPFile[] listFiles(String parserKey, String pathname) This method calls initiateListParsing(). If parserKey is null, then the code will look for the __configuration member. The problem arises when the user sets the __configuration member AND calls listFiles with a parserKey. This non-intuively causes the __configuration to be ignored. Since it is possible to set the parserKey through the __configuration, I would like this method to be the preferred way to specify a parser key and the convenience method deprcated. Keep in mind that the no-param listFiles() is the most commonly used and defaults to auto-detection of system type if no configuration has been specified. I'm OK with this one, make sense to me. I also question the utility of public FTPFile[] listFiles(String pathname) but not as strongly. This method is not necessary as it is always possible to call changeWorkingDirectory() before calling listFiles(). Unless I'm mistaken, the above doesn't change directories then call listfiles() though. So I'd need to have: changeWorkingDirectory(path); listFiles(); changeWorkingDirectory(backToWhereWeWere); Although I've had problems *without* doing the above (VMS), I'd like to see the method left in there. -- = 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]
DO NOT REPLY [Bug 33553] New: - Cache DatabaseConfiguration values for higher performance
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=33553. 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=33553 Summary: Cache DatabaseConfiguration values for higher performance Product: Commons Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Configuration AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] The DatabaseConfiguration class queries each property as it gets the request for each property. This is nice for ensuring that you're always up to date, but it doesn't give very good performance in enterprise applications, where the database may not be on the same subnet. What we need is the ability to hit the database once, get all the keys/values and then serve up getString etc. from that cache. I'll be opening a separate enhancement to have a generic Reloading Strategy which could then be applied to this caching DatabaseConfiguration approach. -- 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]
DO NOT REPLY [Bug 33553] - Cache DatabaseConfiguration values for higher performance
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=33553. 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=33553 --- Additional Comments From [EMAIL PROTECTED] 2005-02-14 07:07 --- Created an attachment (id=14276) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14276action=view) Patch to implement this. This patch, in addition to implementing the caching DB behavior, also corrects a minor bug in closeQuietly, where a SQLException in the stmnt.close() call would prevent the connection from ever being closed. -- 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]
DO NOT REPLY [Bug 33553] - Cache DatabaseConfiguration values for higher performance
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=33553. 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=33553 [EMAIL PROTECTED] changed: What|Removed |Added Attachment #14276|0 |1 is obsolete|| --- Additional Comments From [EMAIL PROTECTED] 2005-02-14 07:45 --- Created an attachment (id=14277) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=14277action=view) Patch to implement this. This one checks out clean in checkstyle. -- 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]
svn commit: r153727 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DefaultRuleManager.java
Author: ozeigermann Date: Sun Feb 13 23:13:25 2005 New Revision: 153727 URL: http://svn.apache.org/viewcvs?view=revrev=153727 Log: - Rigid protection of guts by making member variables private and passing umodifiable list back from getMatchingActions. - Added copy contructor to allow copying of member variables from sub classes Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DefaultRuleManager.java Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DefaultRuleManager.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DefaultRuleManager.java?view=diffr1=153726r2=153727 == --- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DefaultRuleManager.java (original) +++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/DefaultRuleManager.java Sun Feb 13 23:13:25 2005 @@ -19,6 +19,7 @@ package org.apache.commons.digester2; +import java.util.Collections; import java.util.Map; import java.util.HashMap; import java.util.List; @@ -58,37 +59,56 @@ * Map of namespace-prefix to namespace-uri, used only by the * addAction() method. */ -protected HashMap namespaces = new HashMap(); +private HashMap namespaces = new HashMap(); /** * The list of all actions in the cache. This set allows us to * iterate over the set of actions to invoke the startParse/finishParse * methods. */ -protected ArrayList actions = new ArrayList(20); +private ArrayList actions = new ArrayList(20); /** * Map of expanded-pattern - list-of-actions, so that we can * find the pattern that matches the current xml element, then * return the list of actions. */ -protected MultiHashMap rules = new MultiHashMap(); +private MultiHashMap rules = new MultiHashMap(); + +// - +// Ctor +// - + +/** + * Default ctor. + */ +public DefaultRuleManager() { +} + +/** + * Returns a clone of this object. The Action objects currently + * registered are not copied, as Action objects are required to be + * re-entrant and thread-safe. + */ +public DefaultRuleManager(DefaultRuleManager manager) { +this.namespaces = (HashMap) manager.namespaces.clone(); +this.actions = (ArrayList) manager.actions.clone(); +this.rules = (MultiHashMap) manager.rules.clone(); +} + + // - // Public Methods // - /** - * Return a clone of this object. The Action objects currently + * Returns a clone of this object. The Action objects currently * registered are not copied, as Action objects are required to be * re-entrant and thread-safe. */ public RuleManager copy() { -DefaultRuleManager copy = new DefaultRuleManager(); -copy.namespaces = (HashMap) this.namespaces.clone(); -copy.actions = (ArrayList) this.actions.clone(); -copy.rules = (MultiHashMap) this.rules.clone(); -return copy; +return new DefaultRuleManager(this); } /** @@ -229,7 +249,7 @@ return java.util.Collections.EMPTY_LIST; } else { -return actionList; +return Collections.unmodifiableList(actionList); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153728 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/FallbackRuleManager.java
Author: ozeigermann Date: Sun Feb 13 23:13:53 2005 New Revision: 153728 URL: http://svn.apache.org/viewcvs?view=revrev=153728 Log: Added intial version of rule manager with default actions Added: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/FallbackRuleManager.java Added: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/FallbackRuleManager.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/FallbackRuleManager.java?view=autorev=153728 == --- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/FallbackRuleManager.java (added) +++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/FallbackRuleManager.java Sun Feb 13 23:13:53 2005 @@ -0,0 +1,79 @@ +/* $Id: DefaultRuleManager.java 153050 2005-02-09 12:12:28Z skitching $ + * + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package org.apache.commons.digester2; + +import java.util.Collections; +import java.util.List; +import java.util.ArrayList; + +/** + * @see DefaultRuleManager + */ +public class FallbackRuleManager extends DefaultRuleManager { + +protected final List fallbackActions; +protected List unmodifiableFallbackActions; + +public FallbackRuleManager(List fallbackActions) { +this.fallbackActions = fallbackActions; +unmodifiableFallbackActions = Collections.unmodifiableList(fallbackActions); +} + +public FallbackRuleManager() { +this(new ArrayList()); +} + +public FallbackRuleManager(FallbackRuleManager manager) { +this(manager.fallbackActions); +} + +/** + * @see DefaultRuleManager#copy() + */ +public RuleManager copy() { +return new FallbackRuleManager(this); +} + +/** + * @see DefaultRuleManager#getMatchingActions(String) + */ +public List getMatchingActions(String path) { +List actionList = super.getMatchingActions(path); +if (actionList == Collections.EMPTY_LIST fallbackActions != null fallbackActions.size() != 0) { +return unmodifiableFallbackActions; +} else { +return actionList; +} +} + +public void addFallbackAction(Action action) { +fallbackActions.add(action); +unmodifiableFallbackActions = Collections.unmodifiableList(fallbackActions); +} + +public boolean removeFallbackAction(Action action) { +boolean removed = fallbackActions.remove(action); +unmodifiableFallbackActions = Collections.unmodifiableList(fallbackActions); +return removed; +} + +public List getFallbackActions() { +return unmodifiableFallbackActions; +} +} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r153729 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java
Author: ozeigermann Date: Sun Feb 13 23:15:11 2005 New Revision: 153729 URL: http://svn.apache.org/viewcvs?view=revrev=153729 Log: - Takes account of the explicitely unmodifiable list returned by DefaultRuleManager and does a wild mixture of caching and concatenating the list returned from DefaultRuleManager and its own list of supplementary actions. - Inherits from FallbackRuleManager Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java?view=diffr1=153728r2=153729 == --- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java (original) +++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/SupplementaryRuleManager.java Sun Feb 13 23:15:11 2005 @@ -19,17 +19,19 @@ package org.apache.commons.digester2; +import java.util.AbstractList; +import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; -import java.util.ArrayList; +import java.util.Map; /** * @see DefaultRuleManager */ -public class SupplementaryRuleManager extends DefaultRuleManager { +public class SupplementaryRuleManager extends FallbackRuleManager { public static boolean matches(String path, String pathToMatch) { if (pathToMatch.charAt(0) == '/') { @@ -57,39 +59,25 @@ return false; } -protected final Action supplementaryAction; -protected final Action fallbackAction; +protected final List supplementaryActions; +protected final Map path2ActionsMap = new HashMap(); -protected final List fallbackList = new ArrayList(); +public SupplementaryRuleManager(List supplementaryActions) { +this.supplementaryActions = supplementaryActions; +} -public SupplementaryRuleManager(Action supplementaryAction) { -this(supplementaryAction, null); +public SupplementaryRuleManager(List supplementaryActions, List fallbackActions) { +super(fallbackActions); +this.supplementaryActions = supplementaryActions; } -public SupplementaryRuleManager(Action supplementaryAction, Action fallbackAction) { - -if (fallbackAction == null supplementaryAction == null) { -throw new IllegalArgumentException( -Both parameters set to null makes no sense. Use DefaultRuleManager instead.); -} - -this.supplementaryAction = supplementaryAction; -this.fallbackAction = fallbackAction; - -if (fallbackAction != null) { -fallbackList.add(fallbackAction); -} - -if (supplementaryAction != null) { -fallbackList.add(supplementaryAction); -} +public SupplementaryRuleManager() { +this(new ArrayList()); } public SupplementaryRuleManager(SupplementaryRuleManager manager) { -this(manager.supplementaryAction, manager.fallbackAction); -this.namespaces = (HashMap) manager.namespaces.clone(); -this.actions = (ArrayList) manager.actions.clone(); -this.rules = (MultiHashMap) manager.rules.clone(); +super(manager); +this.supplementaryActions = manager.supplementaryActions; } /** @@ -99,31 +87,73 @@ return new SupplementaryRuleManager(this); } +public void addRule(String pattern, Action action) throws InvalidRuleException { +super.addRule(pattern, action); +invalidateCache(); +} + +public void addFallbackAction(Action action) { +super.addFallbackAction(action); +invalidateCache(); +} + +public void addSupplementaryAction(Action action) { +supplementaryActions.add(action); +invalidateCache(); +} + /** * @see DefaultRuleManager#getMatchingActions(String) */ public List getMatchingActions(String path) { + +List completeList = (List) path2ActionsMap.get(path); +if (completeList != null) { +return completeList; +} + List actionList = super.getMatchingActions(path); -if (actionList == Collections.EMPTY_LIST) { -return fallbackList; -} -if (supplementaryAction != null) { -actionList.add(supplementaryAction); +if (supplementaryActions.size() != 0) { +if (actionList == Collections.EMPTY_LIST) { +completeList = Collections.unmodifiableList(supplementaryActions); +} else { +
svn commit: r153730 - jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java
Author: ozeigermann Date: Sun Feb 13 23:15:49 2005 New Revision: 153730 URL: http://svn.apache.org/viewcvs?view=revrev=153730 Log: Individual basic test cases for fallback and supplementary rule manager Modified: jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java Modified: jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java?view=diffr1=153729r2=153730 == --- jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java (original) +++ jakarta/commons/proper/digester/branches/digester2/src/test/org/apache/commons/digester2/SupplementaryRuleManagerTestCase.java Sun Feb 13 23:15:49 2005 @@ -25,7 +25,6 @@ import org.xml.sax.Attributes; import org.xml.sax.InputSource; -import org.xml.sax.XMLReader; /** * p @@ -35,27 +34,33 @@ public class SupplementaryRuleManagerTestCase extends TestCase { +private static class NullAction extends AbstractAction { +} + private static class XMLLikeAction extends AbstractAction { - + boolean rootFoundAbsolute = false; + boolean rootFoundRelative = false; + boolean wrongRelativeFound = false; + boolean longAbsoluteFound = false; - + public void begin(Context context, String namespace, String name, Attributes attrs) { String path = context.getMatchPath(); if (SupplementaryRuleManager.matches(path, /root)) { rootFoundAbsolute = true; -} - +} + if (SupplementaryRuleManager.matches(path, root)) { rootFoundRelative = true; } if (SupplementaryRuleManager.matches(path, /root/p/em)) { longAbsoluteFound = true; -} +} if (SupplementaryRuleManager.matches(path, ot/p)) { wrongRelativeFound = true; @@ -106,27 +111,52 @@ // Individual Test Methods // -public void testGlobalCallBack() throws Exception { +public void testFallback() throws Exception { String inputText = rootpHi emThere/em/p/root; InputSource source = new InputSource(new StringReader(inputText)); +// xmlio-style digester +XMLLikeAction xmlioLikeAction = new XMLLikeAction(); + +FallbackRuleManager manager = new FallbackRuleManager(); +manager.addFallbackAction(xmlioLikeAction); +manager.addRule(/root/p/em, new NullAction()); + Digester d = new Digester(); +d.setRuleManager(manager); +d.parse(source); -XMLReader reader = d.getXMLReader(); +assertTrue(Root element was found absolute, xmlioLikeAction.rootFoundAbsolute); +assertTrue(Root element was found relative, xmlioLikeAction.rootFoundRelative); +assertFalse(Long absolute path was found by other rule, xmlioLikeAction.longAbsoluteFound); +assertFalse(Incomplete relative was not found, xmlioLikeAction.wrongRelativeFound); + +} + +public void testSupplementary() throws Exception { +String inputText = rootpHi emThere/em/p/root; // xmlio-style digester -XMLLikeAction xmlioLikeHandler = new XMLLikeAction(); +XMLLikeAction xmlioLikeAction = new XMLLikeAction(); + +SupplementaryRuleManager manager = new SupplementaryRuleManager(); +manager.addSupplementaryAction(xmlioLikeAction); +manager.addRule(root, new NullAction()); -RuleManager manager = new SupplementaryRuleManager(xmlioLikeHandler); +Digester d = new Digester(); d.setRuleManager(manager); -d.parse(source); +// try twice to check caching +for (int i = 0; i 2; i++) { +InputSource source = new InputSource(new StringReader(inputText)); +d.parse(source); + +assertTrue(Root element was found absolute, xmlioLikeAction.rootFoundAbsolute); +assertTrue(Root element was found relative, xmlioLikeAction.rootFoundRelative); +assertTrue(Long absolute path was found, xmlioLikeAction.longAbsoluteFound); +assertFalse(Incomplete relative was not found, xmlioLikeAction.wrongRelativeFound); +} -assertTrue(Root element was found absolute, xmlioLikeHandler.rootFoundAbsolute); -assertTrue(Root element was found relative, xmlioLikeHandler.rootFoundRelative); -assertTrue(Long absolute path was found, xmlioLikeHandler.longAbsoluteFound); -assertFalse(Incomplete relative was
Re: [digester2] Additions
[update] - now all member variables of DefaultRuleManager are private - introduced copy ctor for copying members from subclasses - DefaultRuleManager now returns an unmodifiable list upon getMatchingActions - created a new FallbackRuleManager class that only takes care about fallback actions - SupplementaryRuleManager now takes account of the explicitely unmodifiable list returned by DefaultRuleManager and does a wild mixture of caching and concatenating the list returned from DefaultRuleManager and its own list of supplementary actions - Both FallbackRuleManager and SupplementaryRuleManager now can have several callback actions - Still docs and tests need improvement - will do so once the code seems somewhat stable Comments? Oliver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]