building openpgp, commons-sandbox-parent missing
Hello, I am trying to build commons-openpgp using maven. I am getting this error : [INFO] Scanning for projects... [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.apache.commons ArtifactId: commons-sandbox-parent Version: 1.0-SNAPSHOT Reason: Unable to download the artifact from any repository org.apache.commons:commons-sandbox-parent:pom:1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.apache.commons:commons-sandbox-parent for project: null:commons-openpgp:jar:1.0-SNAPSHOT Can someone help me with this ? I am using Maven 2.0.4 Regards, Antoine - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (CONFIGURATION-216) Inconsistent way to locate filename when creating configuration
[ http://issues.apache.org/jira/browse/CONFIGURATION-216?page=comments#action_12417252 ] Gabriele Garuglieri commented on CONFIGURATION-216: --- Hi Oliver, taking it just out of the box results in: [junit] Testcase: testInitFromClassPath took 0 sec [junit] Caused an ERROR [junit] Cannot locate configuration source config/deep/deeptest.properties [junit] org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source config/deep/deeptest.properties [junit] at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:208) [junit] at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:188) [junit] at org.apache.commons.configuration.TestFileConfiguration.testInitFromClassPath(TestFileConfiguration.java:489) when running tests during build. The problem is that in build.xml you copy config/deep/deeptest.properties into a further config nesting level so changing private static final String RESOURCE_NAME = config/deep/deeptest.properties; into private static final String RESOURCE_NAME = config/config/deep/deeptest.properties; into TestFileConfiguration, makes everything working. Inconsistent way to locate filename when creating configuration --- Key: CONFIGURATION-216 URL: http://issues.apache.org/jira/browse/CONFIGURATION-216 Project: Commons Configuration Type: Bug Environment: commons-configuration-1.3-dev Reporter: Gabriele Garuglieri Assignee: Oliver Heger Priority: Minor There is a different behaviour locating the configuration file in classpath depending on the way it is set in the configuration class. For example assuming conf/conf1.properties exists in classpath: PropertiesConfiguration pc = new PropertiesConfiguration(conf/conf1.properties); gives org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source conf1.properties while PropertiesConfiguration pc = new PropertiesConfiguration(); pc.setFileName(conf/conf1.properties); pc.load(); properly locate file in classpath and loads it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building openpgp, commons-sandbox-parent missing
At present, you need to have checked out the entire trunks-sandbox (I need to revisit this build after some more recent changes that should make it easier now). - Brett On 22/06/2006 4:23 PM, Antoine Levy-Lambert wrote: Hello, I am trying to build commons-openpgp using maven. I am getting this error : [INFO] Scanning for projects... [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.apache.commons ArtifactId: commons-sandbox-parent Version: 1.0-SNAPSHOT Reason: Unable to download the artifact from any repository org.apache.commons:commons-sandbox-parent:pom:1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.apache.commons:commons-sandbox-parent for project: null:commons-openpgp:jar:1.0-SNAPSHOT Can someone help me with this ? I am using Maven 2.0.4 Regards, Antoine - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brett Porter [EMAIL PROTECTED] Apache Maven - http://maven.apache.org/ Better Builds with Maven - http://library.mergere.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DBCP] state of DBCP
On 6/21/06, Phil Steitz [EMAIL PROTECTED] wrote: On 6/21/06, jerome lacoste [EMAIL PROTECTED] wrote: Hi, I've submitted a patch some days ago and am waiting for comments (DBCP-175). In the mean time, I've had a look at the status of DBCP. Some notes: - no release since 2004 - there are 10+ issues marked UNRESOLVED but with a Resolved status in Jira. Could be cleaned up. - althought I don't have many problems with DBCP myself, I've seen issues of various types in Jira: NPEs, leaks, thread related issues, class loading issues, equals()/hashcode() issues etc... Pretty scary to me :) So I think it is time to decide what to do next... Should there be a 1.2.2 release? A 1.3? Who's involved today in DBCP ? I have been slowly plowing through the issues and have posted a release plan on the wiki here: http://wiki.apache.org/jakarta-commons/DBCP/1%2e2%2e2ReleasePlan OK I am relieved :) I can help triaging those issues, sending patches to fix some of them, but I don't want to send patches that will stay in Jira for years. Please, please keep the patches coming. I am reviewing the ones you submitted and will update Jira / apply in the next day or two. Any one else interested and knowledgeable of [dbcp] code base, pls chime in. Also, pls update the Wiki page to reflect any opinions that you have on which bugs absolutely must get fixed in 1.2.2. Your plan sounds very good. Only question is why not using Jira in the first place to target issues? DBCP-128 should probably be fixed later as it will probably require to change the implementation of equals and hashcode. You never know what this might break... DBCP-68 was committed. See http://issues.apache.org/jira/browse/DBCP-68#action_12411844 Cheers, Jerome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building openpgp, commons-sandbox-parent missing
Hello Brett, I have checked out each of the commons-sandbox subproject parallel to each other, but this does not help $ for a in id javaflow jci pipeline project-template proposal proxy do echo $a svn co http://svn.apache.org/repos/asf/jakarta/commons/sandbox/$a/trunk $a done How should the directory structure look like ? Regards, Antoine Brett Porter wrote: At present, you need to have checked out the entire trunks-sandbox (I need to revisit this build after some more recent changes that should make it easier now). - Brett On 22/06/2006 4:23 PM, Antoine Levy-Lambert wrote: Hello, I am trying to build commons-openpgp using maven. I am getting this error : [INFO] Scanning for projects... [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.apache.commons ArtifactId: commons-sandbox-parent Version: 1.0-SNAPSHOT Reason: Unable to download the artifact from any repository org.apache.commons:commons-sandbox-parent:pom:1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.apache.commons:commons-sandbox-parent for project: null:commons-openpgp:jar:1.0-SNAPSHOT Can someone help me with this ? I am using Maven 2.0.4 Regards, Antoine - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DBCP] state of DBCP
On 6/21/06, jerome lacoste [EMAIL PROTECTED] wrote: On 6/21/06, Phil Steitz [EMAIL PROTECTED] wrote: On 6/21/06, jerome lacoste [EMAIL PROTECTED] wrote: Hi, I've submitted a patch some days ago and am waiting for comments (DBCP-175). In the mean time, I've had a look at the status of DBCP. Some notes: - no release since 2004 - there are 10+ issues marked UNRESOLVED but with a Resolved status in Jira. Could be cleaned up. - althought I don't have many problems with DBCP myself, I've seen issues of various types in Jira: NPEs, leaks, thread related issues, class loading issues, equals()/hashcode() issues etc... Pretty scary to me :) So I think it is time to decide what to do next... Should there be a 1.2.2 release? A 1.3? Who's involved today in DBCP ? I have been slowly plowing through the issues and have posted a release plan on the wiki here: http://wiki.apache.org/jakarta-commons/DBCP/1%2e2%2e2ReleasePlan OK I am relieved :) I can help triaging those issues, sending patches to fix some of them, but I don't want to send patches that will stay in Jira for years. Please, please keep the patches coming. I am reviewing the ones you submitted and will update Jira / apply in the next day or two. Any one else interested and knowledgeable of [dbcp] code base, pls chime in. Also, pls update the Wiki page to reflect any opinions that you have on which bugs absolutely must get fixed in 1.2.2. Your plan sounds very good. Only question is why not using Jira in the first place to target issues? Because we started planning this release before the Jira migration ;-) Probably a good idea to just do it all in Jira now. Feel free to jump in. DBCP-128 should probably be fixed later as it will probably require to change the implementation of equals and hashcode. You never know what this might break... Yes, that is really too bad, but I agree. DBCP-68 was committed. See http://issues.apache.org/jira/browse/DBCP-68#action_12411844 Good. Comments on other tickets and patches welcome! Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building openpgp, commons-sandbox-parent missing
Try: svn co http://svn.apache.org/repos/asf/jakarta/commons/trunks-sandbox/ That will grab them all via externals, and the important files are in that directory itself (this is the thing I wanted to change). - Brett On 22/06/2006 5:27 PM, Antoine Levy-Lambert wrote: Hello Brett, I have checked out each of the commons-sandbox subproject parallel to each other, but this does not help $ for a in id javaflow jci pipeline project-template proposal proxy do echo $a svn co http://svn.apache.org/repos/asf/jakarta/commons/sandbox/$a/trunk $a done How should the directory structure look like ? Regards, Antoine Brett Porter wrote: At present, you need to have checked out the entire trunks-sandbox (I need to revisit this build after some more recent changes that should make it easier now). - Brett On 22/06/2006 4:23 PM, Antoine Levy-Lambert wrote: Hello, I am trying to build commons-openpgp using maven. I am getting this error : [INFO] Scanning for projects... [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.apache.commons ArtifactId: commons-sandbox-parent Version: 1.0-SNAPSHOT Reason: Unable to download the artifact from any repository org.apache.commons:commons-sandbox-parent:pom:1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.apache.commons:commons-sandbox-parent for project: null:commons-openpgp:jar:1.0-SNAPSHOT Can someone help me with this ? I am using Maven 2.0.4 Regards, Antoine - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brett Porter [EMAIL PROTECTED] Apache Maven - http://maven.apache.org/ Better Builds with Maven - http://library.mergere.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [DBCP] state of DBCP
Your plan sounds very good. Only question is why not using Jira in the first place to target issues? Because we started planning this release before the Jira migration ;-) Probably a good idea to just do it all in Jira now. Feel free to jump in. Probably can't do much with Jira in terms of editing the fix version field as I have no rights. IANAC(ommiter) :) DBCP-128 should probably be fixed later as it will probably require to change the implementation of equals and hashcode. You never know what this might break... Yes, that is really too bad, but I agree. DBCP-68 was committed. See http://issues.apache.org/jira/browse/DBCP-68#action_12411844 Good. Comments on other tickets and patches welcome! I looked at your other Recommended dispositions in the wiki page and they all seemed logical. Jerome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs][all] nightly build changed?
Making some progress here, thanks to patient assistance from Brett. We have a Continuum instance set up on the vmbuild machine and I am in process of setting the components previously set up for nightlies. My plan is to start by just having Continuum do the svn ups and execute the Ant builds like the old nightlies. I will add a little script to change names and scp the results to people.apache.org. Over time, as and when things move to m2, the name munging won't be necessary and (hopefully) we will find a good way to move the artifacts or Continuum can just do that. I know the struts people are looking into this. Sound good? If I don't hear any objections, I will plow ahead with the plan above. Shouldn't take too long. Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[transaction] AbstractXAResource: prepare() with result XA_RDONLY without commit()
I came across some further problems with the transactional FileResourceManager and the XAResource implementation. Simple deletes of resources did not get applied for me. Debugging showed that no commit was triggered. The reason: deleteResource() and createResource() in FileResourceManager were assumed as being read-only (TransactionContext.readOnly not set to false). The TransactionManager got XA_RDONLY as return value of XAResource.prepare() and so did not trigger commit() or rollback(). The transaction in FileResourceManager remains in uncompleted state. I'm going to commit a fix for this problem. Second problem is the prepare() with result XA_RDONLY without commit(). I assume it is a bug in AbstractXAResource too, but maybe somebody can confirm it first. There is no clear comment about it in the spec. Only the API for XAResource says for XA_RDONLY: The transaction branch has been read-only and has been committed. That is probably why the TransactionManager did not trigger a commit() on prepare() with XA_RDONLY. WDYT? Regards, Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: building openpgp, commons-sandbox-parent missing
Thanks Brett, Regards, Antoine Original-Nachricht Datum: Thu, 22 Jun 2006 17:37:55 +1000 Von: Brett Porter [EMAIL PROTECTED] An: Jakarta Commons Developers List commons-dev@jakarta.apache.org Betreff: Re: building openpgp, commons-sandbox-parent missing Try: svn co http://svn.apache.org/repos/asf/jakarta/commons/trunks-sandbox/ That will grab them all via externals, and the important files are in that directory itself (this is the thing I wanted to change). - Brett On 22/06/2006 5:27 PM, Antoine Levy-Lambert wrote: Hello Brett, I have checked out each of the commons-sandbox subproject parallel to each other, but this does not help $ for a in id javaflow jci pipeline project-template proposal proxy do echo $a svn co http://svn.apache.org/repos/asf/jakarta/commons/sandbox/$a/trunk $a done How should the directory structure look like ? Regards, Antoine Brett Porter wrote: At present, you need to have checked out the entire trunks-sandbox (I need to revisit this build after some more recent changes that should make it easier now). - Brett On 22/06/2006 4:23 PM, Antoine Levy-Lambert wrote: Hello, I am trying to build commons-openpgp using maven. I am getting this error : [INFO] Scanning for projects... [INFO] [ERROR] FATAL ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.apache.commons ArtifactId: commons-sandbox-parent Version: 1.0-SNAPSHOT Reason: Unable to download the artifact from any repository org.apache.commons:commons-sandbox-parent:pom:1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.apache.commons:commons-sandbox-parent for project: null:commons-openpgp:jar:1.0-SNAPSHOT Can someone help me with this ? I am using Maven 2.0.4 Regards, Antoine - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brett Porter [EMAIL PROTECTED] Apache Maven - http://maven.apache.org/ Better Builds with Maven - http://library.mergere.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [transaction] AbstractXAResource: prepare() with result XA_RDONLY without commit()
2006/6/22, Joerg Heinicke [EMAIL PROTECTED]: I came across some further problems with the transactional FileResourceManager and the XAResource implementation. Simple deletes of resources did not get applied for me. Debugging showed that no commit was triggered. The reason: deleteResource() and createResource() in FileResourceManager were assumed as being read-only (TransactionContext.readOnly not set to false). The TransactionManager got XA_RDONLY as return value of XAResource.prepare() and so did not trigger commit() or rollback(). The transaction in FileResourceManager remains in uncompleted state. I'm going to commit a fix for this problem. Hard to believe, but this really seems to be true. A fix should be simple, right? Will you do that. I wonder why this hasn't shown before? Second problem is the prepare() with result XA_RDONLY without commit(). I assume it is a bug in AbstractXAResource too, but maybe somebody can confirm it first. There is no clear comment about it in the spec. Only the API for XAResource says for XA_RDONLY: The transaction branch has been read-only and has been committed. That is probably why the TransactionManager did not trigger a commit() on prepare() with XA_RDONLY. WDYT? Yes, I think when the result is XA_RDONLY there is no need for a commit, as there is nothing to commit. I just wonder when the transaction is ended. When are the read locks set free? Oliver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logging related problem with HttpClient
Hello, I am having problems while using HttpClient. Here is a sample code : package src.com.example.web; // all necessary imports import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.methods.*; import org.apache.commons.httpclient.params.HttpMethodParams; public class Sample { private static String url = http://www.apache.org/;; public static void main(String[] args) { // Create an instance of HttpClient. HttpClient client = new HttpClient(); } } I have made sure that following jars are in the classpath : commons-codec-1.3.jar commons-logging-1.1.jar commons-logging-adapters-1.1.jar commons-logging-api-1.1.jar junit-4.1.jar commons-httpclient-3.0.1.jar I am getting the following runtime error: Exception in thread main java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.httpclient.HttpClient.clinit(HttpClient.java:65) at src.com.example.web.Sample.main(Sample.java:12) I have also tried using log4j but that didnot solve the problem. (As an aside I am using Java 5.0 so I thing the logging facility provided by java.util should be fine) Any pointers regarding how to remove this error and get the code working? Thanks in Advance ~Neelesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apologies (Was Re: Logging related problem with HttpClient)
On 6/22/06, Neelesh Bodas [EMAIL PROTECTED] wrote: Hello, I am having problems while using HttpClient. Here is a sample code : [rest message removed ] Apologies for writing to a wrong mailing list. Please ignore the message, I am resending to the correct mailing list (The user's mailing list) Thanks ~Neelesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logging related problem with HttpClient
Neelesh, Please see http://jakarta.apache.org/commons/httpclient/dependencies.html for the correct version of the dependencies. Note: HttpClient is no longer in Jakarta Commons. Our mailing lists are these: http://jakarta.apache.org/commons/httpclient/mail-lists.html Cheers Ortwin Neelesh Bodas wrote: I have made sure that following jars are in the classpath : commons-codec-1.3.jar commons-logging-1.1.jar commons-logging-adapters-1.1.jar commons-logging-api-1.1.jar junit-4.1.jar commons-httpclient-3.0.1.jar I am getting the following runtime error: Exception in thread main java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.httpclient.HttpClient.clinit(HttpClient.java:65) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r416449 - /jakarta/commons/proper/configuration/trunk/build.xml
Author: oheger Date: Thu Jun 22 12:31:27 2006 New Revision: 416449 URL: http://svn.apache.org/viewvc?rev=416449view=rev Log: Changed copying of test resources in ant build to be consistent with the maven build Modified: jakarta/commons/proper/configuration/trunk/build.xml Modified: jakarta/commons/proper/configuration/trunk/build.xml URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/build.xml?rev=416449r1=416448r2=416449view=diff == --- jakarta/commons/proper/configuration/trunk/build.xml (original) +++ jakarta/commons/proper/configuration/trunk/build.xml Thu Jun 22 12:31:27 2006 @@ -38,7 +38,7 @@ !-- Manual changes for dealing with the conf directory and jdbc dependency -- property name=confdir value=conf/ - property name=targetconfdir value=${defaulttargetdir}/${confdir}/ + property name=targetconfdir value=${testclassesdir}/ property file=build.properties/ !-- Manual changes end -- @@ -178,19 +178,7 @@ mkdir dir=${targetconfdir}/ copy todir=${targetconfdir} fileset dir=${confdir} -include name=*.xml -/include - /fileset -/copy -copy todir=${targetconfdir} - fileset dir=${confdir} -include name=testClasspath.properties -/include -include name=testdb.script -/include -include name=*.properties -/include -include name=*.dtd +include name=**/*.* /include /fileset /copy @@ -201,14 +189,6 @@ include name=test.properties /include include name=include.properties -/include - /fileset -/copy -mkdir dir=${testclassesdir}/config -/mkdir -copy todir=${testclassesdir}/config - fileset dir=${confdir} -include name=**/*.properties /include /fileset /copy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (CONFIGURATION-216) Inconsistent way to locate filename when creating configuration
[ http://issues.apache.org/jira/browse/CONFIGURATION-216?page=comments#action_12417354 ] Oliver Heger commented on CONFIGURATION-216: You are right! The problem did not occur to me because I use the maven build. And after a maven build ran successfully the ant build is successful, too, because maven copies the files to the right location. Well, I changed the copying stuff in build.xml, and now both builds should work. Sorry! Inconsistent way to locate filename when creating configuration --- Key: CONFIGURATION-216 URL: http://issues.apache.org/jira/browse/CONFIGURATION-216 Project: Commons Configuration Type: Bug Environment: commons-configuration-1.3-dev Reporter: Gabriele Garuglieri Assignee: Oliver Heger Priority: Minor There is a different behaviour locating the configuration file in classpath depending on the way it is set in the configuration class. For example assuming conf/conf1.properties exists in classpath: PropertiesConfiguration pc = new PropertiesConfiguration(conf/conf1.properties); gives org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source conf1.properties while PropertiesConfiguration pc = new PropertiesConfiguration(); pc.setFileName(conf/conf1.properties); pc.load(); properly locate file in classpath and loads it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Created: (LANG-264) ToStringBuilder/HashCodeBuilder javadoc code examples
ToStringBuilder/HashCodeBuilder javadoc code examples - Key: LANG-264 URL: http://issues.apache.org/jira/browse/LANG-264 Project: Commons Lang Type: Bug Reporter: Corey Tripp Priority: Trivial The example code illistrating the use of ToStringBuidler and HashCodeBuilder reference a 'smoker' field of the example Person class, however the field is actually named 'isSmoker'. They propably should match each other. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (CLI-12) [cli] Not handling property=value followed by 'remaining' args
[ http://issues.apache.org/jira/browse/CLI-12?page=all ] Hairong Kuang updated CLI-12: - Attachment: arg_pattern.patch here is the patch [cli] Not handling property=value followed by 'remaining' args -- Key: CLI-12 URL: http://issues.apache.org/jira/browse/CLI-12 Project: Commons CLI Type: Bug Environment: Operating System: other Platform: Other Reporter: Jim Skufca Attachments: arg_pattern.patch If you have a command line args similar to domything -Dmyprop1=myval1 -Dmyprop2=myval2 myfile I would expect to be able to set up the 'D' option so that String[] opts = line.getOptionValues( D ); assertEquals( myprop1, opts[0] ); assertEquals( myval1, opts[1] ); assertEquals( myprop2, opts[2] ); assertEquals( myval2, opts[3] ); String[] xtraArgs = line.getArgs(); assertEquals( myfile, xtraArgs[0]); But, setting up similar to the ApplicationTest.java I get 'myfile' as opts [4]. Since we have set up the 'D' option with hasArgs, it will only stop adding args to 'D' when it runs into another valid option, not an extra arg. If you set up the 'D' option with hasArg (singular) then it myprop1=myval1 gets reported as an invalid option. I've glanced at the source but didn't see an obvious fix that wouldn't jeopardize the combinations and permutations that Option.addValue() must deal with. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (LANG-264) ToStringBuilder/HashCodeBuilder javadoc code examples
[ http://issues.apache.org/jira/browse/LANG-264?page=all ] Corey Tripp updated LANG-264: - Attachment: ToStringBuilderComment.patch Here's a patch to change the definitions to 'smoker' instead of 'isSmoker' from the trunk. ToStringBuilder/HashCodeBuilder javadoc code examples - Key: LANG-264 URL: http://issues.apache.org/jira/browse/LANG-264 Project: Commons Lang Type: Bug Reporter: Corey Tripp Priority: Trivial Attachments: ToStringBuilderComment.patch The example code illistrating the use of ToStringBuidler and HashCodeBuilder reference a 'smoker' field of the example Person class, however the field is actually named 'isSmoker'. They propably should match each other. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (LANG-264) ToStringBuilder/HashCodeBuilder javadoc code examples
[ http://issues.apache.org/jira/browse/LANG-264?page=all ] Corey Tripp updated LANG-264: - Attachment: HashCodeBuilderComment.patch ToStringBuilder/HashCodeBuilder javadoc code examples - Key: LANG-264 URL: http://issues.apache.org/jira/browse/LANG-264 Project: Commons Lang Type: Bug Reporter: Corey Tripp Priority: Trivial Attachments: HashCodeBuilderComment.patch, ToStringBuilderComment.patch The example code illistrating the use of ToStringBuidler and HashCodeBuilder reference a 'smoker' field of the example Person class, however the field is actually named 'isSmoker'. They propably should match each other. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r416487 - in /jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder: CompareToBuilder.java EqualsBuilder.java HashCodeBuilder.java ReflectionToStringBuilder.java
Author: bayard Date: Thu Jun 22 15:20:44 2006 New Revision: 416487 URL: http://svn.apache.org/viewvc?rev=416487view=rev Log: Added Collection APIs for the excludeFieldNames as suggested at the end of LANG-226 Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/CompareToBuilder.java jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/HashCodeBuilder.java jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ReflectionToStringBuilder.java Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/CompareToBuilder.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/CompareToBuilder.java?rev=416487r1=416486r2=416487view=diff == --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/CompareToBuilder.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/CompareToBuilder.java Thu Jun 22 15:20:44 2006 @@ -20,6 +20,7 @@ import java.lang.reflect.Modifier; import java.util.Arrays; import java.util.Collections; +import java.util.Collection; import java.util.Comparator; import java.util.List; @@ -192,7 +193,39 @@ * * @param lhs left-hand object * @param rhs right-hand object - * @param excludeFields fields to exclude + * @param excludeFields Collection of String fields to exclude + * @return a negative integer, zero, or a positive integer as codelhs/code + * is less than, equal to, or greater than coderhs/code + * @throws NullPointerException if either codelhs/code or coderhs/code + * (but not both) is codenull/code + * @throws ClassCastException if coderhs/code is not assignment-compatible + * with codelhs/code + */ +public static int reflectionCompare(Object lhs, Object rhs, Collection /*String*/ excludeFields) { +return reflectionCompare(lhs, rhs, ReflectionToStringBuilder.toNoNullStringArray(excludeFields)); +} + +/** + * pCompares two codeObject/codes via reflection./p + * + * pFields can be private, thus codeAccessibleObject.setAccessible/code + * is used to bypass normal access control checks. This will fail under a + * security manager unless the appropriate permissions are set./p + * + * ul + * liStatic fields will not be compared/li + * liIf codecompareTransients/code is codetrue/code, + * compares transient members. Otherwise ignores them, as they + * are likely derived fields./li + * liSuperclass fields will be compared/li + * /ul + * + * pIf both codelhs/code and coderhs/code are codenull/code, + * they are considered equal./p + * + * @param lhs left-hand object + * @param rhs right-hand object + * @param excludeFields array of fields to exclude * @return a negative integer, zero, or a positive integer as codelhs/code * is less than, equal to, or greater than coderhs/code * @throws NullPointerException if either codelhs/code or coderhs/code Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java?rev=416487r1=416486r2=416487view=diff == --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/EqualsBuilder.java Thu Jun 22 15:20:44 2006 @@ -20,6 +20,7 @@ import java.lang.reflect.Modifier; import java.util.Arrays; import java.util.Collections; +import java.util.Collection; import java.util.List; /** @@ -122,6 +123,29 @@ */ public static boolean reflectionEquals(Object lhs, Object rhs) { return reflectionEquals(lhs, rhs, false, null, null); +} + +/** + * pThis method uses reflection to determine if the two codeObject/codes + * are equal./p + * + * pIt uses codeAccessibleObject.setAccessible/code to gain access to private + * fields. This means that it will throw a security exception if run under + * a security manager, if the permissions are not set up correctly. It is also + * not as efficient as testing explicitly./p + * + * pTransient members will be not be tested, as they are likely derived + * fields, and not part of the value of the Object./p + * + * pStatic fields will not be tested. Superclass fields will be included./p + * + * @param lhs codethis/code object + * @param rhs the other object
[jira] Resolved: (LANG-226) [lang] Using ReflectionToStringBuilder and excluding secure fields
[ http://issues.apache.org/jira/browse/LANG-226?page=all ] Henri Yandell resolved LANG-226: Resolution: Fixed I've added Collection variants for the other exclude APIs. svn ci -m Added Collection APIs for the excludeFieldNames as sugge sted at the end of LANG-226 Sendingbuilder/CompareToBuilder.java Sendingbuilder/EqualsBuilder.java Sendingbuilder/HashCodeBuilder.java Sendingbuilder/ReflectionToStringBuilder.java Transmitting file data Committed revision 416487. [lang] Using ReflectionToStringBuilder and excluding secure fields -- Key: LANG-226 URL: http://issues.apache.org/jira/browse/LANG-226 Project: Commons Lang Type: Improvement Versions: Nightly Builds Environment: Operating System: All Platform: Other Reporter: Gary Gregory Priority: Minor Fix For: 2.2 Short discussion: http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev/200508.mbox/[EMAIL PROTECTED] -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r416495 - in /jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder: HashCodeBuilder.java ToStringBuilder.java
Author: bayard Date: Thu Jun 22 16:03:20 2006 New Revision: 416495 URL: http://svn.apache.org/viewvc?rev=416495view=rev Log: Fixing isSmoker attribute name to smoker to match the code example in both of these files - spotted by Corey Tripp in LANG-264 Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/HashCodeBuilder.java jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringBuilder.java Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/HashCodeBuilder.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/HashCodeBuilder.java?rev=416495r1=416494r2=416495view=diff == --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/HashCodeBuilder.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/HashCodeBuilder.java Thu Jun 22 16:03:20 2006 @@ -42,7 +42,7 @@ * public class Person { * String name; * int age; - * boolean isSmoker; + * boolean smoker; * ... * * public int hashCode() { Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringBuilder.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringBuilder.java?rev=416495r1=416494r2=416495view=diff == --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringBuilder.java (original) +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/builder/ToStringBuilder.java Thu Jun 22 16:03:20 2006 @@ -38,7 +38,7 @@ * public class Person { * String name; * int age; - * boolean isSmoker; + * boolean smoker; * * ... * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r416496 - in /jakarta/commons/proper/transaction/trunk: RELEASE-NOTES.txt src/java/org/apache/commons/transaction/file/FileResourceManager.java
Author: joerg Date: Thu Jun 22 16:03:46 2006 New Revision: 416496 URL: http://svn.apache.org/viewvc?rev=416496view=rev Log: Fixed issue with deleteResource(..) and createResource(..) of FileResourceManager seen as read-only operations. Modified: jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java Modified: jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt?rev=416496r1=416495r2=416496view=diff == --- jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt (original) +++ jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt Thu Jun 22 16:03:46 2006 @@ -36,6 +36,7 @@ - Fixed bugzilla issue 35377. Synchronizing on Set activeTransactions while iterating over its items in OptimisticMapWrapper.copyChangesToConcurrentTransactions() for preventing ConcurrentModificationException. - Fixed bugzilla issue 37379. The construction of the transaction specific path is now done via a TransactionIdToPathMapper. +- Fixed issue with deleteResource(..) and createResource(..) of FileResourceManager seen as read-only operations. KNOWN ISSUES Modified: jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java?rev=416496r1=416495r2=416496view=diff == --- jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java (original) +++ jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java Thu Jun 22 16:03:46 2006 @@ -729,6 +729,7 @@ String txDeletePath = getDeletePath(txId, resourceId); String mainPath = getMainPath(resourceId); try { +getContext(txId).readOnly = false; // first undo change / create when there was one undoScheduledChangeOrCreate(txId, resourceId); @@ -769,7 +770,8 @@ String txChangePath = getChangePath(txId, resourceId); try { - +getContext(txId).readOnly = false; + // creation means either undoing a delete or actually scheduling a create if (!undoScheduledDelete(txId, resourceId)) { FileHelper.createFile(txChangePath); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Resolved: (LANG-264) ToStringBuilder/HashCodeBuilder javadoc code examples
[ http://issues.apache.org/jira/browse/LANG-264?page=all ] Henri Yandell resolved LANG-264: Fix Version: 2.2 Resolution: Fixed Done, thanks Corey. svn ci -m Fixing isSmoker attribute name to smoker to match the co de example in both of these files - spotted by Corey Tripp in LANG-264 Sendingbuilder/HashCodeBuilder.java Sendingbuilder/ToStringBuilder.java Transmitting file data .. Committed revision 416495. ToStringBuilder/HashCodeBuilder javadoc code examples - Key: LANG-264 URL: http://issues.apache.org/jira/browse/LANG-264 Project: Commons Lang Type: Bug Reporter: Corey Tripp Priority: Trivial Fix For: 2.2 Attachments: HashCodeBuilderComment.patch, ToStringBuilderComment.patch The example code illistrating the use of ToStringBuidler and HashCodeBuilder reference a 'smoker' field of the example Person class, however the field is actually named 'isSmoker'. They propably should match each other. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
svn commit: r416498 - in /jakarta/commons/proper/transaction/trunk: RELEASE-NOTES.txt src/java/org/apache/commons/transaction/util/xa/AbstractXAResource.java
Author: joerg Date: Thu Jun 22 16:11:04 2006 New Revision: 416498 URL: http://svn.apache.org/viewvc?rev=416498view=rev Log: Fixed issue with AbstractXAResource: resources did not get released when prepare(..) returns XA_RDONLY as no commit(..) is triggered by the TransactionManager explicitely. Modified: jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/xa/AbstractXAResource.java Modified: jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt?rev=416498r1=416497r2=416498view=diff == --- jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt (original) +++ jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt Thu Jun 22 16:11:04 2006 @@ -37,6 +37,8 @@ OptimisticMapWrapper.copyChangesToConcurrentTransactions() for preventing ConcurrentModificationException. - Fixed bugzilla issue 37379. The construction of the transaction specific path is now done via a TransactionIdToPathMapper. - Fixed issue with deleteResource(..) and createResource(..) of FileResourceManager seen as read-only operations. +- Fixed issue with AbstractXAResource. Resources did not get released when prepare(..) returns XA_RDONLY as no + commit(..) is triggered by the TransactionManager explicitely. KNOWN ISSUES Modified: jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/xa/AbstractXAResource.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/xa/AbstractXAResource.java?rev=416498r1=416497r2=416498view=diff == --- jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/xa/AbstractXAResource.java (original) +++ jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/xa/AbstractXAResource.java Thu Jun 22 16:11:04 2006 @@ -125,6 +125,11 @@ int result = ts.prepare(); ts.setStatus(STATUS_PREPARED); + +if (result == XA_RDONLY) { +commit(xid, false); +} + return result; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [transaction] AbstractXAResource: prepare() with result XA_RDONLY without commit()
Oliver Zeigermann oliver.zeigermann at gmail.com writes: The reason: deleteResource() and createResource() in FileResourceManager were assumed as being read-only (TransactionContext.readOnly not set to false). Hard to believe, but this really seems to be true. A fix should be simple, right? Will you do that. I wonder why this hasn't shown before? The fix is hopefully as simple as I did it. I tested it at least using that patch and got my symptoms fixed (read below). Why it hasn't shown before? Good question. What I can imagine - at least for createResource() - is that nobody actually just uses createResource() but also writeResource(). If nobody has ever used a simple single deleteResource() as I do it does not bubble up. I would really like to add such things as test cases but I'm unfortunately really short on time at the moment. There is no clear comment about it in the spec. Only the API for XAResource says for XA_RDONLY: The transaction branch has been read-only and has been committed. That is probably why the TransactionManager did not trigger a commit() on prepare() with XA_RDONLY. Yes, I think when the result is XA_RDONLY there is no need for a commit, as there is nothing to commit. I just wonder when the transaction is ended. When are the read locks set free? The problem is that these resources were never freed. And I observed it just by some symptoms: In my work dir more and more directories got added but not freed after the end of the transaction. The transaction simply did not end. With fixing read-only status of deleteResource() and createResource() I got at least lower growth-rate of directories, but real read-only operations did still end in remaining directories. I added a quick fix checking for XA_RDONLY in AbstractXAResource.prepare() and committing in case of. It might not be really appropriate, but had no other short-term solution. And I do not really know if the immediate release of resources in FileResourceManager.prepare() in case of read-only status is more appropriate as the specific transaction management (no commit() when prepare() returns read-only) comes from JTA. OTOH why should other transaction management implementations behave differently when there are well-known basics. Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: building openpgp, commons-sandbox-parent missing
Hello, Brett, I have done what you suggested. It looks like there is a jar missing : http://snapshots.maven.codehaus.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-SNAPSHOT/maven-site-plugin-2.0-SNAPSHOT.jar Do I need to create an upload request JIRA ? or do you want to change something in commons-sandbox ? Regards, Antoine Brett Porter wrote: Try: svn co http://svn.apache.org/repos/asf/jakarta/commons/trunks-sandbox/ That will grab them all via externals, and the important files are in that directory itself (this is the thing I wanted to change). - Brett [INFO] Scanning for projects... [INFO] [INFO] Building Commons OpenPGP [INFO]task-segment: [compile] [INFO] Downloading: http://snapshots.maven.codehaus.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-SNAPSHOT/maven-site-plugin-2.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository snapshots (http://snapshots.maven.codehaus.org/maven2) [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-site-plugin \ -Dversion=2.0-SNAPSHOT -Dpackaging=maven-plugin -Dfile=/path/to/file org.apache.maven.plugins:maven-site-plugin:maven-plugin:2.0-SNAPSHOT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [all][scxml] Version 1.0 RC 1 available
I wish I had found time to play with SCXML previously - what you've done looks good Rahul. 1) What is the status of the SCXML specification? The docs currently mention the working draft from July 2005 - but the latest on the web site is January 2006. I'm wondering how much change (if any) there is likely to be between the current working draft and the (presumably) 1.0 version of the spec. Maybe it would be better to release SCXML with a different version number (e.g. 0.8 or WD2 etc) and save the 1.0 version for when the spec is final and put health warnings that the API may change depending on the final specification. 2) I'm not an expert in listeners/events - but typically listeners extend the java.util.EventListener tagging interface and events extend java.util.EventObject. Also the operations of a listener typically take an event object which SCXML doesn't seem to follow. Wouldn't it be better to follow this pattern for SCXML? 3) My instinct would have been to avoid dependencies on the servlet/JSF api and to keep SCXML more tightly focused on its primary aim. I realize you're trying to facilitate usage from these technologies by providing the context implementations but since these are minor wouldn't it be better to just document how-to for these and keep SCXML dependencies to a minimum. Maybe having these dependencies will make it tempting to provide further technology dependant features in the future - blurring the scope of the component. 4) In the user guide Hello World with a custom action - link is invalid (points to custom-hello-world.xml but should be either custom-hello-world-01-.xml or custom-hello-world-02-.xml) 5) In the SCXML Digster part of the user guide it would be better IMO to point to the javadoc for the model package, rather than the subversion repository. Niall On 6/20/06, Rahul Akolkar [EMAIL PROTECTED] wrote: Release Candidate 1 for Commons SCXML 1.0 is available for review: http://people.apache.org/~rahul/commons/scxml/dist/ New version of the Commons SCXML site: http://people.apache.org/~rahul/commons/scxml/ This is the first release, release notes are bland: http://people.apache.org/~rahul/commons/scxml/RELEASE-NOTES.txt More details are in the changes report: http://people.apache.org/~rahul/commons/scxml/changes-report.html My key is here, amongst other places: http://people.apache.org/~rahul/rahul.asc All feedback on this release candidate is welcome. As an aside, I will be away for three weeks, and my replies will be very slow during that time. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
I have an extensible Enumeration base class to donate to Apache Commons
Hello All, I've been working on a Java card playing program in my spare time, and I figured out something about Enumerations that may be of general use. The issue is if you are working with concepts like card ranks and suits in a non-trivial application, you want them to be comparable, serializable, and have their visual aspects defined in properties, not code. In the classic Enumeration pattern, you would re-implement the methods needed to do this stuff for each class, along with iterators and lookup methods. I figured out a way to code up an Enumeration base class that takes care of all the excise tasks for properties, serialization, hashing, comparing, etc.. This class allows you to extend as many subclass enumerations as you want, and it automatically keeps all of the enumerations in their own name and number (ordinal) spaces with no runtime penalty. To extend the current implementation, you have to override 3 one-liner methods in your subclass (the constructor and methods to look up enumeration instances by name and ordinal). I think I can further simplify that with annotation processing so you only have to indicate if you want the default overrides or variations. Other possible enhancements include allowing injection of alternate serialization options or ordinal sizes. (It currently uses a byte-sized ordinal because most cases I could think of don't have hundreds of enumeration constants, but they often have need of conserving space in databases.) I also think there's a way with annotation processing to specify default properties in the class file without having to create/edit a separate properties file, and that may be generally useful outside of enumerations. So, any interest in being involved with a commons project for such a thing, or in using it if delivered? I am not sure of the number of committers required or the sponsorship/championship needed for such a small thing in the Commons, so any advice would be appreciated. I am willing to do all the coding, testing, and documentation if need be, or to share with anyone else interested in contributing according to Commons guidelines. Below is an example of a subclass. Thanks, - John public final class Suit extends Enumeration { protected static final long serialVersionUID = Enumeration.serialVersionUID; public static final Suit noSuit = new Suit( 0, X ); public static final Suit clubs = new Suit( 1, C ); public static final Suit diamonds = new Suit( 2, D ); public static final Suit hearts = new Suit( 3, H ); public static final Suit spades = new Suit( 4, S ); private Suit( int ordinal, String name ) { super( ordinal, name ); } public static final Suit fromOrdinal( int ordinal ) { return (Suit) noSuit.getFromOrdinal( ordinal ); } public static final Suit fromName( String name ) { return (Suit) noSuit.getFromName( name ); } }