svn commit: r534011 - in /jakarta/commons/proper/beanutils/trunk/src: java/org/apache/commons/beanutils/converters/ test/org/apache/commons/beanutils/converters/
Author: niallp Date: Tue May 1 04:26:17 2007 New Revision: 534011 URL: http://svn.apache.org/viewvc?view=revrev=534011 Log: Remove StringBuffer conversion functionality (reverts r471625) - over complicates matters, as per comments on BEANUTILS-258 Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/ArrayConverter.java jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/CharacterConverter.java jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/ClassConverter.java jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/DateTimeConverter.java jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/NumberConverter.java jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/ArrayConverterTestCase.java jakarta/commons/proper/beanutils/trunk/src/test/org/apache/commons/beanutils/converters/ClassConverterTestCase.java Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java?view=diffrev=534011r1=534010r2=534011 == --- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java (original) +++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java Tue May 1 04:26:17 2007 @@ -159,21 +159,9 @@ if (value == null) { return handleMissing(targetType); -// Convert -- String or StringBuffer -} else if (targetType.equals(String.class) || -targetType.equals(StringBuffer.class)) { -Object result = convertToString(value); -if (result == null) { -return getDefault(targetType); -} else if (type.equals(StringBuffer.class)) { -if (result instanceof StringBuffer) { -return result; -} else { -return new StringBuffer(result.toString()); -} -} else { -return result.toString(); -} +// Convert -- String +} else if (targetType.equals(String.class)) { +return convertToString(value); // No conversion necessary } else if (targetType.equals(sourceType)) { @@ -200,18 +188,18 @@ } /** - * Convert the input object into a String (or StringBuffer). + * Convert the input object into a String. * p - * bN.B./bThis implementation simply returns the value unchanged. - * The [EMAIL PROTECTED] AbstractConverter#convert(Class, Object)} method - * checks the value returned by this method, converting to either - * a String or StringBuffer as required. + * bN.B./bThis implementation simply uses the value's + * codetoString()/code method and should be overriden if a + * more sophisticated mechanism for iconversion to a String/i + * is required. * * @param value The input value to be converted. * @return the converted String value. */ -protected Object convertToString(Object value) { -return value; +protected String convertToString(Object value) { +return value.toString(); } /** @@ -288,7 +276,7 @@ */ protected Object handleMissing(Class type) { -if (useDefault || type.equals(String.class) || type.equals(StringBuffer.class)) { +if (useDefault || type.equals(String.class)) { Object value = getDefault(type); if (useDefault value != null !(type.equals(value.getClass( { try { @@ -333,8 +321,6 @@ protected Object getDefault(Class type) { if (type.equals(String.class)) { return null; -} else if (type.equals(StringBuffer.class)) { -return new StringBuffer(); } else { return defaultValue; } Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/ArrayConverter.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/ArrayConverter.java?view=diffrev=534011r1=534010r2=534011 == --- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/ArrayConverter.java (original) +++
svn commit: r534013 - /jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java
Author: niallp Date: Tue May 1 04:32:52 2007 New Revision: 534013 URL: http://svn.apache.org/viewvc?view=revrev=534013 Log: Reduce the setDefaultValue() method's visibility from public to protected, as per comments on BEANUTILS-258 Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java?view=diffrev=534013r1=534012r2=534013 == --- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java (original) +++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/AbstractConverter.java Tue May 1 04:32:52 2007 @@ -109,32 +109,6 @@ // - Public Methods /** - * Set the default value, converting as required. - * p - * If the default value is different from the type the - * codeConverter/code handles, it will be converted - * to the handled type. - * - * @param defaultValue The default value to be returned - * if the value to be converted is missing or an error - * occurs converting the value. - * @throws ConversionException if an error occurs converting - * the default value - */ -public void setDefaultValue(Object defaultValue) { -useDefault = false; -if (log.isDebugEnabled()) { -log.debug(Setting default value: + defaultValue); -} -if (defaultValue == null) { - this.defaultValue = null; -} else { - this.defaultValue = convert(getDefaultType(), defaultValue); -} -useDefault = true; -} - -/** * Convert the input object into an output object of the * specified type. * @@ -301,6 +275,32 @@ } throw cex; +} + +/** + * Set the default value, converting as required. + * p + * If the default value is different from the type the + * codeConverter/code handles, it will be converted + * to the handled type. + * + * @param defaultValue The default value to be returned + * if the value to be converted is missing or an error + * occurs converting the value. + * @throws ConversionException if an error occurs converting + * the default value + */ +protected void setDefaultValue(Object defaultValue) { +useDefault = false; +if (log.isDebugEnabled()) { +log.debug(Setting default value: + defaultValue); +} +if (defaultValue == null) { + this.defaultValue = null; +} else { + this.defaultValue = convert(getDefaultType(), defaultValue); +} +useDefault = true; } /** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (BEANUTILS-258) Improve Converter Implementations
[ https://issues.apache.org/jira/browse/BEANUTILS-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492864 ] Niall Pemberton commented on BEANUTILS-258: --- OK I've reverted the StringBuffer functionality and reduced the setDefaultValue() method's visibility as per above comments: http://svn.apache.org/viewvc?view=revrevision=534011 http://svn.apache.org/viewvc?view=revrevision=534013 Improve Converter Implementations - Key: BEANUTILS-258 URL: https://issues.apache.org/jira/browse/BEANUTILS-258 Project: Commons BeanUtils Issue Type: Improvement Components: ConvertUtils Converters Affects Versions: 1.7.0 Reporter: Niall Pemberton Assigned To: Niall Pemberton Priority: Minor Fix For: 1.8.0 The Converter contract has the following signature public Object convert(Class, Object) ...which incudes the type (Class) that the value should be converted to. However all the Converter implementations in BeanUtils ignore this parameter and always convert to a specific type - for example IntegerConverter only ever converts to Integer values. One of the weaknesses in BeanUtils is that conversion of an Object to a String is almost always done using the toString() method which, depending on the Class, can produce unhelpful values. IMO all Converter implementations should, at a minimum, support also support conversion from the type they handle to a String. Theres two stages to this process: 1) Enhance Converter implementations to handle conversion to Strings. 2) Modify BeanUtils/PropertyUtils to delegate String conversion to the Converters. In order to facilitate this, I'm adding a new AbstractConverter class which removes the need for duplciated boiler plate code. As well as providing a structure for conversion it also handles missing and invalid values in a uniform way. I also have new NumberConverter and DateTimeConverter implementations which provide improved String conversion facilities: 1) Number Conversion The existing number Converter implementations use String handling functions provided by the Number implementation. This has two main drawbacks - they don't handle String values containing thousand separators and they are fixed using a period (.) as the decimal separator making them only usable in Locales where that is the case. I'm adding a number Converter where a pattern can be specified for the format and/or a Locale specified to use different decimal symbols. This caters for the alternative Locale scenario and isn't intended to provide support for applications operating in a multiple Locale environment. 2) Date/Time Conversion Currently there are only implementations for the java.sql.Date/Time/Timestamp types - java.util.Date and java.util.Calendar are not handled. I have a date/time Converter implementation that caters for all of these types. As people have indicated elsewhere converting from Strings to Date/Calendar poses problems. This implementation can be configured either to use the default format for a specified Locale or can be configured with a set of date patterns. This may not fully satisfy String -- Date conversion requirements, but will at least provide something and importantly will provide Date conversion factilities where String is not involved (e.g. Date -- Calendar). 3) Array Conversion I also have a generic array Converter implementation. It can convert to/from Arrays of any type. It does this by delegating the element conversion to a Converter of the appropriate type. As well as that it also caters for Collection -- Array conversion and provides addtiona configuraton options for parsing delimited String. I'm going to start committing the changes to the Converters initially. If no-one objects to those, then I'll start looking at improving how BeanUtils/PropertyUtils uses/delegates to Converters. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[nightly build] pool failed.
Failed build logs: http://vmbuild.apache.org/~commons/nightly/logs//20070501/pool.log - 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. 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. -WARNING- Overriding Maven properties: [/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/build.properties] -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: 31 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/commons-cli-1.0.x/target/commons-cli-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/target/commons-jelly-tags-ant-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/log/target/commons-jelly-tags-log-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-30042007.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/public/workspace/jaxen/target/jaxen-30042007.jar:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar - [junit] at org.apache.commons.jelly.tags.junit.AssertTagSupport.fail(AssertTagSupport.java:64) [junit] at org.apache.commons.jelly.tags.junit.AssertTag.doTag(AssertTag.java:59) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:263) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:96) [junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:187) [junit] at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:66) [junit] at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:113) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:96) [junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:187) [junit] at org.apache.commons.jelly.tags.jsl.TemplateTag$1.run(TemplateTag.java:161) [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
[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. 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. -WARNING- Overriding Maven properties: [/usr/local/gump/public/workspace/commons-jelly/jelly-tags/jsl/build.properties] -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: 31 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/commons-cli-1.0.x/target/commons-cli-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/target/commons-jelly-tags-ant-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/log/target/commons-jelly-tags-log-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/xml/target/commons-jelly-tags-xml-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-30042007.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/public/workspace/jaxen/target/jaxen-30042007.jar:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar - [junit] at org.apache.commons.jelly.tags.junit.AssertTagSupport.fail(AssertTagSupport.java:64) [junit] at org.apache.commons.jelly.tags.junit.AssertTag.doTag(AssertTag.java:59) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:263) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:96) [junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:187) [junit] at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:66) [junit] at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:113) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:96) [junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:187) [junit] at org.apache.commons.jelly.tags.jsl.TemplateTag$1.run(TemplateTag.java:161) [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
[EMAIL PROTECTED]: Project commons-jelly-tags-fmt-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-fmt-test has an issue affecting its community integration. This issue affects 1 projects. 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-fmt-test : Commons Jelly Full details are available at: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-fmt-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/fmt/build.properties] -DEBUG- (Gump generated) Maven Properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt/project.xml -DEBUG- Maven project properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt/project.properties -INFO- Project Reports in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt/target/test-reports The following work was performed: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-fmt-test/gump_work/build_commons-jelly_commons-jelly-tags-fmt-test.html Work Name: build_commons-jelly_commons-jelly-tags-fmt-test (Type: Build) Work ended in a state of : Failed Elapsed: 11 secs Command Line: maven --offline jar [Working Directory: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt] 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/packages/bsh-2.0b4/bsh-commands-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-classpath-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-core-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-bsf-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-reflect-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-util-2.0b4.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/target/commons-jelly-tags-ant-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/beanshell/target/commons-jelly-tags-beanshell-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-30042007.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/public/workspace/jaxen/target/jaxen-30042007.jar:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt/target/commons-jelly-tags-fmt-30042007.jar - [junit] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) [junit] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) [junit] at java.net.URLClassLoader.access$100(URLClassLoader.java:56) [junit] at java.net.URLClassLoader$1.run(URLClassLoader.java:195) [junit] at java.security.AccessController.doPrivileged(Native Method) [junit] at java.net.URLClassLoader.findClass(URLClassLoader.java:188) [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:306) [junit] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:251) [junit] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) [junit] at org.apache.commons.jelly.tags.ant.AntTagLibrary.createProject(AntTagLibrary.java:128) [junit] at
[EMAIL PROTECTED]: Project commons-jelly-tags-fmt-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-fmt-test has an issue affecting its community integration. This issue affects 1 projects. 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-fmt-test : Commons Jelly Full details are available at: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-fmt-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/fmt/build.properties] -DEBUG- (Gump generated) Maven Properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt/project.xml -DEBUG- Maven project properties in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt/project.properties -INFO- Project Reports in: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt/target/test-reports The following work was performed: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly-tags-fmt-test/gump_work/build_commons-jelly_commons-jelly-tags-fmt-test.html Work Name: build_commons-jelly_commons-jelly-tags-fmt-test (Type: Build) Work ended in a state of : Failed Elapsed: 11 secs Command Line: maven --offline jar [Working Directory: /usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt] 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/packages/bsh-2.0b4/bsh-commands-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-classpath-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-core-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-bsf-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-reflect-2.0b4.jar:/usr/local/gump/packages/bsh-2.0b4/bsh-util-2.0b4.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/target/commons-jelly-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/ant/target/commons-jelly-tags-ant-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/beanshell/target/commons-jelly-tags-beanshell-30042007.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/junit/target/commons-jelly-tags-junit-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-30042007.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/target/commons-logging-api-30042007.jar:/usr/local/gump/public/workspace/dom4j/build/dom4j.jar:/usr/local/gump/public/workspace/jaxen/target/jaxen-30042007.jar:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis-ext.jar:/usr/local/gump/public/workspace/commons-jelly/jelly-tags/fmt/target/commons-jelly-tags-fmt-30042007.jar - [junit] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) [junit] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) [junit] at java.net.URLClassLoader.access$100(URLClassLoader.java:56) [junit] at java.net.URLClassLoader$1.run(URLClassLoader.java:195) [junit] at java.security.AccessController.doPrivileged(Native Method) [junit] at java.net.URLClassLoader.findClass(URLClassLoader.java:188) [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:306) [junit] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:251) [junit] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) [junit] at org.apache.commons.jelly.tags.ant.AntTagLibrary.createProject(AntTagLibrary.java:128) [junit] at
[nightly build] [configuration]
I finally got things configured so that [configuration] will build along with the other m1 nightlies. The problem is that - IIUC and C may well be off - in m1, you can upgrade plugins selectively via version specifications in the pom, but you can't downgrade them. As long as the 1.9.2 xdoc plugin is installed locally, m1 will load it and that will hose the [configuration] build. Workaround is to explicitly install 1.8 using maven plugin:download -DgroupId=maven -DartifactId=maven-xdoc-plugin -Dversion=1.8. That uninistalls 1.9.2, but as long as other components have 1.9.2 specified in their poms, m1 will cache and use 1.9.2 for them. This works4me locally and on vmbuild. Anyone else wanting to build [configuration] as well as other commons components will likely have to do the same. Moral of the story - let's get going on m2 ;-). Once a component has a working m2 build, to move the nightlies to m2, just move it from commons-nightly/trunk/nightly_proper_maven_list.txt to commons-nightly/trunk/nightly_proper_maven2_list.txt (or _sandbox_ for sandbox components). I also got the wget working on people, so the nightly tarballs / zips are back again at http://people.apache.org/builds/jakarta-commons/nightly/ Next step is to do same for maven snapshot jars. Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [nightly build] [configuration]
Thanks a lot Phil ! Phil Steitz a écrit : I finally got things configured so that [configuration] will build along with the other m1 nightlies. The problem is that - IIUC and C may well be off - in m1, you can upgrade plugins selectively via version specifications in the pom, but you can't downgrade them. As long as the 1.9.2 xdoc plugin is installed locally, m1 will load it and that will hose the [configuration] build. Workaround is to explicitly install 1.8 using maven plugin:download -DgroupId=maven -DartifactId=maven-xdoc-plugin -Dversion=1.8. That uninistalls 1.9.2, but as long as other components have 1.9.2 specified in their poms, m1 will cache and use 1.9.2 for them. This works4me locally and on vmbuild. Anyone else wanting to build [configuration] as well as other commons components will likely have to do the same. Moral of the story - let's get going on m2 ;-). Once a component has a working m2 build, to move the nightlies to m2, just move it from commons-nightly/trunk/nightly_proper_maven_list.txt to commons-nightly/trunk/nightly_proper_maven2_list.txt (or _sandbox_ for sandbox components). I also got the wget working on people, so the nightly tarballs / zips are back again at http://people.apache.org/builds/jakarta-commons/nightly/ Next step is to do same for maven snapshot jars. Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r534109 - /jakarta/commons/proper/logging/trunk/pom.xml
Author: dennisl Date: Tue May 1 07:55:13 2007 New Revision: 534109 URL: http://svn.apache.org/viewvc?view=revrev=534109 Log: Add missing developerConnection. Update to a released parent and remove stuff that is available in that version of the parent. Add properties to compile for Java 1.2. Modified: jakarta/commons/proper/logging/trunk/pom.xml Modified: jakarta/commons/proper/logging/trunk/pom.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/logging/trunk/pom.xml?view=diffrev=534109r1=534108r2=534109 == --- jakarta/commons/proper/logging/trunk/pom.xml (original) +++ jakarta/commons/proper/logging/trunk/pom.xml Tue May 1 07:55:13 2007 @@ -25,7 +25,7 @@ parent groupIdorg.apache.commons/groupId artifactIdcommons-parent/artifactId -version2-SNAPSHOT/version +version2/version /parent modelVersion4.0.0/modelVersion groupIdcommons-logging/groupId @@ -123,6 +123,7 @@ scm connectionscm:svn:http://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk/developerConnection urlhttp://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk/url /scm @@ -359,23 +360,6 @@ /configuration /plugin -- - plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-javadoc-plugin/artifactId - /plugin - plugin -groupIdorg.codehaus.mojo/groupId -artifactIdjdepend-maven-plugin/artifactId -version2.0-beta-1/version - /plugin - plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-jxr-plugin/artifactId - /plugin - plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-surefire-report-plugin/artifactId - /plugin /plugins /reporting @@ -391,4 +375,8 @@ urlscp://cvs.apache.org//www/jakarta.apache.org/commons/logging//url /site /distributionManagement + properties +maven.compile.source1.2/maven.compile.source +maven.compile.target1.2/maven.compile.target + /properties /project - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r534115 - /jakarta/commons/proper/logging/trunk/pom.xml
Author: dennisl Date: Tue May 1 08:14:01 2007 New Revision: 534115 URL: http://svn.apache.org/viewvc?view=revrev=534115 Log: Update to a more recent parent and remove stuff that is inherited from that parent. Modified: jakarta/commons/proper/logging/trunk/pom.xml Modified: jakarta/commons/proper/logging/trunk/pom.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/logging/trunk/pom.xml?view=diffrev=534115r1=534114r2=534115 == --- jakarta/commons/proper/logging/trunk/pom.xml (original) +++ jakarta/commons/proper/logging/trunk/pom.xml Tue May 1 08:14:01 2007 @@ -25,7 +25,7 @@ parent groupIdorg.apache.commons/groupId artifactIdcommons-parent/artifactId -version2/version +version3-SNAPSHOT/version /parent modelVersion4.0.0/modelVersion groupIdcommons-logging/groupId @@ -131,16 +131,6 @@ sourceDirectorysrc/java/sourceDirectory testSourceDirectorysrc/test/testSourceDirectory -resources - resource -directory./directory -targetPathMETA-INF/targetPath -includes - includeNOTICE.txt/include - includeLICENSE.txt/include -/includes - /resource -/resources testResources testResource directorysrc/test/directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r534137 - /jakarta/commons/proper/commons-parent/trunk/pom.xml
Author: dennisl Date: Tue May 1 08:57:08 2007 New Revision: 534137 URL: http://svn.apache.org/viewvc?view=revrev=534137 Log: Update to a more recent parent and remove stuff that is inherited from that parent. Modified: jakarta/commons/proper/commons-parent/trunk/pom.xml Modified: jakarta/commons/proper/commons-parent/trunk/pom.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/commons-parent/trunk/pom.xml?view=diffrev=534137r1=534136r2=534137 == --- jakarta/commons/proper/commons-parent/trunk/pom.xml (original) +++ jakarta/commons/proper/commons-parent/trunk/pom.xml Tue May 1 08:57:08 2007 @@ -111,7 +111,7 @@ plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-gpg-plugin/artifactId - version1.0-alpha-1/version + version1.0-alpha-3/version /plugin plugin groupIdorg.apache.maven.plugins/groupId - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (IO-117) EndianUtils.readSwappedUnsignedInteger() may return a negative number
[ https://issues.apache.org/jira/browse/IO-117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated IO-117: - Attachment: IO-117.patch Attaching a patch containing Hiroshi's test as a unit test and a proposed pair of fixes. Opinions sought on my fix, I don't do a lot of bit shifting so it always feels clumsy. EndianUtils.readSwappedUnsignedInteger() may return a negative number - Key: IO-117 URL: https://issues.apache.org/jira/browse/IO-117 Project: Commons IO Issue Type: Bug Affects Versions: 1.3.1 Reporter: Hiroshi Ikeda Attachments: EndianUtilsTest.java, IO-117.patch Methods about reading unsigned-integer in class EndianUtils may return a negative number, due to casting int to long. Calculations with operator etc. are under integer in these methods so its results are integer, then implicit casting the results to long keeps its positive/negative sign. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (LANG-330) Add StringBufferUtils or overload StringUtils methods
[ https://issues.apache.org/jira/browse/LANG-330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated LANG-330: --- Affects Version/s: (was: 3.0) Fix Version/s: JDK 5.0 features Appendable sounds like an attractive jdk 5 feature; setting the fixVersion to that as a part of the Lang2 thinking. Add StringBufferUtils or overload StringUtils methods - Key: LANG-330 URL: https://issues.apache.org/jira/browse/LANG-330 Project: Commons Lang Issue Type: New Feature Reporter: Jörg Gottschling Fix For: JDK 5.0 features There's especially one group of methods you should overload with StringBuffer (or Appendable in a special JDK5 Class?): StringUtils.join It should take a StringBuffer (/Appendable) as first Argument to which the Strings will be added. Usage Example: StringBuffer sql = new StringBuffer(SELECT * FROM foo WHERE bar IN (); StringUtils.join(sql, bars, , ); sql.append() AND bar NOT IN (); StringUtils.join(sql, noBars, , ); sql.append();); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (LANG-328) LocaleUtils.toLocale() rejects strings with only language+variant
[ https://issues.apache.org/jira/browse/LANG-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated LANG-328: --- Fix Version/s: 2.3.1 Fix asap issue; so marking for 2.3.1. LocaleUtils.toLocale() rejects strings with only language+variant - Key: LANG-328 URL: https://issues.apache.org/jira/browse/LANG-328 Project: Commons Lang Issue Type: Bug Affects Versions: 2.3 Reporter: Emmanuel Bourg Fix For: 2.3.1 LocaleUtils.toLocale() throws an exception on strings containing a language and a variant but no country code. For example : fr__POSIX This string can be produced with the JDK by instanciating a Locale with an empty string for the country : new Locale(fr, , POSIX).toString(). According to the javadoc for the Locale class a variant is allowed with just a language code or just a country code. Commons Configuration handles this case in its PropertyConverter.toLocale() method. I'd like to replace our implementation by the one provided by LocaleUtils, but our tests fail due to this case. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r534205 - /jakarta/commons/proper/lang/branches/Lang2-1.x/
Author: bayard Date: Tue May 1 12:12:29 2007 New Revision: 534205 URL: http://svn.apache.org/viewvc?view=revrev=534205 Log: Copying the current trunk of Lang for a research branch into Lang2 Added: jakarta/commons/proper/lang/branches/Lang2-1.x/ - copied from r534204, jakarta/commons/proper/lang/trunk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r534207 - in /jakarta/commons/proper/lang/branches: Lang2-1.x/ LangTwo-1.x/
Author: bayard Date: Tue May 1 12:17:37 2007 New Revision: 534207 URL: http://svn.apache.org/viewvc?view=revrev=534207 Log: Easier name on the eye Added: jakarta/commons/proper/lang/branches/LangTwo-1.x/ - copied from r534206, jakarta/commons/proper/lang/branches/Lang2-1.x/ Removed: jakarta/commons/proper/lang/branches/Lang2-1.x/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r534219 - in /jakarta/commons/proper/lang/branches/LangTwo-1.x: maven.xml project.properties project.xml
Author: bayard Date: Tue May 1 13:01:10 2007 New Revision: 534219 URL: http://svn.apache.org/viewvc?view=revrev=534219 Log: Time to stop using maven1 Removed: jakarta/commons/proper/lang/branches/LangTwo-1.x/maven.xml jakarta/commons/proper/lang/branches/LangTwo-1.x/project.properties jakarta/commons/proper/lang/branches/LangTwo-1.x/project.xml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r534220 - /jakarta/commons/proper/lang/branches/LangTwo-1.x/pom.xml
Author: bayard Date: Tue May 1 13:01:35 2007 New Revision: 534220 URL: http://svn.apache.org/viewvc?view=revrev=534220 Log: 1.5 dependent. 1.6 didn't have a lot of additions, so I doubt it'llbe worth pushing up to depending on it Modified: jakarta/commons/proper/lang/branches/LangTwo-1.x/pom.xml Modified: jakarta/commons/proper/lang/branches/LangTwo-1.x/pom.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/branches/LangTwo-1.x/pom.xml?view=diffrev=534220r1=534219r2=534220 == --- jakarta/commons/proper/lang/branches/LangTwo-1.x/pom.xml (original) +++ jakarta/commons/proper/lang/branches/LangTwo-1.x/pom.xml Tue May 1 13:01:35 2007 @@ -365,6 +365,11 @@ /dependency /dependencies + properties +maven.compile.source1.5/maven.compile.source +maven.compile.target1.5/maven.compile.target + /properties + build sourceDirectorysrc/java/sourceDirectory testSourceDirectorysrc/test/testSourceDirectory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[BeanUtils] Unable to find value
Hi, I have been trying to carry over a web application using Struts 1.2.7 to J2SE 1.5 with J2EE 1.4. The application runs fine on J2SE 1.4 J2EE 1.3. There is a known issue with the: BeanUtilsBean.java PropertyUtilsBean.java http://svn.apache.org/viewvc?view=revrevision=154349 I have a form with a list of BeneficiaryVO called Beneficiaries. And for each BeneficiaryVO there is a list of TrusteeVO called Trustees. When I run the application with the 1.2.7 code I get this error: [01/05/07 15:58:42:921 EDT] 0023 ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /WEB-INF/personal/insurances/insurance.jsp. Exception thrown : javax.servlet.ServletException: Unable to find a value for beneficiaries in object of class hronline.secure.personal.insurances.InsuranceForm using operator . What I did is downloaded the 1.7.0 source code of the BeanUtils and applied the fixed for revision=154349. ** When I run the application again the exception occurs in the nested object. ** [01/05/07 15:06:43:775 EDT] 001d ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /WEB-INF/personal/insurances/insurance.jsp. Exception thrown : javax.servlet.ServletException: Unable to find a value for trustees in object of class hronline.secure.personal.insurances.BeneficiaryVO using operator . Is this still a problem or is my approach wrong. I'm in dire need of a fix or workaround, since my project needs the application to run on this new versioned server or else I must cancel it until a fix is out. Any feedback or suggestions would be greatly appreciated. - Glenn (I can provide the full stack trace if needed)
svn commit: r534264 - in /jakarta/commons/proper/lang/branches/LangTwo-1.x/src: java/org/apache/commons/lang2/ java/org/apache/commons/lang2/enum/ java/org/apache/commons/lang2/enums/ test/org/apache/
Author: bayard Date: Tue May 1 15:36:08 2007 New Revision: 534264 URL: http://svn.apache.org/viewvc?view=revrev=534264 Log: Killing the enum/enums packages and adding a proposed EnumUtils class that contains the previous functionality wrapped around java.lang.Enum Added: jakarta/commons/proper/lang/branches/LangTwo-1.x/src/java/org/apache/commons/lang2/EnumUtils.java Removed: jakarta/commons/proper/lang/branches/LangTwo-1.x/src/java/org/apache/commons/lang2/enum/ jakarta/commons/proper/lang/branches/LangTwo-1.x/src/java/org/apache/commons/lang2/enums/ jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/enum/ jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/enums/ Modified: jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/AllLangTestSuite.java Added: jakarta/commons/proper/lang/branches/LangTwo-1.x/src/java/org/apache/commons/lang2/EnumUtils.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/branches/LangTwo-1.x/src/java/org/apache/commons/lang2/EnumUtils.java?view=autorev=534264 == --- jakarta/commons/proper/lang/branches/LangTwo-1.x/src/java/org/apache/commons/lang2/EnumUtils.java (added) +++ jakarta/commons/proper/lang/branches/LangTwo-1.x/src/java/org/apache/commons/lang2/EnumUtils.java Tue May 1 15:36:08 2007 @@ -0,0 +1,39 @@ +package org.apache.commons.lang2; + +import java.util.ArrayList; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +/** + * Utility class for java.lang.Enum as found in Java 5. + * + * Lang1's EnumUtils.getEnum(Class,String) should be directly replaced by java.lang.Enum.valueOf(Class,String) + * Lang1's EnumUtils.getEnumList(Class) is now the deprecated EnumUtils.asList(Class) + */ +public class EnumUtils { + +public static E extends EnumE MapString, E getEnumMap(ClassE enumClass) { +HashMap map = new HashMapString, E(); +Iterator itr = EnumSet.allOf(enumClass).iterator(); +while(itr.hasNext()) { + Enum enm = (Enum) itr.next(); + map.put( enm.name(), enm ); +} +return map; +} + +/** + * @deprecated as coders should move to java.util.EnumSet.allOf(Class) + */ +public static E extends EnumE ListE asList(ClassE enumClass) { +return new ArrayListE( EnumSet.allOf(enumClass) ); +} + +public static E extends EnumE IteratorE iterator(ClassE enumClass) { +return EnumSet.allOf(enumClass).iterator(); +} + +} Modified: jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/AllLangTestSuite.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/AllLangTestSuite.java?view=diffrev=534264r1=534263r2=534264 == --- jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/AllLangTestSuite.java (original) +++ jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/AllLangTestSuite.java Tue May 1 15:36:08 2007 @@ -22,7 +22,6 @@ import junit.textui.TestRunner; import org.apache.commons.lang2.builder.BuilderTestSuite; -import org.apache.commons.lang2.enums.EnumTestSuite; import org.apache.commons.lang2.exception.ExceptionTestSuite; import org.apache.commons.lang2.math.MathTestSuite; import org.apache.commons.lang2.mutable.MutableTestSuite; @@ -59,8 +58,6 @@ suite.setName(Commons-Lang (all) Tests); suite.addTest(LangTestSuite.suite()); suite.addTest(BuilderTestSuite.suite()); -suite.addTest(EnumTestSuite.suite()); -suite.addTest(org.apache.commons.lang2.enum.EnumTestSuite.suite()); suite.addTest(ExceptionTestSuite.suite()); suite.addTest(MathTestSuite.suite()); suite.addTest(MutableTestSuite.suite()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r534268 - in /jakarta/commons/proper/lang/branches/LangTwo-1.x/src: java/org/apache/commons/lang2/ test/org/apache/commons/lang2/
Author: bayard Date: Tue May 1 15:40:50 2007 New Revision: 534268 URL: http://svn.apache.org/viewvc?view=revrev=534268 Log: Removing deprecated Number classes that are now found in the math subpackage Removed: jakarta/commons/proper/lang/branches/LangTwo-1.x/src/java/org/apache/commons/lang2/NumberRange.java jakarta/commons/proper/lang/branches/LangTwo-1.x/src/java/org/apache/commons/lang2/NumberUtils.java jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/NumberRangeTest.java jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/NumberUtilsTest.java Modified: jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/LangTestSuite.java Modified: jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/LangTestSuite.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/LangTestSuite.java?view=diffrev=534268r1=534267r2=534268 == --- jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/LangTestSuite.java (original) +++ jakarta/commons/proper/lang/branches/LangTwo-1.x/src/test/org/apache/commons/lang2/LangTestSuite.java Tue May 1 15:40:50 2007 @@ -69,8 +69,6 @@ suite.addTest(LocaleUtilsTest.suite()); suite.addTest(NotImplementedExceptionTest.suite()); suite.addTest(NullArgumentExceptionTest.suite()); -suite.addTest(NumberRangeTest.suite()); -suite.addTest(NumberUtilsTest.suite()); suite.addTest(ObjectUtilsTest.suite()); suite.addTest(RandomStringUtilsTest.suite()); suite.addTest(SerializationUtilsTest.suite()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (LANG-290) EnumUtils for JDK 5.0
[ https://issues.apache.org/jira/browse/LANG-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492982 ] Henri Yandell commented on LANG-290: Class committed to LangTwo branch. Needs tests and javadoc. EnumUtils for JDK 5.0 - Key: LANG-290 URL: https://issues.apache.org/jira/browse/LANG-290 Project: Commons Lang Issue Type: Improvement Affects Versions: 2.2 Reporter: Henri Yandell Fix For: LangTwo 1.0 Below is an EnumUtils for JDK 1.5. It's also found in the enums.EnumUtils javadoc: import java.util.*; public class EnumUtils { public static Enum getEnum(Class enumClass, String token) { return Enum.valueOf(enumClass, token); } public static Map getEnumMap(Class enumClass) { HashMap map = new HashMap(); Iterator itr = EnumUtils.iterator(enumClass); while(itr.hasNext()) { Enum enm = (Enum) itr.next(); map.put( enm.name(), enm ); } return map; } public static List getEnumList(Class enumClass) { return new ArrayList( EnumSet.allOf(enumClass) ); } public static Iterator iterator(Class enumClass) { return EnumUtils.getEnumList(enumClass).iterator(); } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (LANG-11) [lang] Clean up Lang for 3.0
[ https://issues.apache.org/jira/browse/LANG-11?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated LANG-11: -- Fix Version/s: (was: 3.0) LangTwo 1.0 [lang] Clean up Lang for 3.0 Key: LANG-11 URL: https://issues.apache.org/jira/browse/LANG-11 Project: Commons Lang Issue Type: Bug Affects Versions: 3.0 Environment: Operating System: other Platform: Other Reporter: Henri Yandell Fix For: LangTwo 1.0 Remove deprecated methods, classes and packages for Lang 3.0; and compile under Java 5 and 6. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r534277 - in /jakarta/commons/proper/lang/trunk/src: java/org/apache/commons/lang/LocaleUtils.java test/org/apache/commons/lang/LocaleUtilsTest.java
Author: bayard Date: Tue May 1 16:50:01 2007 New Revision: 534277 URL: http://svn.apache.org/viewvc?view=revrev=534277 Log: Applying unit test/fix for LANG-328 Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/LocaleUtils.java jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/LocaleUtilsTest.java Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/LocaleUtils.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/LocaleUtils.java?view=diffrev=534277r1=534276r2=534277 == --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/LocaleUtils.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/LocaleUtils.java Tue May 1 16:50:01 2007 @@ -111,6 +111,9 @@ throw new IllegalArgumentException(Invalid locale format: + str); } char ch3 = str.charAt(3); +if (ch3 == '_') { +return new Locale(str.substring(0, 2), , str.substring(4)); +} char ch4 = str.charAt(4); if (ch3 'A' || ch3 'Z' || ch4 'A' || ch4 'Z') { throw new IllegalArgumentException(Invalid locale format: + str); Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/LocaleUtilsTest.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/LocaleUtilsTest.java?view=diffrev=534277r1=534276r2=534277 == --- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/LocaleUtilsTest.java (original) +++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/LocaleUtilsTest.java Tue May 1 16:50:01 2007 @@ -498,4 +498,11 @@ } catch (UnsupportedOperationException ex) {} } +/** + * Tests #LANG-328 - only language+variant + */ +public void testLang328() { +assertValidToLocale(fr__POSIX, fr, , POSIX); +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (LANG-328) LocaleUtils.toLocale() rejects strings with only language+variant
[ https://issues.apache.org/jira/browse/LANG-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated LANG-328: --- Attachment: LANG-328.patch Attaching a unit test/fix patch for this. LocaleUtils.toLocale() rejects strings with only language+variant - Key: LANG-328 URL: https://issues.apache.org/jira/browse/LANG-328 Project: Commons Lang Issue Type: Bug Affects Versions: 2.3 Reporter: Emmanuel Bourg Fix For: 2.3.1 Attachments: LANG-328.patch LocaleUtils.toLocale() throws an exception on strings containing a language and a variant but no country code. For example : fr__POSIX This string can be produced with the JDK by instanciating a Locale with an empty string for the country : new Locale(fr, , POSIX).toString(). According to the javadoc for the Locale class a variant is allowed with just a language code or just a country code. Commons Configuration handles this case in its PropertyConverter.toLocale() method. I'd like to replace our implementation by the one provided by LocaleUtils, but our tests fail due to this case. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Resolved: (LANG-328) LocaleUtils.toLocale() rejects strings with only language+variant
[ https://issues.apache.org/jira/browse/LANG-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell resolved LANG-328. Resolution: Fixed svn ci -m Applying unit test/fix for LANG-328 Sendingsrc/java/org/apache/commons/lang/LocaleUtils.java Sendingsrc/test/org/apache/commons/lang/LocaleUtilsTest.java Transmitting file data .. Committed revision 534277. LocaleUtils.toLocale() rejects strings with only language+variant - Key: LANG-328 URL: https://issues.apache.org/jira/browse/LANG-328 Project: Commons Lang Issue Type: Bug Affects Versions: 2.3 Reporter: Emmanuel Bourg Fix For: 2.3.1 Attachments: LANG-328.patch LocaleUtils.toLocale() throws an exception on strings containing a language and a variant but no country code. For example : fr__POSIX This string can be produced with the JDK by instanciating a Locale with an empty string for the country : new Locale(fr, , POSIX).toString(). According to the javadoc for the Locale class a variant is allowed with just a language code or just a country code. Commons Configuration handles this case in its PropertyConverter.toLocale() method. I'd like to replace our implementation by the one provided by LocaleUtils, but our tests fail due to this case. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta-commons Wiki] Update of TLPResolution by HenriYandell
Dear Wiki user, You have subscribed to a wiki page or wiki category on Jakarta-commons Wiki for change notification. The following page has been changed by HenriYandell: http://wiki.apache.org/jakarta-commons/TLPResolution The comment on the change is: Justin figured Establishing would be fine. -- Project are hereafter discharged. }}} - We may need to adjust the resolution slight to say 'Reestablishing', but I don't think that will be a big change. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta-commons Wiki] Update of TLPResolution by HenriYandell
Dear Wiki user, You have subscribed to a wiki page or wiki category on Jakarta-commons Wiki for change notification. The following page has been changed by HenriYandell: http://wiki.apache.org/jakarta-commons/TLPResolution The comment on the change is: Signing up as an initial PMC member -- hereby are appointed to serve as the initial members of the Apache Commons Project: - * John Smith[EMAIL PROTECTED] + * Henri Yandell[EMAIL PROTECTED] NOW, THEREFORE, BE IT FURTHER RESOLVED, that XXX be appointed to the office of Vice President, Commons, to serve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [all] Going TLP?
On 4/2/07, Henri Yandell [EMAIL PROTECTED] wrote: So with that said - I'd like to propose that we move to commons.apache.org. Apologies for the delay. I a) wanted to back off and see what effect the proposal had on Jakarta, b) was on semi-vacation and c) was subsequently ill. We've three steps left (or two depending on how we choose to do them): 1) Signing up as initial members of the proposed Commons project 2) Volunteering/choosing a chair 3) Voting on [EMAIL PROTECTED] [I figure people can be signing up during that too]. So, firstly, feel free to go ahead and add your name to the resolution (http://wiki.apache.org/jakarta-commons/TLPResolution) and secondly, anyone want to volunteer to chair things? Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta-commons Wiki] Update of TLPResolution by jochen
Dear Wiki user, You have subscribed to a wiki page or wiki category on Jakarta-commons Wiki for change notification. The following page has been changed by jochen: http://wiki.apache.org/jakarta-commons/TLPResolution -- Apache Commons Project: * Henri Yandell[EMAIL PROTECTED] + * Jochen Wiedmann [EMAIL PROTECTED] NOW, THEREFORE, BE IT FURTHER RESOLVED, that XXX be appointed to the office of Vice President, Commons, to serve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [all] Going TLP?
On 5/2/07, Henri Yandell [EMAIL PROTECTED] wrote: (http://wiki.apache.org/jakarta-commons/TLPResolution) and secondly, anyone want to volunteer to chair things? As you are one of the most active persons here and also the one who is pushing this forward: How about yourself? :-) Jochen -- My cats know that I am a loser who goes out for hunting every day without ever returning as much as a single mouse. Fortunately, I've got a wife who's a real champ: She leaves the house and returns within half an hour, carrying whole bags full of meal. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [all] Going TLP?
On 5/1/07, Jochen Wiedmann [EMAIL PROTECTED] wrote: On 5/2/07, Henri Yandell [EMAIL PROTECTED] wrote: (http://wiki.apache.org/jakarta-commons/TLPResolution) and secondly, anyone want to volunteer to chair things? As you are one of the most active persons here and also the one who is pushing this forward: How about yourself? :-) A bunch of projects do a one year term, which I think is probably a very healthy thing. I'm happy to do the chair bit if no one else wants to, but I'll happily support anyone if they're interested. Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta-commons Wiki] Trivial Update of TLPResolution by MarioIvankovits
Dear Wiki user, You have subscribed to a wiki page or wiki category on Jakarta-commons Wiki for change notification. The following page has been changed by MarioIvankovits: http://wiki.apache.org/jakarta-commons/TLPResolution The comment on the change is: added myself -- * Henri Yandell[EMAIL PROTECTED] * Jochen Wiedmann [EMAIL PROTECTED] + * Mario Ivankovits [EMAIL PROTECTED] NOW, THEREFORE, BE IT FURTHER RESOLVED, that XXX be appointed to the office of Vice President, Commons, to serve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]