DO NOT REPLY [Bug 39393] - [validator] ValidatorAction needs thread-safe
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39393. 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=39393 --- Additional Comments From [EMAIL PROTECTED] 2006-04-30 06:07 --- Henri, Yes, I had an exception related this issue. Here is an exception below. [2006/04/06 16:00:07.727][ERROR][ValidatorForm 112 line ]com.example.validator.FieldChecks.validateId(java.lang.Object, null, null, null, null, null) org.apache.commons.validator.ValidatorException: com.example.validator.FieldChecks.validateId(java.lang.Object, null, null, null, null, null) at org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:627) at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:557) at org.apache.commons.validator.Field.validateForRule(Field.java:827) at org.apache.commons.validator.Field.validate(Field.java:907) at org.apache.commons.validator.Form.validate(Form.java:174) at org.apache.commons.validator.Validator.validate(Validator.java:367) at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:110) at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:928) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:204) I use commons-validator 1.1.4 with Struts 1.2.7. This exception wasn't occured when I accessed with browser. It was occured under the load testing with JMeter. So, I can't attach the unit test code. In my opiniton, the three load methods needs synchronization. I modified the code with this patch and ran the load tests. Any exception wasn't occured. You are right. if (validationMethod == null) is added for performance. I understood that the goal of three load methods was preparing validationMethod variable, right? I want to remove unnecessary synchronization after preparing validationMethod. Regards, -- 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 39449] - [collections] Alternate implementations of ResettableIterator
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=39449. 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=39449 [EMAIL PROTECTED] changed: What|Removed |Added Summary|Alternate implementations of|[collections] Alternate |ResettableIterator |implementations of ||ResettableIterator -- 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 39375] - [vfs] VFS is not able to rename or move read-only files
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=39375. 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=39375 --- Additional Comments From [EMAIL PROTECTED] 2006-04-30 07:17 --- Hi Mario, currently I'm using linux on XFS. For the code I'm giving to you, I'm currently executing it as user [kiuma], but the file I'm moving belongs to user [anotheruser]. Permissions on file as follow: -rw-r--r-- 1 anotheruser users 0 30 apr 09:06 filetomove Here it is the code: public class TestLocalFS extends LoggedTestCase { protected void setUp() throws Exception { super.setUp(); } protected void tearDown() throws Exception { super.tearDown(); } public void testLocalFileMove() throws Exception { String dir = file:///home/kiuma/temp/; String file1 = dir + filetomove; String file2 = dir + filetomove2; FileSystemManager fsManager = VFS.getManager(); FileObject fo2 = fsManager.resolveFile(file2 ); FileObject fo = fsManager.resolveFile(file1 ); try { if (fo.exists()) { fo.moveTo(fo2); } else { fo2.moveTo(fo); } } finally { fo.close(); fo2.close(); } } } The problem disappear if I replace: if (fo.exists()) { fo.moveTo(fo2); } else { fo2.moveTo(fo); } with if (fo.exists()) { fo.moveTo(fo2); } else if (fo2.exists()) { fo2.moveTo(fo); } I hope this can help you, kiuma -- 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: r398293 - /jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/substitution/VariableAttributes.java
Author: skitching Date: Sun Apr 30 00:24:27 2006 New Revision: 398293 URL: http://svn.apache.org/viewcvs?rev=398293view=rev Log: Trivial javadoc fix Modified: jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/substitution/VariableAttributes.java Modified: jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/substitution/VariableAttributes.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/substitution/VariableAttributes.java?rev=398293r1=398292r2=398293view=diff == --- jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/substitution/VariableAttributes.java (original) +++ jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/substitution/VariableAttributes.java Sun Apr 30 00:24:27 2006 @@ -26,7 +26,7 @@ /** * pWrapper for an org.xml.sax.Attributes object which expands any * variables referenced in the attribute value via ${foo} or similar. - * This is only done something actually asks for the attribute value, + * This is only done when something actually asks for the attribute value, * thereby imposing no performance penalty if the attribute is not used./p * * @since 1.6 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398305 - /jakarta/commons/proper/digester/trunk/RELEASE-NOTES.txt
Author: skitching Date: Sun Apr 30 03:17:16 2006 New Revision: 398305 URL: http://svn.apache.org/viewcvs?rev=398305view=rev Log: Note Digester works with recent Kaffe/GNU-classpath releases. Add note on (partially) resolved bug#37034 Modified: jakarta/commons/proper/digester/trunk/RELEASE-NOTES.txt Modified: jakarta/commons/proper/digester/trunk/RELEASE-NOTES.txt URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/trunk/RELEASE-NOTES.txt?rev=398305r1=398304r2=398305view=diff == --- jakarta/commons/proper/digester/trunk/RELEASE-NOTES.txt (original) +++ jakarta/commons/proper/digester/trunk/RELEASE-NOTES.txt Sun Apr 30 03:17:16 2006 @@ -34,6 +34,12 @@ NEW FEATURES = +Kaffe/GNU-Classpath compatibility +--- +All Digester unit tests now pass with the Kaffe 1.1.6 JVM. It is expected +that Digester works with other free Java implementations that also use the +GNU Classpath libraries. + Xmlrules Enhancements -- The xmlrules module has had the following updates to provide access @@ -47,6 +53,11 @@ Reports Addressed -- +* Bugzilla #37034 raises issue with jarfiles being locked on Windows machines. + A bug in Sun's java libraries can cause a jarfile to become locked + when a jarfile is the source of an xml or dtd file used by Digester. + In particular, this can cause problems when redeploying a J2EE webapp. + A workaround for the Sun bug has been added to Digester to resolve this. Fixes without Bugzilla entries -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398306 - in /jakarta/commons/proper/digester/trunk/src: java/org/apache/commons/digester/ test/org/apache/commons/digester/
Author: skitching Date: Sun Apr 30 03:19:12 2006 New Revision: 398306 URL: http://svn.apache.org/viewcvs?rev=398306view=rev Log: Add new Digester.setStackAction feature; this allows user code to monitor the digester stacks. In particular it helps with tracking info on xml file source for created objects. Added: jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/StackAction.java (with props) jakarta/commons/proper/digester/trunk/src/test/org/apache/commons/digester/LocationTrackerTestCase.java (with props) Modified: jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/Digester.java jakarta/commons/proper/digester/trunk/src/test/org/apache/commons/digester/DigesterTestCase.java Modified: jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/Digester.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/Digester.java?rev=398306r1=398305r2=398306view=diff == --- jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/Digester.java (original) +++ jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/Digester.java Sun Apr 30 03:19:12 2006 @@ -340,6 +340,12 @@ */ private ContentHandler customContentHandler = null; +/** + * Object which will receive callbacks for every pop/push action + * on the default stack or named stacks. + */ +private StackAction stackAction = null; + // - Properties /** @@ -1013,6 +1019,14 @@ customContentHandler = handler; } +public void setStackAction(StackAction stackAction) { + this.stackAction = stackAction; +} + +public StackAction getStackAction() { + return stackAction; +} + // - ContentHandler Methods @@ -2622,7 +2636,11 @@ public Object pop() { try { -return (stack.pop()); + Object popped = stack.pop(); + if (stackAction != null) { + popped = stackAction.onPop(this, null, popped); + } +return popped; } catch (EmptyStackException e) { log.warn(Empty stack (returning null)); return (null); @@ -2638,11 +2656,14 @@ */ public void push(Object object) { +if (stackAction != null) { + object = stackAction.onPush(this, null, object); +} + if (stack.size() == 0) { root = object; } stack.push(object); - } /** @@ -2655,6 +2676,10 @@ * @since 1.6 */ public void push(String stackName, Object value) { +if (stackAction != null) { + value = stackAction.onPush(this, stackName, value); +} + ArrayStack namedStack = (ArrayStack) stacksByName.get(stackName); if (namedStack == null) { namedStack = new ArrayStack(); @@ -2669,7 +2694,7 @@ * pstrongNote:/strong a stack is considered empty * if no objects have been pushed onto it yet./p * - * @param stackName the name of the stack from which the top value is to be popped + * @param stackName the name of the stack from which the top value is to be popped. * @return the top codeObject/code on the stack or or null if the stack is either * empty or has not been created yet * @throws EmptyStackException if the named stack is empty @@ -2684,11 +2709,14 @@ log.debug(Stack ' + stackName + ' is empty); } throw new EmptyStackException(); - -} else { +} -result = namedStack.pop(); +result = namedStack.pop(); + +if (stackAction != null) { + result = stackAction.onPop(this, stackName, result); } + return result; } Added: jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/StackAction.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/StackAction.java?rev=398306view=auto == --- jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/StackAction.java (added) +++ jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/StackAction.java Sun Apr 30 03:19:12 2006 @@ -0,0 +1,75 @@ +/* $Id$ + * + * Copyright 2006 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 + *
svn commit: r398309 - /jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/Digester.java
Author: skitching Date: Sun Apr 30 03:28:11 2006 New Revision: 398309 URL: http://svn.apache.org/viewcvs?rev=398309view=rev Log: Add javadoc for new methods. Modified: jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/Digester.java Modified: jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/Digester.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/Digester.java?rev=398309r1=398308r2=398309view=diff == --- jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/Digester.java (original) +++ jakarta/commons/proper/digester/trunk/src/java/org/apache/commons/digester/Digester.java Sun Apr 30 03:28:11 2006 @@ -1019,10 +1019,21 @@ customContentHandler = handler; } +/** + * Define a callback object which is invoked whever an object is pushed onto + * a digester object stack, or popped off one. + * + * @since 1.7.1 + */ public void setStackAction(StackAction stackAction) { this.stackAction = stackAction; } +/** + * See setStackAction. + * + * @since 1.7.1 + */ public StackAction getStackAction() { return stackAction; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]: Project commons-jelly-tags-jsl-test (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-jsl-test has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 141 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-jsl-test : Commons Jelly Full details are available at: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-jsl-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -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/jsl/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/project.xml -DEBUG- Maven project properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/project.properties -INFO- Project Reports in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/target/test-reports The following work was performed: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-jsl-test/gump_work/build_commons-jelly_commons-jelly-tags-jsl-test.html Work Name: build_commons-jelly_commons-jelly-tags-jsl-test (Type: Build) Work ended in a state of : Failed Elapsed: 17 secs Command Line: maven --offline jar [Working Directory: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl] CLASSPATH: /opt/jdk1.5/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/jakarta-commons/cli/target/commons-cli-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/target/commons-jelly-tags-ant-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/log/target/commons-jelly-tags-log-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-30042006.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/packages/jaxen-1.1-beta-4/jaxen-1.1-beta-4.jar - [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262) [junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) [junit] at org.apache.commons.jelly.TagSupport.getBodyText(TagSupport.java:234) [junit] at org.apache.commons.jelly.tags.core.SetTag.doTag(SetTag.java:90) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) [junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) [junit] at org.apache.commons.jelly.tags.jsl.TemplateTag$1.run(TemplateTag.java:160) [junit] at org.dom4j.rule.Mode.fireRule(Mode.java:59) [junit] at org.dom4j.rule.Mode.applyTemplates(Mode.java:80) [junit] at org.dom4j.rule.RuleManager$1.run(RuleManager.java:171) [junit] at org.dom4j.rule.Mode.fireRule(Mode.java:59) [junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:102) [junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:91) [junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:78) [junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:71) [junit] at
[EMAIL PROTECTED]: Project commons-jelly-tags-jsl-test (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-jsl-test has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 141 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-jsl-test : Commons Jelly Full details are available at: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-jsl-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -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/jsl/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/project.xml -DEBUG- Maven project properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/project.properties -INFO- Project Reports in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/target/test-reports The following work was performed: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-jsl-test/gump_work/build_commons-jelly_commons-jelly-tags-jsl-test.html Work Name: build_commons-jelly_commons-jelly-tags-jsl-test (Type: Build) Work ended in a state of : Failed Elapsed: 17 secs Command Line: maven --offline jar [Working Directory: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl] CLASSPATH: /opt/jdk1.5/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/jakarta-commons/cli/target/commons-cli-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/target/commons-jelly-tags-ant-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/log/target/commons-jelly-tags-log-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-30042006.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/packages/jaxen-1.1-beta-4/jaxen-1.1-beta-4.jar - [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262) [junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) [junit] at org.apache.commons.jelly.TagSupport.getBodyText(TagSupport.java:234) [junit] at org.apache.commons.jelly.tags.core.SetTag.doTag(SetTag.java:90) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) [junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) [junit] at org.apache.commons.jelly.tags.jsl.TemplateTag$1.run(TemplateTag.java:160) [junit] at org.dom4j.rule.Mode.fireRule(Mode.java:59) [junit] at org.dom4j.rule.Mode.applyTemplates(Mode.java:80) [junit] at org.dom4j.rule.RuleManager$1.run(RuleManager.java:171) [junit] at org.dom4j.rule.Mode.fireRule(Mode.java:59) [junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:102) [junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:91) [junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:78) [junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:71) [junit] at
svn commit: r398315 - in /jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src: java/org/apache/commons/httpclient/cookie/RFC2965Spec.java test/org/apache/commons/httpclient/cookie/TestCooki
Author: olegk Date: Sun Apr 30 04:25:07 2006 New Revision: 398315 URL: http://svn.apache.org/viewcvs?rev=398315view=rev Log: Refactored handling of the 'Secure' cookie attribute Modified: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/test/org/apache/commons/httpclient/cookie/TestCookieRFC2965Spec.java Modified: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java?rev=398315r1=398314r2=398315view=diff == --- jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java (original) +++ jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java Sun Apr 30 04:25:07 2006 @@ -93,8 +93,9 @@ registerAttribHandler(Cookie2.PATH, new Cookie2PathAttributeHandler()); registerAttribHandler(Cookie2.DOMAIN, new Cookie2DomainAttributeHandler()); registerAttribHandler(Cookie2.PORT, new Cookie2PortAttributeHandler()); -registerAttribHandler(Cookie2.VERSION, new Cookie2VersionAttributeHandler()); registerAttribHandler(Cookie2.MAXAGE, new Cookie2MaxageAttributeHandler()); +registerAttribHandler(Cookie2.SECURE, new CookieSecureAttributeHandler()); +registerAttribHandler(Cookie2.VERSION, new Cookie2VersionAttributeHandler()); } protected void registerAttribHandler( @@ -309,8 +310,6 @@ if (paramName.equals(Cookie2.COMMENT)) { if (cookie.getComment() == null) cookie.setComment(paramValue); -} else if (paramName.equals(Cookie2.SECURE)) { -cookie.setSecure(true); } else if (paramName.equals(Cookie2.COMMENTURL)) { if (cookie.getCommentURL() == null) cookie.setCommentURL(paramValue); @@ -336,7 +335,7 @@ * @throws MalformedCookieException if an exception occurs during * validation */ -public void validate(String host, int port, String path, +public void validate(final String host, int port, final String path, boolean secure, final Cookie cookie) throws MalformedCookieException { @@ -380,6 +379,10 @@ throw new IllegalArgumentException(Cookie may not be null); } if (cookie instanceof Cookie2) { +// check if cookie has expired +if (cookie.isPersistent() cookie.isExpired()) { +return false; +} CookieSource cookiesource = new CookieSource(host, port, path, secure); for (Iterator i = getAttribHandlerIterator(); i.hasNext(); ) { CookieAttributeHandler handler = (CookieAttributeHandler) i.next(); @@ -387,16 +390,6 @@ return false; } } -// check if cookie has expired -if (cookie.isPersistent() cookie.isExpired()) { -return false; -} -// finally make sure that if cookie Secure attribute is set, then this -// request is made using a secure connection -if (cookie.getSecure()) { -return secure; -} -// if we get to this stage, we have a match return true; } else { // old-style cookies are matched according to the old rules @@ -965,6 +958,36 @@ return true; } + } + + /** + * ttSecure/tt cookie attribute handler for RFC 2965 cookie spec. + */ + private class CookieSecureAttributeHandler + implements CookieAttributeHandler { + + public void parse(final Cookie cookie, final String secure) + throws MalformedCookieException { + cookie.setSecure(true); + } + + public void validate(final Cookie cookie, final CookieSource source) + throws MalformedCookieException { + } + + /** + * @see CookieAttributeHandler#match(org.apache.commons.httpclient.Cookie, String) + */ + public boolean match(final Cookie cookie, final CookieSource source) { + if (cookie == null) { + throw new IllegalArgumentException(Cookie may not be null); + } + if (source == null) { + throw new IllegalArgumentException(Cookie source may not be null); + } + return cookie.getSecure() == source.isSecure(); + } + } /** Modified:
[compress] New draft 5
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, here is a new draft for the compress interface: * http://grobmeier.de/commons-compress-draft-5.zip I have improved a lot of things, based on the comments of Sandy (thanks for that). This draft is not perfect, as you can see in the todo list. But imho we have a quite good base for future work, everything compiles and works and is documented. So i would like to propose that someone is comitting this, except you have reasons not to do this. If you agree with me, i will open a bugzilla issue and add the link to the code. - - Chris. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEVKMikv8rKBUE/T4RAlxxAKCMYzova2roWDA/skRyoDvFcErE2gCfTjFw bT2VrGdR8Byt+VjsRo7Cyhw= =1GRF -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]: Project commons-jelly-tags-define-test (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-define-test has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 141 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-test : Commons Jelly Full details are available at: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-define-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on xml-xerces exists, no need to add for property maven.jar.xerces. -WARNING- Overriding Maven properties: [/usr/local/gump/public/workspace/commons-jelly/jelly-tags/define/build.properties] -DEBUG- (Gump generated) Maven Properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/define/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/define/project.xml -DEBUG- Maven project properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/define/project.properties -INFO- Project Reports in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/define/target/test-reports The following work was performed: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-define-test/gump_work/build_commons-jelly_commons-jelly-tags-define-test.html Work Name: build_commons-jelly_commons-jelly-tags-define-test (Type: Build) Work ended in a state of : Failed Elapsed: 14 secs Command Line: maven --offline jar [Working Directory: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/define] CLASSPATH: /opt/jdk1.5/lib/tools.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/jakarta-commons/cli/target/commons-cli-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/dynabean/target/commons-jelly-tags-dynabean-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/log/target/commons-jelly-tags-log-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-30042006.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/packages/jaxen-1.1-beta-4/jaxen-1.1-beta-4.jar - [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) [junit] at junit.framework.TestResult.run(TestResult.java:109) [junit] at junit.framework.TestCase.run(TestCase.java:118) [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208) [junit] at junit.framework.TestSuite.run(TestSuite.java:203) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:325) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:536) [junit] Apr 30, 2006 4:29:49 AM org.apache.commons.jelly.expression.xpath.XPathExpression evaluate [junit] SEVERE: Error constructing xpath [junit] org.jaxen.XPathSyntaxException: Node-set expected [junit] at org.jaxen.BaseXPath.init(BaseXPath.java:131) [junit] at org.jaxen.BaseXPath.init(BaseXPath.java:156) [junit] at org.jaxen.dom4j.Dom4jXPath.init(Dom4jXPath.java:101) [junit] at org.apache.commons.jelly.expression.xpath.XPathExpression.evaluate(XPathExpression.java:78) [junit] at org.apache.commons.jelly.expression.ExpressionSupport.evaluateRecurse(ExpressionSupport.java:61) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:256) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) [junit] at org.apache.commons.jelly.tags.junit.CaseTag$1.runTest(CaseTag.java:59) [junit] at junit.framework.TestCase.runBare(TestCase.java:127) [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) [junit] at
[EMAIL PROTECTED]: Project commons-jelly-tags-define-test (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-define-test has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 141 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-test : Commons Jelly Full details are available at: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-define-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on xml-xerces exists, no need to add for property maven.jar.xerces. -WARNING- Overriding Maven properties: [/usr/local/gump/public/workspace/commons-jelly/jelly-tags/define/build.properties] -DEBUG- (Gump generated) Maven Properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/define/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/define/project.xml -DEBUG- Maven project properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/define/project.properties -INFO- Project Reports in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/define/target/test-reports The following work was performed: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-define-test/gump_work/build_commons-jelly_commons-jelly-tags-define-test.html Work Name: build_commons-jelly_commons-jelly-tags-define-test (Type: Build) Work ended in a state of : Failed Elapsed: 14 secs Command Line: maven --offline jar [Working Directory: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/define] CLASSPATH: /opt/jdk1.5/lib/tools.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/jakarta-commons/cli/target/commons-cli-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/dynabean/target/commons-jelly-tags-dynabean-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/log/target/commons-jelly-tags-log-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-30042006.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/packages/jaxen-1.1-beta-4/jaxen-1.1-beta-4.jar - [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) [junit] at junit.framework.TestResult.run(TestResult.java:109) [junit] at junit.framework.TestCase.run(TestCase.java:118) [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208) [junit] at junit.framework.TestSuite.run(TestSuite.java:203) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:325) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:536) [junit] Apr 30, 2006 4:29:49 AM org.apache.commons.jelly.expression.xpath.XPathExpression evaluate [junit] SEVERE: Error constructing xpath [junit] org.jaxen.XPathSyntaxException: Node-set expected [junit] at org.jaxen.BaseXPath.init(BaseXPath.java:131) [junit] at org.jaxen.BaseXPath.init(BaseXPath.java:156) [junit] at org.jaxen.dom4j.Dom4jXPath.init(Dom4jXPath.java:101) [junit] at org.apache.commons.jelly.expression.xpath.XPathExpression.evaluate(XPathExpression.java:78) [junit] at org.apache.commons.jelly.expression.ExpressionSupport.evaluateRecurse(ExpressionSupport.java:61) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:256) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) [junit] at org.apache.commons.jelly.tags.junit.CaseTag$1.runTest(CaseTag.java:59) [junit] at junit.framework.TestCase.runBare(TestCase.java:127) [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) [junit] at
[EMAIL PROTECTED]: Project commons-jelly-tags-html (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-html has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 141 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-html : Commons Jelly Full details are available at: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-html/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-html-30042006.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/html/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/html/project.xml -DEBUG- Maven project properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/html/project.properties -INFO- Project Reports in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/html/target/test-reports -INFO- Failed to extract fallback artifacts from Gump Repository The following work was performed: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-html/gump_work/build_commons-jelly_commons-jelly-tags-html.html Work Name: build_commons-jelly_commons-jelly-tags-html (Type: Build) Work ended in a state of : Failed Elapsed: 12 secs Command Line: maven --offline jar [Working Directory: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/html] CLASSPATH: /opt/jdk1.5/lib/tools.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/jakarta-commons/cli/target/commons-cli-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/target/commons-jelly-tags-jsl-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/log/target/commons-jelly-tags-log-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-30042006.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/packages/jaxen-1.1-beta-4/jaxen-1.1-beta-4.jar:/usr/local/gump/packages/nekohtml-0.9.5/nekohtml.jar - [junit] at org.apache.commons.jelly.tags.junit.CaseTag$1.runTest(CaseTag.java:59) [junit] [junit] [junit] Testcase: testLowerCase(org.apache.commons.jelly.tags.junit.CaseTag$1): Caused an ERROR [junit] file:/x1/gump/public/workspace/commons-jelly/jelly-tags/html/target/test-classes/org/apache/commons/jelly/html/suite.jelly:40:48: test:assert You must define an attribute called 'test' for this tag. [junit] org.apache.commons.jelly.MissingAttributeException: file:/x1/gump/public/workspace/commons-jelly/jelly-tags/html/target/test-classes/org/apache/commons/jelly/html/suite.jelly:40:48: test:assert You must define an attribute called 'test' for this tag. [junit] at org.apache.commons.jelly.tags.junit.AssertTag.doTag(AssertTag.java:54) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) [junit] at org.apache.commons.jelly.tags.junit.CaseTag$1.runTest(CaseTag.java:59) [junit] [junit] [junit] Testcase: testMixedCase(org.apache.commons.jelly.tags.junit.CaseTag$1): Caused an ERROR [junit] file:/x1/gump/public/workspace/commons-jelly/jelly-tags/html/target/test-classes/org/apache/commons/jelly/html/suite.jelly:47:48: test:assert You must define an attribute called 'test' for this tag. [junit] org.apache.commons.jelly.MissingAttributeException: file:/x1/gump/public/workspace/commons-jelly/jelly-tags/html/target/test-classes/org/apache/commons/jelly/html/suite.jelly:47:48: test:assert You must define an attribute called 'test' for this tag. [junit] at
[EMAIL PROTECTED]: Project commons-jelly-tags-html (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-html has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 141 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-html : Commons Jelly Full details are available at: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-html/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-html-30042006.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/html/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/html/project.xml -DEBUG- Maven project properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/html/project.properties -INFO- Project Reports in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/html/target/test-reports -INFO- Failed to extract fallback artifacts from Gump Repository The following work was performed: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-html/gump_work/build_commons-jelly_commons-jelly-tags-html.html Work Name: build_commons-jelly_commons-jelly-tags-html (Type: Build) Work ended in a state of : Failed Elapsed: 12 secs Command Line: maven --offline jar [Working Directory: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/html] CLASSPATH: /opt/jdk1.5/lib/tools.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/jakarta-commons/cli/target/commons-cli-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/target/commons-jelly-tags-jsl-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/log/target/commons-jelly-tags-log-30042006.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-30042006.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-30042006.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/packages/jaxen-1.1-beta-4/jaxen-1.1-beta-4.jar:/usr/local/gump/packages/nekohtml-0.9.5/nekohtml.jar - [junit] at org.apache.commons.jelly.tags.junit.CaseTag$1.runTest(CaseTag.java:59) [junit] [junit] [junit] Testcase: testLowerCase(org.apache.commons.jelly.tags.junit.CaseTag$1): Caused an ERROR [junit] file:/x1/gump/public/workspace/commons-jelly/jelly-tags/html/target/test-classes/org/apache/commons/jelly/html/suite.jelly:40:48: test:assert You must define an attribute called 'test' for this tag. [junit] org.apache.commons.jelly.MissingAttributeException: file:/x1/gump/public/workspace/commons-jelly/jelly-tags/html/target/test-classes/org/apache/commons/jelly/html/suite.jelly:40:48: test:assert You must define an attribute called 'test' for this tag. [junit] at org.apache.commons.jelly.tags.junit.AssertTag.doTag(AssertTag.java:54) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) [junit] at org.apache.commons.jelly.tags.junit.CaseTag$1.runTest(CaseTag.java:59) [junit] [junit] [junit] Testcase: testMixedCase(org.apache.commons.jelly.tags.junit.CaseTag$1): Caused an ERROR [junit] file:/x1/gump/public/workspace/commons-jelly/jelly-tags/html/target/test-classes/org/apache/commons/jelly/html/suite.jelly:47:48: test:assert You must define an attribute called 'test' for this tag. [junit] org.apache.commons.jelly.MissingAttributeException: file:/x1/gump/public/workspace/commons-jelly/jelly-tags/html/target/test-classes/org/apache/commons/jelly/html/suite.jelly:47:48: test:assert You must define an attribute called 'test' for this tag. [junit] at
svn commit: r398319 - in /jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie: CookieAttributeHandler.java CookieOrigin.java CookieSource.java RFC2
Author: olegk Date: Sun Apr 30 04:58:30 2006 New Revision: 398319 URL: http://svn.apache.org/viewcvs?rev=398319view=rev Log: Renamed CookieSource to CookieOrigin Added: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieOrigin.java - copied, changed from r396994, jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieSource.java Removed: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieSource.java Modified: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieAttributeHandler.java jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java Modified: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieAttributeHandler.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieAttributeHandler.java?rev=398319r1=398318r2=398319view=diff == --- jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieAttributeHandler.java (original) +++ jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieAttributeHandler.java Sun Apr 30 04:58:30 2006 @@ -57,10 +57,10 @@ * Peforms cookie validation for the given attribute value. * * @param cookie [EMAIL PROTECTED] org.apache.commons.httpclient.Cookie} to validate - * @param source the cookie source to validate against + * @param origin the cookie source to validate against * @throws MalformedCookieException if cookie validation fails for this attribute */ - void validate(Cookie cookie, CookieSource source) + void validate(Cookie cookie, CookieOrigin origin) throws MalformedCookieException; /** @@ -68,9 +68,9 @@ * submitted) with the corresponding cookie attribute. * * @param cookie [EMAIL PROTECTED] org.apache.commons.httpclient.Cookie} to match - * @param source the cookie source to match against + * @param origin the cookie source to match against * @return tttrue/tt if the match is successful; ttfalse/tt otherwise */ - boolean match(Cookie cookie, CookieSource source); + boolean match(Cookie cookie, CookieOrigin origin); } Copied: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieOrigin.java (from r396994, jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieSource.java) URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieOrigin.java?p2=jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieOrigin.javap1=jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieSource.javar1=396994r2=398319rev=398319view=diff == --- jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieSource.java (original) +++ jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/CookieOrigin.java Sun Apr 30 04:58:30 2006 @@ -28,14 +28,14 @@ */ package org.apache.commons.httpclient.cookie; -public final class CookieSource { +public final class CookieOrigin { private final String host; private final int port; private final String path; private final boolean secure; - public CookieSource(final String host, int port, final String path, boolean secure) { + public CookieOrigin(final String host, int port, final String path, boolean secure) { super(); if (host == null) { throw new IllegalArgumentException( Modified: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java?rev=398319r1=398318r2=398319view=diff == --- jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java (original) +++ jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java Sun
svn commit: r398324 - in /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser: ASTReferenceExpression.java ASTSizeFunction.java ASTSizeMethod.java ASTStatementExpression.java AST
Author: dion Date: Sun Apr 30 05:20:24 2006 New Revision: 398324 URL: http://svn.apache.org/viewcvs?rev=398324view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTReferenceExpression.java jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTSizeFunction.java jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTSizeMethod.java jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTStatementExpression.java jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTStringLiteral.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTReferenceExpression.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTReferenceExpression.java?rev=398324r1=398323r2=398324view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTReferenceExpression.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTReferenceExpression.java Sun Apr 30 05:20:24 2006 @@ -21,22 +21,31 @@ * variable; A reference by itself. */ public class ASTReferenceExpression extends SimpleNode { +/** + * Create the node given an id. + * + * @param id node id. + */ public ASTReferenceExpression(int id) { super(id); } +/** + * Create a node with the given parser and id. + * + * @param p a parser. + * @param id node id. + */ public ASTReferenceExpression(Parser p, int id) { super(p, id); } -/** Accept the visitor. * */ +/** [EMAIL PROTECTED] */ public Object jjtAccept(ParserVisitor visitor, Object data) { return visitor.visit(this, data); } -/** - * @return the value of the expression - */ +/** [EMAIL PROTECTED] */ public Object value(JexlContext context) throws Exception { return ((SimpleNode) jjtGetChild(0)).value(context); } Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTSizeFunction.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTSizeFunction.java?rev=398324r1=398323r2=398324view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTSizeFunction.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTSizeFunction.java Sun Apr 30 05:20:24 2006 @@ -15,16 +15,15 @@ */ package org.apache.commons.jexl.parser; +import java.lang.reflect.Array; +import java.util.Collection; +import java.util.Map; + import org.apache.commons.jexl.JexlContext; import org.apache.commons.jexl.util.Introspector; import org.apache.commons.jexl.util.introspection.Info; import org.apache.commons.jexl.util.introspection.VelMethod; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.lang.reflect.Array; - /** * generalized size() function for all classes we can think of. * @@ -33,19 +32,31 @@ * @version $Id$ */ public class ASTSizeFunction extends SimpleNode { +/** + * Create the node given an id. + * + * @param id node id. + */ public ASTSizeFunction(int id) { super(id); } +/** + * Create a node with the given parser and id. + * + * @param p a parser. + * @param id node id. + */ public ASTSizeFunction(Parser p, int id) { super(p, id); } -/** Accept the visitor. * */ +/** [EMAIL PROTECTED] */ public Object jjtAccept(ParserVisitor visitor, Object data) { return visitor.visit(this, data); } +/** [EMAIL PROTECTED] */ public Object value(JexlContext jc) throws Exception { SimpleNode arg = (SimpleNode) jjtGetChild(0); @@ -58,17 +69,23 @@ return new Integer(ASTSizeFunction.sizeOf(val)); } +/** + * Calculate the codesize/code of various types: Collection, Array, Map, String, + * and anything that has a int size() method. + * + * @param val the object to get the size of. + * @return the size of val + * @throws Exception if the size cannot be determined. + */ public static int sizeOf(Object val) throws Exception { -if (val instanceof List) { -return ((List) val).size(); +if (val instanceof Collection) { +return ((Collection) val).size(); } else if (val.getClass().isArray()) { return Array.getLength(val); } else if (val instanceof Map) { return ((Map) val).size(); } else if (val instanceof String) { return
svn commit: r398325 - in /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser: ASTSubtractNode.java ASTTrueNode.java ASTUnaryMinusNode.java ASTWhileStatement.java Node.java
Author: dion Date: Sun Apr 30 05:34:29 2006 New Revision: 398325 URL: http://svn.apache.org/viewcvs?rev=398325view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTSubtractNode.java jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTTrueNode.java jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTUnaryMinusNode.java jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTWhileStatement.java jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/Node.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTSubtractNode.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTSubtractNode.java?rev=398325r1=398324r2=398325view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTSubtractNode.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTSubtractNode.java Sun Apr 30 05:34:29 2006 @@ -27,14 +27,26 @@ * @version $Id$ */ public class ASTSubtractNode extends SimpleNode { +/** + * Create the node given an id. + * + * @param id node id. + */ public ASTSubtractNode(int id) { super(id); } +/** + * Create a node with the given parser and id. + * + * @param p a parser. + * @param id node id. + */ public ASTSubtractNode(Parser p, int id) { super(p, id); } +/** [EMAIL PROTECTED] */ public Object value(JexlContext context) throws Exception { Object left = ((SimpleNode) jjtGetChild(0)).value(context); Object right = ((SimpleNode) jjtGetChild(1)).value(context); @@ -79,7 +91,7 @@ } -/** Accept the visitor. * */ +/** [EMAIL PROTECTED] */ public Object jjtAccept(ParserVisitor visitor, Object data) { return visitor.visit(this, data); } Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTTrueNode.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTTrueNode.java?rev=398325r1=398324r2=398325view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTTrueNode.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTTrueNode.java Sun Apr 30 05:34:29 2006 @@ -25,19 +25,31 @@ * @version $Id$ */ public class ASTTrueNode extends SimpleNode { +/** + * Create the node given an id. + * + * @param id node id. + */ public ASTTrueNode(int id) { super(id); } +/** + * Create a node with the given parser and id. + * + * @param p a parser. + * @param id node id. + */ public ASTTrueNode(Parser p, int id) { super(p, id); } -/** Accept the visitor. * */ +/** [EMAIL PROTECTED] */ public Object jjtAccept(ParserVisitor visitor, Object data) { return visitor.visit(this, data); } +/** [EMAIL PROTECTED] */ public Object value(JexlContext jc) throws Exception { return Boolean.TRUE; } Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTUnaryMinusNode.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTUnaryMinusNode.java?rev=398325r1=398324r2=398325view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTUnaryMinusNode.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTUnaryMinusNode.java Sun Apr 30 05:34:29 2006 @@ -27,19 +27,31 @@ * @version $Id$ */ public class ASTUnaryMinusNode extends SimpleNode { +/** + * Create the node given an id. + * + * @param id node id. + */ public ASTUnaryMinusNode(int id) { super(id); } +/** + * Create a node with the given parser and id. + * + * @param p a parser. + * @param id node id. + */ public ASTUnaryMinusNode(Parser p, int id) { super(p, id); } -/** Accept the visitor. * */ +/** [EMAIL PROTECTED] */ public Object jjtAccept(ParserVisitor visitor, Object data) { return visitor.visit(this, data); } +/** [EMAIL PROTECTED] */ public Object value(JexlContext jc) throws Exception { Object val = ((SimpleNode) jjtGetChild(0)).value(jc); Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTWhileStatement.java
svn commit: r398327 - in /jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src: java/org/apache/commons/httpclient/cookie/RFC2965Spec.java test/org/apache/commons/httpclient/cookie/TestCooki
Author: olegk Date: Sun Apr 30 05:39:51 2006 New Revision: 398327 URL: http://svn.apache.org/viewcvs?rev=398327view=rev Log: Refactored handling of the 'Discard', 'Comment', and 'CommentURL' cookie attributes Modified: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/test/org/apache/commons/httpclient/cookie/TestCookieRFC2965Spec.java Modified: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java?rev=398327r1=398326r2=398327view=diff == --- jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java (original) +++ jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java Sun Apr 30 05:39:51 2006 @@ -95,6 +95,9 @@ registerAttribHandler(Cookie2.PORT, new Cookie2PortAttributeHandler()); registerAttribHandler(Cookie2.MAXAGE, new Cookie2MaxageAttributeHandler()); registerAttribHandler(Cookie2.SECURE, new CookieSecureAttributeHandler()); +registerAttribHandler(Cookie2.COMMENT, new CookieCommentAttributeHandler()); +registerAttribHandler(Cookie2.COMMENTURL, new CookieCommentUrlAttributeHandler()); +registerAttribHandler(Cookie2.DISCARD, new CookieDiscardAttributeHandler()); registerAttribHandler(Cookie2.VERSION, new Cookie2VersionAttributeHandler()); } @@ -279,11 +282,11 @@ * * @param attribute [EMAIL PROTECTED] org.apache.commons.httpclient.NameValuePair} cookie attribute from the * ttSet-Cookie2/tt header. - * @param cookieParam [EMAIL PROTECTED] org.apache.commons.httpclient.Cookie} to be updated + * @param cookie [EMAIL PROTECTED] org.apache.commons.httpclient.Cookie} to be updated * @throws MalformedCookieException if an exception occurs during parsing */ public void parseAttribute( -final NameValuePair attribute, final Cookie cookieParam) +final NameValuePair attribute, final Cookie cookie) throws MalformedCookieException { if (attribute == null) { throw new IllegalArgumentException(Attribute may not be null.); @@ -291,35 +294,20 @@ if (attribute.getName() == null) { throw new IllegalArgumentException(Attribute Name may not be null.); } -if (cookieParam == null) { +if (cookie == null) { throw new IllegalArgumentException(Cookie may not be null.); } -if (!(cookieParam instanceof Cookie2)) { -throw new IllegalArgumentException(Expected Cookie2 cookies.); -} -Cookie2 cookie = (Cookie2) cookieParam; final String paramName = attribute.getName().toLowerCase(); final String paramValue = attribute.getValue(); CookieAttributeHandler handler = findAttribHandler(paramName); -if (handler != null) { -handler.parse(cookie, paramValue); -} - -// handle other cookie attributes -if (paramName.equals(Cookie2.COMMENT)) { -if (cookie.getComment() == null) -cookie.setComment(paramValue); -} else if (paramName.equals(Cookie2.COMMENTURL)) { -if (cookie.getCommentURL() == null) -cookie.setCommentURL(paramValue); -} else if (paramName.equals(Cookie2.DISCARD)) { -cookie.setDiscard(true); -} else { +if (handler == null) { // ignore unknown attribute-value pairs if (LOG.isDebugEnabled()) LOG.debug(Unrecognized cookie attribute: + attribute.toString()); +} else { +handler.parse(cookie, paramValue); } } @@ -331,7 +319,7 @@ * @param path the path from which the [EMAIL PROTECTED] org.apache.commons.httpclient.Cookie} was received * @param secure tttrue/tt when the [EMAIL PROTECTED] org.apache.commons.httpclient.Cookie} was received using a * secure connection - * @param cookieParam The cookie to validate + * @param cookie The cookie to validate * @throws MalformedCookieException if an exception occurs during * validation */ @@ -367,7 +355,6 @@ * @param port the port to which the request is being submitted (ignored) * @param path the path to which the request is being submitted * @param secure tttrue/tt if the request is using a secure connection - * @param cookieParam [EMAIL PROTECTED] Cookie} to be matched * @return true if the cookie
svn commit: r398328 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/SimpleNode.java
Author: dion Date: Sun Apr 30 05:46:59 2006 New Revision: 398328 URL: http://svn.apache.org/viewcvs?rev=398328view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/SimpleNode.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/SimpleNode.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/SimpleNode.java?rev=398328r1=398327r2=398328view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/SimpleNode.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/SimpleNode.java Sun Apr 30 05:46:59 2006 @@ -69,18 +69,17 @@ public void jjtClose() { } -/** - * Sets the parent node. - * @param n parent node. - */ +/** [EMAIL PROTECTED] */ public void jjtSetParent(Node n) { parent = n; } +/** [EMAIL PROTECTED] */ public Node jjtGetParent() { return parent; } +/** [EMAIL PROTECTED] */ public void jjtAddChild(Node n, int i) { if (children == null) { children = new Node[i + 1]; @@ -93,10 +92,12 @@ children[i] = n; } +/** [EMAIL PROTECTED] */ public Node jjtGetChild(int i) { return children[i]; } +/** [EMAIL PROTECTED] */ public int jjtGetNumChildren() { return (children == null) ? 0 : children.length; } @@ -113,7 +114,14 @@ return visitor.visit(this, data); } -/** Accept the visitor. * */ +/** + * Visit all children. + * + * @param visitor a [EMAIL PROTECTED] ParserVisitor}. + * @param data data to be passed along to the visitor. + * @return the value from visiting. + * @see ParserVisitor#visit + */ public Object childrenAccept(ParserVisitor visitor, Object data) { if (children != null) { for (int i = 0; i children.length; ++i) { @@ -123,14 +131,27 @@ return data; } +/** + * Gets a string representation of the node. + * @return the node name. + */ public String toString() { return ParserTreeConstants.jjtNodeName[id]; } +/** + * Used during dumping to output the node with a prefix. + * @param prefix text to prefix [EMAIL PROTECTED] #toString()} + * @return text. + */ public String toString(String prefix) { return prefix + toString(); } +/** + * Dump the node and all children. + * @param prefix text to prefix the node output. + */ public void dump(String prefix) { System.out.println(toString(prefix)); @@ -147,6 +168,9 @@ /** * basic interpret - just invoke interpret on all children. + * @param pc the [EMAIL PROTECTED] JexlContext context} to interpret against. + * @return true if interpretation worked. + * @throws Exception on any error. */ public boolean interpret(JexlContext pc) throws Exception { for (int i = 0; i jjtGetNumChildren(); i++) { @@ -173,6 +197,11 @@ /** * Sets the value for the node - again, only makes sense for some nodes but * lazyness tempts me to put it here. Keeps things simple. + * + * @param context the context to retrieve values from. + * @param value the value. + * @return the result. + * @throws Exception when evaluating the operands fails. */ public Object setValue(JexlContext context, Object value) throws Exception { return null; @@ -180,6 +209,10 @@ /** * Used to let a node calcuate it's value.. + * @param o the object to calculate with. + * @param ctx the context to retrieve values from. + * @throws Exception when calculating the value fails. + * @return the result of the calculation. */ public Object execute(Object o, JexlContext ctx) throws Exception { return null; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398330 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/EnumerationIterator.java
Author: dion Date: Sun Apr 30 05:52:35 2006 New Revision: 398330 URL: http://svn.apache.org/viewcvs?rev=398330view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/EnumerationIterator.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/EnumerationIterator.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/EnumerationIterator.java?rev=398330r1=398329r2=398330view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/EnumerationIterator.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/EnumerationIterator.java Sun Apr 30 05:52:35 2006 @@ -37,10 +37,10 @@ * Creates a new iteratorwrapper instance for the specified * Enumeration. * - * @param enumeration The Enumeration to wrap. + * @param enumer The Enumeration to wrap. */ -public EnumerationIterator(Enumeration enumeration) { -this.enumeration = enumeration; +public EnumerationIterator(Enumeration enumer) { +enumeration = enumer; } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398332 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/PropertyExecutor.java
Author: dion Date: Sun Apr 30 05:54:33 2006 New Revision: 398332 URL: http://svn.apache.org/viewcvs?rev=398332view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/PropertyExecutor.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/PropertyExecutor.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/PropertyExecutor.java?rev=398332r1=398331r2=398332view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/PropertyExecutor.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/PropertyExecutor.java Sun Apr 30 05:54:33 2006 @@ -26,6 +26,8 @@ */ public class PropertyExecutor extends AbstractExecutor { +/** index of the first character of the property. */ +private static final int PROPERTY_START_INDEX = 3; /** The JEXL introspector used. */ protected Introspector introspector = null; @@ -88,12 +90,12 @@ sb = new StringBuffer(get); sb.append(property); -c = sb.charAt(3); +c = sb.charAt(PROPERTY_START_INDEX); if (Character.isLowerCase(c)) { -sb.setCharAt(3, Character.toUpperCase(c)); +sb.setCharAt(PROPERTY_START_INDEX, Character.toUpperCase(c)); } else { -sb.setCharAt(3, Character.toLowerCase(c)); +sb.setCharAt(PROPERTY_START_INDEX, Character.toLowerCase(c)); } methodUsed = sb.toString(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398333 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java
Author: dion Date: Sun Apr 30 05:57:07 2006 New Revision: 398333 URL: http://svn.apache.org/viewcvs?rev=398333view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java?rev=398333r1=398332r2=398333view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java Sun Apr 30 05:57:07 2006 @@ -1,12 +1,12 @@ /* * Copyright 2002,2004 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. @@ -16,42 +16,38 @@ package org.apache.commons.jexl.util.introspection; - - /** - * Method used for regular method invocation - * - *$foo.bar() - * - * + * Method used for regular method invocation + * + * $foo.bar() + * + * * @since 1.0 * @author a href=mailto:[EMAIL PROTECTED]Geir Magnusson Jr./a * @version $Id$ */ -public interface VelMethod -{ +public interface VelMethod { /** - * invocation method - called when the method invocationshould be - * preformed and a value returned + * invocation method - called when the method invocationshould be preformed + * and a value returned */ -public Object invoke(Object o, Object[] params) -throws Exception; +Object invoke(Object o, Object[] params) throws Exception; /** - * specifies if this VelMethod is cacheable and able to be - * reused for this class of object it was returned for - * - * @return true if can be reused for this class, false if not + * specifies if this VelMethod is cacheable and able to be reused for this + * class of object it was returned for + * + * @return true if can be reused for this class, false if not */ -public boolean isCacheable(); +boolean isCacheable(); /** - * returns the method name used + * returns the method name used */ -public String getMethodName(); +String getMethodName(); /** - * returns the return type of the method invoked + * returns the return type of the method invoked */ -public Class getReturnType(); +Class getReturnType(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398339 - /jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java
Author: olegk Date: Sun Apr 30 06:29:00 2006 New Revision: 398339 URL: http://svn.apache.org/viewcvs?rev=398339view=rev Log: Handle the requirement of the section 3.2.2 postulating that the first occurrence of an attribute must take precedence a little more elegantly Modified: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java Modified: jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java?rev=398339r1=398338r2=398339view=diff == --- jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java (original) +++ jakarta/commons/proper/httpclient/branches/COOKIE_2_BRANCH/src/java/org/apache/commons/httpclient/cookie/RFC2965Spec.java Sun Apr 30 06:29:00 2006 @@ -266,8 +266,15 @@ NameValuePair[] parameters = headerelement.getParameters(); // could be null. In case only a header element and no parameters. if (parameters != null) { -for (int j = 0; j parameters.length; j++) { -parseAttribute(parameters[j], cookie); +// Eliminate duplicate attribues. The first occurence takes precedence +Map attribmap = new HashMap(parameters.length); +for (int j = parameters.length - 1; j = 0; j--) { +NameValuePair param = parameters[j]; +attribmap.put(param.getName().toLowerCase(), param); +} +for (Iterator it = attribmap.entrySet().iterator(); it.hasNext(); ) { +Map.Entry entry = (Map.Entry) it.next(); +parseAttribute((NameValuePair) entry.getValue(), cookie); } } cookies.add(cookie); @@ -597,18 +604,16 @@ if (cookie == null) { throw new IllegalArgumentException(Cookie may not be null); } -if (!cookie.isPathAttributeSpecified()) { -if (path == null) { -throw new MalformedCookieException( -Missing value for path attribute); -} -if (path.trim().equals()) { -throw new MalformedCookieException( -Blank value for path attribute); -} -cookie.setPath(path); -cookie.setPathAttributeSpecified(true); +if (path == null) { +throw new MalformedCookieException( +Missing value for path attribute); } +if (path.trim().equals()) { +throw new MalformedCookieException( +Blank value for path attribute); +} +cookie.setPath(path); +cookie.setPathAttributeSpecified(true); } /** @@ -684,23 +689,21 @@ if (cookie == null) { throw new IllegalArgumentException(Cookie may not be null); } -if (!cookie.isDomainAttributeSpecified()) { -//TODO (jain): how do we handle the case when domain is specified and equals host? -if (domain == null) { -throw new MalformedCookieException( -Missing value for domain attribute); -} -if (domain.trim().equals()) { -throw new MalformedCookieException( -Blank value for domain attribute); -} -domain = domain.toLowerCase(); -// put a leading dot if domain does not start with a dot -if (!domain.startsWith(.)) -domain = . + domain; -cookie.setDomain(domain); -cookie.setDomainAttributeSpecified(true); +//TODO (jain): how do we handle the case when domain is specified and equals host? +if (domain == null) { +throw new MalformedCookieException( +Missing value for domain attribute); } +if (domain.trim().equals()) { +throw new MalformedCookieException( +Blank value for domain attribute); +} +domain = domain.toLowerCase(); +// put a leading dot if domain does not start with a dot +if (!domain.startsWith(.)) +domain = . + domain; +cookie.setDomain(domain); +cookie.setDomainAttributeSpecified(true); } /** @@ -816,19 +819,17 @@ } if
svn commit: r398353 - /jakarta/commons/sandbox/jci/trunk/core/src/java/org/apache/commons/jci/readers/MemoryResourceReader.java
Author: tcurdt Date: Sun Apr 30 07:55:44 2006 New Revision: 398353 URL: http://svn.apache.org/viewcvs?rev=398353view=rev Log: forgot to change to byte[] Modified: jakarta/commons/sandbox/jci/trunk/core/src/java/org/apache/commons/jci/readers/MemoryResourceReader.java Modified: jakarta/commons/sandbox/jci/trunk/core/src/java/org/apache/commons/jci/readers/MemoryResourceReader.java URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/jci/trunk/core/src/java/org/apache/commons/jci/readers/MemoryResourceReader.java?rev=398353r1=398352r2=398353view=diff == --- jakarta/commons/sandbox/jci/trunk/core/src/java/org/apache/commons/jci/readers/MemoryResourceReader.java (original) +++ jakarta/commons/sandbox/jci/trunk/core/src/java/org/apache/commons/jci/readers/MemoryResourceReader.java Sun Apr 30 07:55:44 2006 @@ -15,7 +15,7 @@ return resources.containsKey( pResourceName ); } -public void add(final String pResourceName, final char[] pContent) { +public void add(final String pResourceName, final byte[] pContent) { if (resources == null) { resources = new HashMap(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398368 - in /jakarta/commons/proper/configuration/trunk: conf/ src/java/org/apache/commons/configuration/ src/java/org/apache/commons/configuration/beanutils/ src/test/org/apache/commons/
Author: oheger Date: Sun Apr 30 09:19:51 2006 New Revision: 398368 URL: http://svn.apache.org/viewcvs?rev=398368view=rev Log: Updated DefaultConfigurationBuilder to deal with an extended header section Modified: jakarta/commons/proper/configuration/trunk/conf/testComplexInitialization.xml jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/beanutils/XMLBeanDeclaration.java jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestDefaultConfigurationBuilder.java jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/beanutils/TestXMLBeanDeclaration.java Modified: jakarta/commons/proper/configuration/trunk/conf/testComplexInitialization.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/conf/testComplexInitialization.xml?rev=398368r1=398367r2=398368view=diff == --- jakarta/commons/proper/configuration/trunk/conf/testComplexInitialization.xml (original) +++ jakarta/commons/proper/configuration/trunk/conf/testComplexInitialization.xml Sun Apr 30 09:19:51 2006 @@ -2,6 +2,10 @@ !-- Test configuration definition file that demonstrates complex initialization -- configuration header +result delimiterParsingDisabled=true + nodeCombiner config-class=org.apache.commons.configuration.tree.OverrideCombiner/ + expressionEngine config-class=org.apache.commons.configuration.tree.xpath.XPathExpressionEngine/ +/result combiner override list-nodes Modified: jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java?rev=398368r1=398367r2=398368view=diff == --- jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java (original) +++ jakarta/commons/proper/configuration/trunk/src/java/org/apache/commons/configuration/DefaultConfigurationBuilder.java Sun Apr 30 09:19:51 2006 @@ -30,7 +30,6 @@ import org.apache.commons.configuration.plist.PropertyListConfiguration; import org.apache.commons.configuration.plist.XMLPropertyListConfiguration; import org.apache.commons.configuration.tree.ConfigurationNode; -import org.apache.commons.configuration.tree.NodeCombiner; import org.apache.commons.configuration.tree.OverrideCombiner; import org.apache.commons.configuration.tree.UnionCombiner; import org.apache.commons.configuration.tree.xpath.XPathExpressionEngine; @@ -119,8 +118,8 @@ * /tr * tr * td valign=topcodeconfig-optional/code/td - * tdDeclares a configuration as optional. This means that errors when - * creating the configuration are silently ignored./td + * tdDeclares a configuration as optional. This means that errors that occur + * when creating the configuration are silently ignored./td * /tr * /table * /p @@ -222,6 +221,16 @@ static final String KEY_ADDITIONAL_LIST = SEC_HEADER + /combiner/additional/list-nodes/node; +/** + * Constant for the key of the result declaration. This key can point to a + * bean declaration, which defines properties of the resulting combined + * configuration. + */ +static final String KEY_RESULT = SEC_HEADER + /result; + +/** Constant for the key of the combiner in the result declaration.*/ +static final String KEY_COMBINER = KEY_RESULT + /nodeCombiner; + /** Constant for the XML file extension. */ static final String EXT_XML = .xml; @@ -424,54 +433,82 @@ load(); } -List overrides = configurationsAt(KEY_OVERRIDE1); -overrides.addAll(configurationsAt(KEY_OVERRIDE2)); -CombinedConfiguration result = createCombinedConfiguration(overrides, -new OverrideCombiner(), KEY_OVERRIDE_LIST); +CombinedConfiguration result = createOverrideConfiguration(); List additionals = configurationsAt(KEY_UNION); if (!additionals.isEmpty()) { -result.addConfiguration(createCombinedConfiguration(additionals, -new UnionCombiner(), KEY_ADDITIONAL_LIST), ADDITIONAL_NAME); +CombinedConfiguration addConfig = new CombinedConfiguration( +new UnionCombiner()); +initCombinedConfiguration(addConfig, additionals, +KEY_ADDITIONAL_LIST); +result.addConfiguration(addConfig, ADDITIONAL_NAME); } return result; } /** - * Creates a combined configuration for the configurations of a
DO NOT REPLY [Bug 34350] - [configuration] Declaring reloadable configurations in the configuration descriptor
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=34350. 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=34350 --- Additional Comments From [EMAIL PROTECTED] 2006-04-30 16:29 --- With the new DefaultConfigurationBuilder class it is now possible to perform complex initializations on the declared configuration sources, including definitions of reloading strategies. The syntax is not exactly as suggested, but similar. A short form is not supported yet. Details can be found in the updated user's guide. Can we close this ticket now? -- 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 27730] - [configuration] Factory's Digester rules don't allow overriding Configuration class
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=27730. 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=27730 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2006-04-30 16:35 --- The new class DefaultConfigurationBuilder should satisfy this request. It can process the same configuration definition files as ConfigurationFactory. In addition it is possible to use custom tags by registering a ConfigurationProvider object. Details can be found in the updated user's guide. Marking this as fixed now. -- 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: [compress] New draft 5
Sounds good, I'll look at the code tonight (hopefully) and comment; in the meantime, let's go ahead and get a software grant moving for the code. If you could fill out the software grant: http://www.apache.org/licenses/#grants and either fax or postal-mail it (see instructions in first paragraph of http://www.apache.org/licenses/icla.txt;). It's better to get the code in early and then have comments be patches than continually keep sending you back to the drawing board I think. Hen On 4/30/06, C. Grobmeier [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, here is a new draft for the compress interface: * http://grobmeier.de/commons-compress-draft-5.zip I have improved a lot of things, based on the comments of Sandy (thanks for that). This draft is not perfect, as you can see in the todo list. But imho we have a quite good base for future work, everything compiles and works and is documented. So i would like to propose that someone is comitting this, except you have reasons not to do this. If you agree with me, i will open a bugzilla issue and add the link to the code. - - Chris. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEVKMikv8rKBUE/T4RAlxxAKCMYzova2roWDA/skRyoDvFcErE2gCfTjFw bT2VrGdR8Byt+VjsRo7Cyhw= =1GRF -END PGP SIGNATURE- - 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: r398392 - in /jakarta/commons/proper/configuration/trunk/xdocs: changes.xml howto_events.xml user_guide.xml
Author: oheger Date: Sun Apr 30 10:46:22 2006 New Revision: 398392 URL: http://svn.apache.org/viewcvs?rev=398392view=rev Log: Added documentation about configuration events to the user guide Added: jakarta/commons/proper/configuration/trunk/xdocs/howto_events.xml (with props) Modified: jakarta/commons/proper/configuration/trunk/xdocs/changes.xml jakarta/commons/proper/configuration/trunk/xdocs/user_guide.xml Modified: jakarta/commons/proper/configuration/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/xdocs/changes.xml?rev=398392r1=398391r2=398392view=diff == --- jakarta/commons/proper/configuration/trunk/xdocs/changes.xml (original) +++ jakarta/commons/proper/configuration/trunk/xdocs/changes.xml Sun Apr 30 10:46:22 2006 @@ -32,6 +32,11 @@ The new class CombinedConfiguration was added as a hierarchical alternative to CompositeConfiguration. /action + action dev=oheger type=add issue=38929 +Support for low-level configuration events was added to all classes +derived from AbstractConfiguration. The major part of this is handled +by the new super class EventSource of AbstractConfiguration. + /action action dev=oheger type=add A new method convertToHierarchical() was added to ConfigurationUtils, which is able to convert an arbitrary configuration object into a Added: jakarta/commons/proper/configuration/trunk/xdocs/howto_events.xml URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/configuration/trunk/xdocs/howto_events.xml?rev=398392view=auto == --- jakarta/commons/proper/configuration/trunk/xdocs/howto_events.xml (added) +++ jakarta/commons/proper/configuration/trunk/xdocs/howto_events.xml Sun Apr 30 10:46:22 2006 @@ -0,0 +1,131 @@ +?xml version=1.0? +!-- + Copyright 2006 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. +-- + +document + + properties + titleConfiguration Events Howto/title + author email=[EMAIL PROTECTED]Oliver Heger/author + /properties + +body + section name=Configuration Events +p + All configuration classes derived from + codea href=apidocs/org/apache/commons/configuration/AbstractConfiguration.html + AbstractConfiguration/a/code allow to register event listeners, which + are notified whenever the configuration's data is changed. This provides + an easy means for tracking updates on a configuration. +/p + +subsection name=Configuration listeners + p + Objects that are interested in update events triggered by configurations + must implement the + codea href=apidocs/org/apache/commons/configuration/event/ConfigurationListener.html + ConfigurationListener/a/code interface. This interface defines a + single method codeconfigurationChanged()/code, which is passed a + codea href=apidocs/org/apache/commons/configuration/event/ConfigurationEvent.html + ConfigurationEvent/a/code object. The event object contains all + information available about the modification, including: + ul +liA source object, which is usually the configuration object that was +modified./li +liThe event's type. This is a numeric value that corresponds to +constant declarations in concrete configuration classes. It describes +what exactly has happended./li +liIf available, the name of the property whose modification caused the +event./li +liIf available, the value of the property that caused this event./li +liA flag whether this event was generated before or after the update +of the source configuration. A modification of a configuration typically +causes two events: one event before and one event after the modification +is performed. This allows event listeners to react at the correct point +of time./li + /ul + Depending on the event type not all of this data may be available. +/p +p + For resolving the numeric event type use constants defined in + codeAbstractConfiguration/code or derived classes. These constants + start with the prefix codeEVENT_/code and have a speaking name. Here + is an incomplete list of available event types
Re: [compress] New draft 5
On 4/30/06, C. Grobmeier [EMAIL PROTECTED] wrote: here is a new draft for the compress interface: * http://grobmeier.de/commons-compress-draft-5.zip Same as before, suggestions as a stream of consciousness, take the ones you like: package org.apache.commons.compress: In Archiver: Why do pack() and packToFilename(String) both return a boolean and throws a PackException? The Javadocs state @return true, if the operation has been ended without exceptions. IMO the return type isn't meaningful as if there was an exception that would be thrown, and a return of false would never actually happen. When is it meaningful to swallow an exception and still return false? Does the Archiver ever unpack to a file or only a directory? In Java a directory is represented as a File but I think it would be nice if the Javadocs made that clear for getUnpackDestination(), setUnpackDestinationName(String), and setUnpackDestinationFile(File). And maybe those setters should throw an exception when the parameter isn't a directory. I don't really like that the Archiver interface combines both both pack and unpack and there are difference sets of properties for each operation. In my mind you have the concept of an Archive and then you ask for another implementation of Exploder and Packer interfaces. Each one only does one thing and the Archiver can choose to make both types available, only make one type available, support both types but throw an exception when the second type is requested to enforce one activity at a time. In Compressor: I don't see a need to expose that a FileInputStream is being used internally. Someday you may want to implement an optimization that decompresses small files totally in memory. Change: FileInputStream streamCompressedInputStream(FileInputStream input), FileInputStream streamCompressedFilename(String pathToFile), and FileInputStream streamCompressedFile(File input) to return an InputStream instead. I also don't like that Compressor mixes compress and decompress specific behaviors in one interface but its not so bad because there are not properties that go with a behavior. All relevant information is included in the method call parameters which is good. In ArchiverType: public static ArchiverType ZIP = ...; and public static ArchiverType TAR = ; should both be final. In AbstractCompressor: The copy( final InputStream input, final OutputStream output ) method, while useful, doesn't really belong in AbstractCompressor. It's just a utility method that an implementation may need. IMO it doesn't warrant being part of the exposed API. It's nice to aid in code reuse but I don't think it should happen as the expense of sticking to one purpose. Since Java 1.2 the File class has had createTempFile methods which makes the ones in AbstractCompressor unneeded and, while unlikely, it is possible that createTempFileName() could return the same name in two successive calls which would be bad. In CompressorType: public static CompressorType BZIP2 = ... ; also, final. For both of ArchiveType and CompressorType add a valueOf(String) method. This is what Java 1.5 Enums have and it lets you convert a String, say from a config file, into an Enum. To do this right you'll need to keep track of other Types with a Map or something in the constructor. In CompressException, DecompressException, PackException, and UnpackException: The constructors that takes (String, Exception) call this.setStackTrace( e.getStackTrace() ); If Java 1.4 is a minimum requirement than loose that as it's misleading and use the initCause method to do exception chaining. packages org.apache.commons.compress.archivers.tar, and org.apache.commons.compress.archivers.zip: These packages have a minimally exposed API and I like that. This will help make future improvements easier to implement. package org.apache.commons.compress.compressors.bzip2: Same comments as before about the Bzip2{In,Out}Streams which you have in the TODO.txt file. This draft is not perfect, as you can see in the todo list. But imho we have a quite good base for future work, everything compiles and works and is documented. So i would like to propose that someone is comitting this, except you have reasons not to do this. If you agree with me, i will open a bugzilla issue and add the link to the code. I feel like the public interface was noticeably more usable and has less noise. IMO it's not yet a great API but it's a very decent one. -- Sandy McArthur He who dares not offend cannot be honest. - Thomas Paine - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [compress] New draft 5
Overall, I like the interfaces, but I've got a few issues: 0) Update is mentioned in the Javadoc at the beginning of Archiver, but is not implemented. 1) You often change method names based on the parameter types, e.g. Archiver.addFile + Archiver.addFileName, setUnpackDestinationName + setUnpackDestinationFile, etc. It seems more conventional and less chaotic to give all the methods the same name, and have them only differ based on parameter. Examples of this style are constructors for java.utils.zip.ZipFile, java.io.FileInputStream, java.io.FileOutputStream, org.apache.commons.io.IOUtils.IOUtils.copy, org.apache.commons.io.FileUtils.isFileNewer, etc 2) You can only add files to an archive, this makes it more difficult to add generated entries into an archive. You need to actually write them to disk before including them in an archive 3) UnpackDestination + Destination should be the same property (on the both the interface as well as underlying implementation), or you should split packing and unpacking into two different interfaces (or force folks to pass a path to pack + unpack, instead of setting properties on the object). 4) None of your interfaces deal with the case of what to do if the destination file is already there. Choices are either defining it in the interface, or adding a property defining what to do. I would suggest the latter, and would suggest that for Archiver this method should take a FileFilter (since the unpack behaviour can be non-trivial) and should default to FalseFileFilter.INSTANCE. For the Compresser interface a simple boolean is probably sufficient. e.g. Archiver.setOverwriteFilter(TrueFileFilter.INSTANCE) Compresser.setOverwrite(true); 5) In AbstractCompressor, I don't understand why you have a copy method and don't just use IOUtils.copy() 6) In AbstractCompressor, I don't understand why you try to create your own temp name, rather than just letting File.createTempFile do it's thing. --Will C. Grobmeier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, here is a new draft for the compress interface: * http://grobmeier.de/commons-compress-draft-5.zip I have improved a lot of things, based on the comments of Sandy (thanks for that). This draft is not perfect, as you can see in the todo list. But imho we have a quite good base for future work, everything compiles and works and is documented. So i would like to propose that someone is comitting this, except you have reasons not to do this. If you agree with me, i will open a bugzilla issue and add the link to the code. - - Chris. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEVKMikv8rKBUE/T4RAlxxAKCMYzova2roWDA/skRyoDvFcErE2gCfTjFw bT2VrGdR8Byt+VjsRo7Cyhw= =1GRF -END PGP SIGNATURE- - 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]
Bug report for Commons [2006/04/30]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=CriticalMAJ=Major | | | | MIN=Minor NOR=Normal ENH=Enhancement | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | | 6508|Ass|Enh|2002-02-17|[lakta] HttpClient now supports proxyHost and prox| | 6826|Ass|Enh|2002-03-04|[lakta] Need to have xml files validated against D| | 6829|Ass|Enh|2002-03-04|[lakta] Allow easier way of user specified tests | | 7069|Ass|Enh|2002-03-13|[lakta] DTD and DOM Validators| | 7226|Opn|Enh|2002-03-19|[beanutils] Nested Bean Collection| | 7367|New|Nor|2002-03-22|[services] ServiceManager not actually serializabl| | 7465|New|Nor|2002-03-25|[lakta] Need better 'dist' build | | 7981|Ver|Nor|2002-04-11|[codec][PATCH] add 2 new methods for encoding stri| |10319|New|Enh|2002-06-28|[beanutils] Instantiate property if null in form b| |12807|New|Nor|2002-09-19|[lakta][PATCH] Update build.xml to use commons-log| |13390|New|Nor|2002-10-07|[lakta] ResponseHeaderHandler and ResponseHeaderVa| |13426|New|Enh|2002-10-08|[lakta][PATCH] xml-reference.xml responseHeader ad| |13743|Opn|Enh|2002-10-17|[beanutils] Need getPropertyType(Class theClass, S| |14394|Ver|Nor|2002-11-08|[beanutils] Excessive exceptions log under securit| |14667|Ver|Maj|2002-11-19|[beanutils] PropertyUtils.copyProperties does not | |15451|Opn|Enh|2002-12-17|[beanutils] Multiple mapped properties not possibl| |15519|Ver|Maj|2002-12-19|[beanutils] PropertyUtils.getPropertyType() for ja| |15744|New|Nor|2002-12-31|[scaffold] Scaffold ResultSet used after statement| |16038|Opn|Enh|2003-01-13|[beanutils] LocaleBeanUtils.copyProperties() does | |16394|Inf|Enh|2003-01-24|[validator] Enhance the IndexedListProperty to han| |16525|Opn|Enh|2003-01-29|[beanutils] BeanUtils.setProperty is over-zealous | |16600|New|Nor|2003-01-30|[lakta] JUnitTestAdapter throws SAXException becau| |16634|New|Enh|2003-01-31|[validator] Change ValidatorUtils.getValueAsString| |16873|New|Enh|2003-02-07|[lakta] Specifying a different latka.properties fi| |17002|New|Enh|2003-02-12|[beanutils] Problem with index property | |17102|New|Enh|2003-02-15|[lakta] Can't embed characters in paramValue | |17501|New|Enh|2003-02-27|[beanutils] Add dynamic discovery of mapped proper| |17662|New|Nor|2003-03-05|[cli] Unknown options are ignored instead of throw| |17682|New|Nor|2003-03-05|[cli] HelpFormatter does not wrap lines correctly | |17769|New|Blk|2003-03-07|[scaffold] pre-mature closing of Statement and Pre| |17957|New|Cri|2003-03-13|[launcher] - on OutOfMemoryError no message | |18087|New|Enh|2003-03-18|[beanutils] Add BeanFactory class for dynamic fact| |18773|New|Enh|2003-04-07|[reflect] Can add a method cache in MethodUtils | |19781|New|Min|2003-05-08|[beanutils] PropertyUtils.copyProperties throws ex| |19857|New|Enh|2003-05-12|[beanutils] Methods ConvertUtilsBean.convert could| |20027|New|Enh|2003-05-19|[beanutils] ConvertUtils enhancements | |20057|New|Nor|2003-05-20|[lakta] Difficulty to download sample Latka test| |20067|New|Nor|2003-05-20|[lakta] sample Latka test suite SUITE FAILED - c| |20520|New|Enh|2003-06-05|[beanutils] MethodUtils: Need easy way to invoke s| |20523|New|Enh|2003-06-05|[fileupload] Model FileUpload model to mimic javax| |20549|New|Enh|2003-06-06|[beanutils] Handling of exceptions thrown during B| |20686|New|Enh|2003-06-11|[beanutils] Register converters by both target cla| |20836|New|Enh|2003-06-17|[beanutils] Localizing beanutils | |20838|New|Enh|2003-06-17|[fileupload] Add a new property maxFileSize to con| |20968|New|Enh|2003-06-20|[beanutils][PATCH] Include bean getClass in Proper| |21076|New|Enh|2003-06-25|[beanutils] Add aggressive mode for BeanUtils.co| |21433|New|Enh|2003-07-09|[scaffold] StorageBeanBase should use a resource n| |21483|New|Enh|2003-07-10|[beanutils] BeanUtils and PropertyUtils toString f| |21693|New|Enh|2003-07-17|[beanutils] copyProperties method should not exit | |21793|New|Nor|2003-07-22|[scaffold] StatementUtils fix | |22046|New|Enh|2003-08-01|[validator] Field validation for a list of fields |
svn commit: r398459 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/ClassMap.java
Author: dion Date: Sun Apr 30 16:14:30 2006 New Revision: 398459 URL: http://svn.apache.org/viewcvs?rev=398459view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/ClassMap.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/ClassMap.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/ClassMap.java?rev=398459r1=398458r2=398459view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/ClassMap.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/ClassMap.java Sun Apr 30 16:14:30 2006 @@ -36,11 +36,14 @@ * @version $Id$ */ public class ClassMap { +/** represents a miss on the cached data. */ private static final class CacheMiss { } +/** constant for a miss on the cached data. */ private static final CacheMiss CACHE_MISS = new CacheMiss(); +/** represents null or missing arguments. */ private static final Object OBJECT = new Object(); /** @@ -56,19 +59,18 @@ */ private final Map methodCache = new Hashtable(); +/** map from method name and args to a [EMAIL PROTECTED] Method}. */ private final MethodMap methodMap = new MethodMap(); /** * Standard constructor. + * @param aClass the class to deconstruct. */ -public ClassMap(Class clazz) { -this.clazz = clazz; +public ClassMap(Class aClass) { +clazz = aClass; populateMethodCache(); } -private ClassMap() { -} - /** * @return the class object whose methods are cached by this map. */ @@ -85,6 +87,11 @@ * * If nothing is found, then we must actually go and introspect the method * from the MethodMap. + * + * @param name method name + * @param params method parameters + * @return CACHE_MISS or a [EMAIL PROTECTED] Method} + * @throws MethodMap.AmbiguousException if the method and parameters are ambiguous. */ public Method findMethod(String name, Object[] params) throws MethodMap.AmbiguousException { String methodKey = makeMethodKey(name, params); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398463 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Info.java
Author: dion Date: Sun Apr 30 16:48:42 2006 New Revision: 398463 URL: http://svn.apache.org/viewcvs?rev=398463view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Info.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Info.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Info.java?rev=398463r1=398462r2=398463view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Info.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Info.java Sun Apr 30 16:48:42 2006 @@ -26,29 +26,44 @@ * @version $Id$ */ public class Info { +/** line number. */ private int line; - +/** column number. */ private int column; - +/** name. */ private String templateName; - +/** + * Create info. + * @param tn template name + * @param l line number + * @param c column + */ public Info(String tn, int l, int c) { templateName = tn; line = l; column = c; } -private Info() { -} - +/** + * Gets the template name. + * @return template name + */ public String getTemplateName() { return templateName; } +/** + * Gets the line number. + * @return line number. + */ public int getLine() { return line; } +/** + * Gets the column number. + * @return the column. + */ public int getColumn() { return column; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398464 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/IntrospectorBase.java
Author: dion Date: Sun Apr 30 16:50:43 2006 New Revision: 398464 URL: http://svn.apache.org/viewcvs?rev=398464view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/IntrospectorBase.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/IntrospectorBase.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/IntrospectorBase.java?rev=398464r1=398463r2=398464view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/IntrospectorBase.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/IntrospectorBase.java Sun Apr 30 16:50:43 2006 @@ -73,6 +73,7 @@ *parameters * * @return The desired Method object. + * @throws Exception on any logical error. */ public Method getMethod(Class c, String name, Object[] params) throws Exception { if (c == null) { @@ -110,6 +111,8 @@ * Creates a class map for specific class and registers it in the cache. * Also adds the qualified name to the name-class map for later Classloader * change detection. + * @param c class. + * @return a [EMAIL PROTECTED] ClassMap} */ protected ClassMap createClassMap(Class c) { ClassMap classMap = new ClassMap(c); @@ -120,7 +123,7 @@ } /** - * Clears the classmap and classname caches + * Clears the classmap and classname caches. */ protected void clearCache() { /* - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [compress] New draft 5
It occured to me later on, that I think this interface would be better if it were focused on describing an Archive, rather than trying to describe two processes (ie describing the noun rather than all the verbs). The fall out from this, is that you don't have a member for an unpack directory, since that is only relevent to the unpacking process. and I think it makes the interface I went to mock this up and came up with a couple other issues with the interface. 1) Adding an entry or a file to an archive, you need to be able to set the entry name, otherwise you can run into problems with getting just the right relative path in the archive for the files. 2) It is pretty common to want to recursively add directories, we should provide this in the archive API I've attached my mock-up so folks can see if they think these thoughts make sense. I tried to borrow design and parameter conventions from some of the commons-io methods I use alot. --Will will pugh wrote: Overall, I like the interfaces, but I've got a few issues: 0) Update is mentioned in the Javadoc at the beginning of Archiver, but is not implemented. 1) You often change method names based on the parameter types, e.g. Archiver.addFile + Archiver.addFileName, setUnpackDestinationName + setUnpackDestinationFile, etc. It seems more conventional and less chaotic to give all the methods the same name, and have them only differ based on parameter. Examples of this style are constructors for java.utils.zip.ZipFile, java.io.FileInputStream, java.io.FileOutputStream, org.apache.commons.io.IOUtils.IOUtils.copy, org.apache.commons.io.FileUtils.isFileNewer, etc 2) You can only add files to an archive, this makes it more difficult to add generated entries into an archive. You need to actually write them to disk before including them in an archive 3) UnpackDestination + Destination should be the same property (on the both the interface as well as underlying implementation), or you should split packing and unpacking into two different interfaces (or force folks to pass a path to pack + unpack, instead of setting properties on the object). 4) None of your interfaces deal with the case of what to do if the destination file is already there. Choices are either defining it in the interface, or adding a property defining what to do. I would suggest the latter, and would suggest that for Archiver this method should take a FileFilter (since the unpack behaviour can be non-trivial) and should default to FalseFileFilter.INSTANCE. For the Compresser interface a simple boolean is probably sufficient. e.g. Archiver.setOverwriteFilter(TrueFileFilter.INSTANCE) Compresser.setOverwrite(true); 5) In AbstractCompressor, I don't understand why you have a copy method and don't just use IOUtils.copy() 6) In AbstractCompressor, I don't understand why you try to create your own temp name, rather than just letting File.createTempFile do it's thing. --Will C. Grobmeier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, here is a new draft for the compress interface: * http://grobmeier.de/commons-compress-draft-5.zip I have improved a lot of things, based on the comments of Sandy (thanks for that). This draft is not perfect, as you can see in the todo list. But imho we have a quite good base for future work, everything compiles and works and is documented. So i would like to propose that someone is comitting this, except you have reasons not to do this. If you agree with me, i will open a bugzilla issue and add the link to the code. - - Chris. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEVKMikv8rKBUE/T4RAlxxAKCMYzova2roWDA/skRyoDvFcErE2gCfTjFw bT2VrGdR8Byt+VjsRo7Cyhw= =1GRF -END PGP SIGNATURE- - 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] package org.apache.commons.compress; import java.io.*; import java.util.Iterator; /** * Archiver is an interface that defines a generic achive file. This interface * allows a caller to inspect the entries in an archive, create new ones, add entries to existing ones * or to expand an archive. * * * @author christian.grobmeier */ public interface MyArchiver { /** * If pack is called with this as the ioverwrite/i parameter, the method * will fail if the ArchiveFile exists. */ public static final int FAIL_ON_EXISTANCE = 0; /** * If pack is called with this as the ioverwrite/i parameter, the method * will overwrite ArchiveFile. The new archive will only contain the entries * added via iaddEntry/i. */ public
svn commit: r398495 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/MethodMap.java
Author: dion Date: Sun Apr 30 18:33:43 2006 New Revision: 398495 URL: http://svn.apache.org/viewcvs?rev=398495view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/MethodMap.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/MethodMap.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/MethodMap.java?rev=398495r1=398494r2=398495view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/MethodMap.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/MethodMap.java Sun Apr 30 18:33:43 2006 @@ -165,27 +165,23 @@ Method max = (Method) maximal.next(); switch (moreSpecific(appArgs, max.getParameterTypes())) { -case MORE_SPECIFIC: { +case MORE_SPECIFIC: /* * This method is more specific than the previously * known maximally specific, so remove the old maximum. */ - maximal.remove(); break; -} -case LESS_SPECIFIC: { +case LESS_SPECIFIC: /* * This method is less specific than some of the * currently known maximally specific methods, so we * won't add it into the set of maximally specific * methods */ - lessSpecific = true; break; -} } } @@ -273,6 +269,9 @@ /** * Returns true if the supplied method is applicable to actual argument * types. + * @param method the method to check + * @param classes possible argument types + * @return true if the arguments are applicable to the method. */ private static boolean isApplicable(Method method, Class[] classes) { Class[] methodArgs = method.getParameterTypes(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398496 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java
Author: dion Date: Sun Apr 30 18:45:21 2006 New Revision: 398496 URL: http://svn.apache.org/viewcvs?rev=398496view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java?rev=398496r1=398495r2=398496view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java Sun Apr 30 18:45:21 2006 @@ -1,12 +1,12 @@ /* * Copyright 2002,2004 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. @@ -16,35 +16,33 @@ package org.apache.commons.jexl.util.introspection; - /** - * Interface defining a 'getter'. For uses when looking for resolution of - * property references - * - * $foo.bar - * + * Interface defining a 'getter'. For uses when looking for resolution of + * property references + * + * $foo.bar + * * @since 1.0 * @author a href=mailto:[EMAIL PROTECTED]Geir Magnusson Jr./a * @version $Id$ */ -public interface VelPropertyGet -{ +public interface VelPropertyGet { /** - * invocation method - called when the 'get action' should be - * preformed and a value returned + * invocation method - called when the 'get action' should be performed and + * a value returned. */ -public Object invoke(Object o) throws Exception; +Object invoke(Object o) throws Exception; /** - * specifies if this VelPropertyGet is cacheable and able to be - * reused for this class of object it was returned for - * - * @return true if can be reused for this class, false if not + * specifies if this VelPropertyGet is cacheable and able to be reused for + * this class of object it was returned for. + * + * @return true if can be reused for this class, false if not */ -public boolean isCacheable(); +boolean isCacheable(); /** - * returns the method name used to return this 'property' + * returns the method name used to return this 'property'. */ -public String getMethodName(); +String getMethodName(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398497 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java
Author: dion Date: Sun Apr 30 18:46:12 2006 New Revision: 398497 URL: http://svn.apache.org/viewcvs?rev=398497view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java?rev=398497r1=398496r2=398497view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java Sun Apr 30 18:46:12 2006 @@ -17,7 +17,7 @@ package org.apache.commons.jexl.util.introspection; /** - * Method used for regular method invocation + * Method used for regular method invocation. * * $foo.bar() * @@ -29,25 +29,25 @@ public interface VelMethod { /** * invocation method - called when the method invocationshould be preformed - * and a value returned + * and a value returned. */ Object invoke(Object o, Object[] params) throws Exception; /** * specifies if this VelMethod is cacheable and able to be reused for this - * class of object it was returned for + * class of object it was returned for. * * @return true if can be reused for this class, false if not */ boolean isCacheable(); /** - * returns the method name used + * returns the method name used. */ String getMethodName(); /** - * returns the return type of the method invoked + * returns the return type of the method invoked. */ Class getReturnType(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398498 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Uberspect.java
Author: dion Date: Sun Apr 30 18:48:57 2006 New Revision: 398498 URL: http://svn.apache.org/viewcvs?rev=398498view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Uberspect.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Uberspect.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Uberspect.java?rev=398498r1=398497r2=398498view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Uberspect.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/Uberspect.java Sun Apr 30 18:48:57 2006 @@ -29,28 +29,50 @@ public interface Uberspect { /** * Initializer - will be called before use. + * @throws Exception on any error. */ void init() throws Exception; /** * To support iteratives - #foreach(). + * @param info template info. + * @param obj to get the iterator for. + * @throws Exception on any error. + * @return an iterator over obj. */ Iterator getIterator(Object obj, Info info) throws Exception; /** * Returns a general method, corresponding to $foo.bar( $woogie ). + * @param obj the object + * @param method the method name + * @param args method arguments + * @param info template info + * @throws Exception on any error. + * @return a [EMAIL PROTECTED] VelMethod}. */ VelMethod getMethod(Object obj, String method, Object[] args, Info info) throws Exception; /** * Property getter - returns VelPropertyGet appropos for #set($foo = * $bar.woogie). + * @param obj the object to get the property from. + * @param identifier property name + * @param info template info + * @throws Exception on any error. + * @return a [EMAIL PROTECTED] VelPropertyGet}. */ VelPropertyGet getPropertyGet(Object obj, String identifier, Info info) throws Exception; /** * Property setter - returns VelPropertySet appropos for #set($foo.bar = * geir). + * @param obj the object to get the property from. + * @param identifier property name + * @param arg value to set. + * @param info template info + * @throws Exception on any error. + * @return a [EMAIL PROTECTED] VelPropertySet}. */ VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info info) throws Exception; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398502 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java
Author: dion Date: Sun Apr 30 19:06:05 2006 New Revision: 398502 URL: http://svn.apache.org/viewcvs?rev=398502view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java?rev=398502r1=398501r2=398502view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java Sun Apr 30 19:06:05 2006 @@ -41,6 +41,9 @@ * @version $Id$ */ public class UberspectImpl implements Uberspect, UberspectLoggable { +/** index of the first character of the property. */ +private static final int PROPERTY_START_INDEX = 3; + /** * Our runtime logger. */ @@ -55,6 +58,7 @@ * init - does nothing - we need to have setRuntimeLogger called before * getting our introspector, as the default vel introspector depends upon * it. + * @throws Exception on any error. */ public void init() throws Exception { } @@ -62,6 +66,7 @@ /** * Sets the runtime logger - this must be called before anything else * besides init() as to get the logger. Makes the pull model appealing... + * @param runtimeLogger service to use for logging. */ public void setRuntimeLogger(Log runtimeLogger) { rlog = runtimeLogger; @@ -69,7 +74,7 @@ } /** - * To support iteratives - #foreach(). + * [EMAIL PROTECTED] */ public Iterator getIterator(Object obj, Info i) throws Exception { if (obj.getClass().isArray()) { @@ -100,11 +105,12 @@ } /** - * Method. + * [EMAIL PROTECTED] */ public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i) throws Exception { -if (obj == null) +if (obj == null) { return null; +} Method m = introspector.getMethod(obj.getClass(), methodName, args); if (m == null obj instanceof Class) { @@ -115,7 +121,7 @@ } /** - * Property getter. + * [EMAIL PROTECTED] */ public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i) throws Exception { AbstractExecutor executor; @@ -148,7 +154,7 @@ } /** - * Property setter + * [EMAIL PROTECTED] */ public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i) throws Exception { Class claz = obj.getClass(); @@ -171,10 +177,10 @@ StringBuffer sb = new StringBuffer(set); sb.append(identifier); -if (Character.isLowerCase(sb.charAt(3))) { -sb.setCharAt(3, Character.toUpperCase(sb.charAt(3))); +if (Character.isLowerCase(sb.charAt(PROPERTY_START_INDEX))) { +sb.setCharAt(PROPERTY_START_INDEX, Character.toUpperCase(sb.charAt(PROPERTY_START_INDEX))); } else { -sb.setCharAt(3, Character.toLowerCase(sb.charAt(3))); +sb.setCharAt(PROPERTY_START_INDEX, Character.toLowerCase(sb.charAt(PROPERTY_START_INDEX))); } vm = getMethod(obj, sb.toString(), params, i); @@ -193,8 +199,9 @@ vm = getMethod(obj, put, params, i); -if (vm != null) +if (vm != null) { return new VelSetterImpl(vm, identifier); +} } } @@ -202,18 +209,27 @@ } /** - * Implementation of VelMethod + * An implementation of [EMAIL PROTECTED] VelMethod}. */ public class VelMethodImpl implements VelMethod { -Method method = null; - +/** the method. */ +protected Method method = null; +/** + * Create a new instance. + * + * @param m the method. + */ public VelMethodImpl(Method m) { method = m; } -private VelMethodImpl() { -} - +/** + * Invoke the method on the object. + * @param o the object + * @param params method parameters. + * @return the result + * @throws Exception on any error. + */ public Object invoke(Object o, Object[] params) throws Exception { try { return method.invoke(o, params); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398509 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java
Author: dion Date: Sun Apr 30 20:34:35 2006 New Revision: 398509 URL: http://svn.apache.org/viewcvs?rev=398509view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java?rev=398509r1=398508r2=398509view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectImpl.java Sun Apr 30 20:34:35 2006 @@ -224,11 +224,7 @@ } /** - * Invoke the method on the object. - * @param o the object - * @param params method parameters. - * @return the result - * @throws Exception on any error. + * [EMAIL PROTECTED] */ public Object invoke(Object o, Object[] params) throws Exception { try { @@ -246,60 +242,95 @@ } } +/** + * [EMAIL PROTECTED] + */ public boolean isCacheable() { return true; } +/** + * [EMAIL PROTECTED] + */ public String getMethodName() { return method.getName(); } +/** + * [EMAIL PROTECTED] + */ public Class getReturnType() { return method.getReturnType(); } } +/** + * [EMAIL PROTECTED] + */ public class VelGetterImpl implements VelPropertyGet { -AbstractExecutor ae = null; +/** executor for performing the get. */ +protected AbstractExecutor ae = null; +/** + * Create the getter using an [EMAIL PROTECTED] AbstractExecutor} to + * do the work. + * @param exec the executor. + */ public VelGetterImpl(AbstractExecutor exec) { ae = exec; } -private VelGetterImpl() { -} - +/** + * [EMAIL PROTECTED] + */ public Object invoke(Object o) throws Exception { return ae.execute(o); } +/** + * [EMAIL PROTECTED] + */ public boolean isCacheable() { return true; } +/** + * [EMAIL PROTECTED] + */ public String getMethodName() { return ae.getMethod().getName(); } - } +/** + * [EMAIL PROTECTED] + */ public class VelSetterImpl implements VelPropertySet { -VelMethod vm = null; - -String putKey = null; - +/** the method to call. */ +protected VelMethod vm = null; +/** the key for indexed and other properties. */ +protected String putKey = null; + +/** + * Create an instance. + * @param velmethod the method to call on set. + */ public VelSetterImpl(VelMethod velmethod) { this.vm = velmethod; } +/** + * Create an instance. + * @param velmethod the method to call on set. + * @param key the index or other value passed to a + * setProperty(xxx, value) method. + */ public VelSetterImpl(VelMethod velmethod, String key) { this.vm = velmethod; putKey = key; } -private VelSetterImpl() { -} - +/** [EMAIL PROTECTED] */ public Object invoke(Object o, Object value) throws Exception { ArrayList al = new ArrayList(); @@ -313,10 +344,12 @@ return vm.invoke(o, al.toArray()); } +/** [EMAIL PROTECTED] */ public boolean isCacheable() { return true; } +/** [EMAIL PROTECTED] */ public String getMethodName() { return vm.getMethodName(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398512 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectLoggable.java
Author: dion Date: Sun Apr 30 20:41:02 2006 New Revision: 398512 URL: http://svn.apache.org/viewcvs?rev=398512view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectLoggable.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectLoggable.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectLoggable.java?rev=398512r1=398511r2=398512view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectLoggable.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/UberspectLoggable.java Sun Apr 30 20:41:02 2006 @@ -1,12 +1,12 @@ /* * Copyright 2002,2004 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. @@ -18,23 +18,20 @@ import org.apache.commons.logging.Log; - /** - * Marker interface to let an uberspector indicate it can and wants to - * log - * - * Thanks to Paulo for the suggestion - * + * Marker interface to let an uberspector indicate it can and wants to log. + * + * Thanks to Paulo for the suggestion + * * @since 1.0 * @author a href=mailto:[EMAIL PROTECTED]Geir Magnusson Jr./a * @version $Id$ - * + * */ -public interface UberspectLoggable -{ +public interface UberspectLoggable { /** - * Sets the logger. This will be called before any calls to the - * uberspector + * Sets the logger. This will be called before any calls to the uberspector + * @param logger the logger. */ -public void setRuntimeLogger(Log logger); +void setRuntimeLogger(Log logger); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398513 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java
Author: dion Date: Sun Apr 30 20:42:52 2006 New Revision: 398513 URL: http://svn.apache.org/viewcvs?rev=398513view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java?rev=398513r1=398512r2=398513view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelMethod.java Sun Apr 30 20:42:52 2006 @@ -28,8 +28,13 @@ */ public interface VelMethod { /** - * invocation method - called when the method invocationshould be preformed + * invocation method - called when the method invocation should be performed * and a value returned. + + * @param o the object + * @param params method parameters. + * @return the result + * @throws Exception on any error. */ Object invoke(Object o, Object[] params) throws Exception; @@ -42,12 +47,14 @@ boolean isCacheable(); /** - * returns the method name used. + * Gets the method name used. + * @return method name */ String getMethodName(); /** * returns the return type of the method invoked. + * @return return type */ Class getReturnType(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398514 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java
Author: dion Date: Sun Apr 30 20:44:34 2006 New Revision: 398514 URL: http://svn.apache.org/viewcvs?rev=398514view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java?rev=398514r1=398513r2=398514view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertyGet.java Sun Apr 30 20:44:34 2006 @@ -30,6 +30,9 @@ /** * invocation method - called when the 'get action' should be performed and * a value returned. + * @param o the object to get the property from. + * @return the property value. + * @throws Exception on any error. */ Object invoke(Object o) throws Exception; @@ -43,6 +46,7 @@ /** * returns the method name used to return this 'property'. + * @return the method name. */ String getMethodName(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r398515 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertySet.java
Author: dion Date: Sun Apr 30 20:46:33 2006 New Revision: 398515 URL: http://svn.apache.org/viewcvs?rev=398515view=rev Log: Checkstyle Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertySet.java Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertySet.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertySet.java?rev=398515r1=398514r2=398515view=diff == --- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertySet.java (original) +++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/util/introspection/VelPropertySet.java Sun Apr 30 20:46:33 2006 @@ -1,12 +1,12 @@ /* * Copyright 2002,2004 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. @@ -16,38 +16,38 @@ package org.apache.commons.jexl.util.introspection; - /** - * Interface used for setting values that appear to be properties in - * Velocity. Ex. - * - * #set($foo.bar = hello) - * + * Interface used for setting values that appear to be properties in Velocity. + * Ex. + * + * #set($foo.bar = hello) + * * @since 1.0 * @author a href=mailto:[EMAIL PROTECTED]Geir Magnusson Jr./a * @version $Id$ */ -public interface VelPropertySet -{ +public interface VelPropertySet { /** - * method used to set the value in the object - * - * @param o Object on which the method will be called with the arg - * @param arg value to be set - * @return the value returned from the set operation (impl specific) + * method used to set the value in the object. + * + * @param o Object on which the method will be called with the arg + * @param arg value to be set + * @return the value returned from the set operation (impl specific) + * @throws Exception on any error. */ -public Object invoke(Object o, Object arg) throws Exception; +Object invoke(Object o, Object arg) throws Exception; /** - * specifies if this VelPropertySet is cacheable and able to be - * reused for this class of object it was returned for - * - * @return true if can be reused for this class, false if not + * specifies if this VelPropertySet is cacheable and able to be reused for + * this class of object it was returned for. + * + * @return true if can be reused for this class, false if not */ -public boolean isCacheable(); +boolean isCacheable(); /** - * returns the method name used to set this 'property' + * returns the method name used to set this 'property'. + * @return the method name. */ -public String getMethodName(); +String getMethodName(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 39410] - [lang] FastDateFormat: wrong format for date 01.01.1000
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=39410. 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=39410 --- Additional Comments From [EMAIL PROTECTED] 2006-05-01 04:49 --- Created an attachment (id=18210) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=18210action=view) Unit test -- 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 39410] - [lang] FastDateFormat: wrong format for date 01.01.1000
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=39410. 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=39410 [EMAIL PROTECTED] changed: What|Removed |Added Attachment #18210|Unit test |Unit test patch description|| Attachment #18210|0 |1 is patch|| -- 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 39410] - [lang] FastDateFormat: wrong format for date 01.01.1000
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=39410. 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=39410 --- Additional Comments From [EMAIL PROTECTED] 2006-05-01 05:30 --- Running through the source, the problem is that: log(1000) / log(10) is 2.9996 and not 3.0 as it should. Solving this by simplifying the method of finding out how many digits there are in a number - Integer.toString(value).length(). I've added an assert for value being negative (using Validate). Just in case. -- 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: r398530 - in /jakarta/commons/proper/lang/trunk/src: java/org/apache/commons/lang/time/FastDateFormat.java test/org/apache/commons/lang/time/FastDateFormatTest.java
Author: bayard Date: Sun Apr 30 22:32:43 2006 New Revision: 398530 URL: http://svn.apache.org/viewcvs?rev=398530view=rev Log: Adding unit test for #39410. Implementing fix by switching from using Math.log to Integer.toString to figure out the number of digits. Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/FastDateFormatTest.java Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java?rev=398530r1=398529r2=398530view=diff == --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/FastDateFormat.java Sun Apr 30 22:32:43 2006 @@ -31,6 +31,8 @@ import java.util.Map; import java.util.TimeZone; +import org.apache.commons.lang.Validate; + /** * pFastDateFormat is a fast and thread-safe version of * [EMAIL PROTECTED] java.text.SimpleDateFormat}./p @@ -93,9 +95,6 @@ */ public static final int SHORT = DateFormat.SHORT; -// package scoped as used by inner class -static final double LOG_10 = Math.log(10); - private static String cDefaultPattern; private static Map cInstanceCache = new HashMap(7); @@ -1283,7 +1282,8 @@ if (value 1000) { digits = 3; } else { -digits = (int)(Math.log(value) / LOG_10) + 1; +Validate.isTrue(value -1, Negative values should not be possible, value); +digits = Integer.toString(value).length(); } for (int i = mSize; --i = digits; ) { buffer.append('0'); Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/FastDateFormatTest.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/FastDateFormatTest.java?rev=398530r1=398529r2=398530view=diff == --- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/FastDateFormatTest.java (original) +++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/FastDateFormatTest.java Sun Apr 30 22:32:43 2006 @@ -251,6 +251,17 @@ assertEquals(0999/01/01, format.format(cal)); } /** + * Show Bug #39410 is solved + */ +public void testMilleniumBug() { +Calendar cal = Calendar.getInstance(); +FastDateFormat format = FastDateFormat.getInstance(dd.MM.); + +cal.set(1000,0,1); +assertEquals(01.01.1000, format.format(cal)); +} + +/** * testLowYearPadding showed that the date was buggy * This test confirms it, getting 366 back as a date */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 39410] - [lang] FastDateFormat: wrong format for date 01.01.1000
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=39410. 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=39410 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2006-05-01 05:32 --- Adding unit test for #39410. Implementing fix by switching from using Math.log to Integer.toString to figure out the number of digits. Sendingsrc/java/org/apache/commons/lang/time/FastDateFormat.java Sendingsrc/test/org/apache/commons/lang/time/FastDateFormatTest.java Transmitting file data .. Committed revision 398530. -- 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]