cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp FtpClientFactory.java
imario 2004/05/26 01:13:35 Added: vfs/src/java/org/apache/commons/vfs/provider/ftp FtpClientFactory.java Log: create ftpClient Revision ChangesPath 1.1 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java Index: FtpClientFactory.java === /* * Copyright 2002, 2003,2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.vfs.provider.ftp; import org.apache.commons.net.ftp.FTP; import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPReply; import org.apache.commons.vfs.FileSystemException; import java.io.IOException; /** * Create a FtpClient instance * * @author a href=mailto:[EMAIL PROTECTED]Mario Ivankovits/a * @version $Revision: 1.1 $ $Date: 2004/05/26 08:13:35 $ */ public class FtpClientFactory { private FtpClientFactory() { } /** * Creates a new connection to the server. */ public static FTPClient createConnection(String hostname, int port, String username, String password, String workingDirectory) throws FileSystemException { // Determine the username and password to use if (username == null) { username = anonymous; } if (password == null) { password = anonymous; } try { final FTPClient client = new FTPClient(); /* as soon as commons-1.2 will be released FTPFileEntryParserFactory myFactory = FtpFileSystemConfigBuilder.getInstance().getFTPFileEntryParserFactory(getFileSystemOptions()); if (myFactory != null) { client.setParserFactory(myFactory); } */ try { client.connect(hostname, port); int reply = client.getReplyCode(); if (!FTPReply.isPositiveCompletion(reply)) { throw new FileSystemException(vfs.provider.ftp/connect-rejected.error, hostname); } // Login if (!client.login(username, password)) { throw new FileSystemException(vfs.provider.ftp/login.error, new Object[]{hostname, username}, null); } // Set binary mode if (!client.setFileType(FTP.BINARY_FILE_TYPE)) { throw new FileSystemException(vfs.provider.ftp/set-binary.error, hostname); } // Change to root by default // All file operations a relative to the filesystem-root // String root = getRoot().getName().getPath(); if (workingDirectory != null) { if (!client.changeWorkingDirectory(workingDirectory)) { throw new FileSystemException(vfs.provider/get-attributes-no-exist.error, /); } } } catch (final IOException e) { if (client.isConnected()) { client.disconnect(); } throw e; } return client; } catch (final Exception exc) { throw new FileSystemException(vfs.provider.ftp/connect.error, new Object[]{hostname}, exc); } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp FtpFileProvider.java
imario 2004/05/26 01:20:27 Modified:vfs/src/java/org/apache/commons/vfs/provider/ftp FtpFileProvider.java Log: create ftpclient as soon as possible to see if host/credentials are correct Revision ChangesPath 1.8 +13 -5 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileProvider.java Index: FtpFileProvider.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileProvider.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- FtpFileProvider.java 19 May 2004 19:34:06 - 1.7 +++ FtpFileProvider.java 26 May 2004 08:20:27 - 1.8 @@ -1,12 +1,12 @@ /* * Copyright 2002, 2003,2004 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,6 +15,7 @@ */ package org.apache.commons.vfs.provider.ftp; +import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.vfs.Capability; import org.apache.commons.vfs.FileName; import org.apache.commons.vfs.FileSystem; @@ -77,7 +78,14 @@ { // Create the file system final GenericFileName rootName = (GenericFileName) name; -return new FtpFileSystem(rootName, fileSystemOptions); + +FTPClient ftpClient = FtpClientFactory.createConnection(rootName.getHostName(), +rootName.getPort(), +rootName.getUserName(), +rootName.getPassword(), +rootName.getPath()); + +return new FtpFileSystem(rootName, ftpClient, fileSystemOptions); } public FileSystemConfigBuilder getConfigBuilder() - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp FtpFileSystem.java
imario 2004/05/26 01:21:18 Modified:vfs/src/java/org/apache/commons/vfs/provider/ftp FtpFileSystem.java Log: moved create of ftpclient to its own factory Revision ChangesPath 1.29 +19 -96 jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java Index: FtpFileSystem.java === RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- FtpFileSystem.java19 May 2004 19:34:06 - 1.28 +++ FtpFileSystem.java26 May 2004 08:21:18 - 1.29 @@ -1,12 +1,12 @@ /* * Copyright 2002, 2003,2004 The Apache Software Foundation. - * + * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,9 +17,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.commons.net.ftp.FTP; import org.apache.commons.net.ftp.FTPClient; -import org.apache.commons.net.ftp.FTPReply; import org.apache.commons.vfs.FileName; import org.apache.commons.vfs.FileObject; import org.apache.commons.vfs.FileSystemException; @@ -42,37 +40,21 @@ { private final static Log log = LogFactory.getLog(FtpFileSystem.class); -private final String hostname; -private final int port; -private final String username; -private final String password; +//private final String hostname; +//private final int port; +//private final String username; +//private final String password; // An idle client private FTPClient idleClient; -public FtpFileSystem(final GenericFileName rootName, final FileSystemOptions fileSystemOptions) +public FtpFileSystem(final GenericFileName rootName, final FTPClient ftpClient, final FileSystemOptions fileSystemOptions) { super(rootName, null, fileSystemOptions); -hostname = rootName.getHostName(); -port = rootName.getPort(); +// hostname = rootName.getHostName(); +// port = rootName.getPort(); -// Determine the username and password to use -if (rootName.getUserName() == null) -{ -username = anonymous; -} -else -{ -username = rootName.getUserName(); -} -if (rootName.getPassword() == null) -{ -password = anonymous; -} -else -{ -password = rootName.getPassword(); -} +idleClient = ftpClient; } public void close() @@ -121,7 +103,14 @@ { if (idleClient == null) { -return createConnection(); +final GenericFileName rootName = (GenericFileName) getRoot().getName(); + +return FtpClientFactory.createConnection(rootName.getHostName(), +rootName.getPort(), +rootName.getUserName(), +rootName.getPassword(), +rootName.getPath()); +// return createConnection(); } else { @@ -156,70 +145,4 @@ { return new FtpFileObject(name, this, getRootName()); } - -/** - * Creates a new connection to the server. - */ -private FTPClient createConnection() -throws FileSystemException -{ -try -{ -final FTPClient client = new FTPClient(); - -/* as soon as commons-1.2 will be released -FTPFileEntryParserFactory myFactory = FtpFileSystemConfigBuilder.getInstance().getFTPFileEntryParserFactory(getFileSystemOptions()); -if (myFactory != null) -{ -client.setParserFactory(myFactory); -} -*/ - -try -{ -client.connect(hostname, port); - -int reply = client.getReplyCode(); -if (!FTPReply.isPositiveCompletion(reply)) -{ -throw new FileSystemException(vfs.provider.ftp/connect-rejected.error, hostname); -} - -// Login -if (!client.login(username, password)) -{ -
Re: [validator] Why doesn't commons-validator include functional validators?
Personally I prefer the facade method. I like the fact that, for example, the UrlValidator only contains the logic to validate a url and knows nothing about the validator framework it sits in. I think this has two advantages: * Users could utilise the validation without having to adopt the framework - maybe embedding it in their business logic or an alternative framework. Some users (e.g. Edgar Dollin's recent message on the Struts Dev list) don't want to put their validation rules in an XML file. I don't think we should limit validator's use by forcing the adoption of the framework. * It's easier to test - writing test scripts is simpler, you don't have to have a whole load of XML set up to test the actual validation logic. The other thing I was thinking is that the method signitures are too simple...validations could return several things: true/false, a converted value, an error code, an error message - maybe all of these should be returned in a ValidatorResult object rather than just true/false. Also how about having a validator context object - in the Struts world if someone wanted to write a validator which accessed the Request, then they could provide it through the context. public ValidatorResult isValid(Object bean, Field field, ValidatorAction va, Context context); Niall - Original Message - From: Don Brown [EMAIL PROTECTED] To: Jakarta Commons Developers List [EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 4:58 PM Subject: Re: [validator] Why doesn't commons-validator include functional validators? Yes, in my view, validator config should refer directly to the validator being used. This makes the config more readable, IMO. I thought about making a FieldChecks-type facade object for commons-validator, but the adapter methods - i.e. isValid(Object bean, Field field) - still need to be generated for each validator and I think it is cleaner to, when adding a new validator or changing an existing, only have to modify one file, the validator, rather than the validator and the facade. To help solve the duplication, I've created a SimpleValidator abstract class that has two methods: public boolean isValid(Object bean, Field field); public abstract boolean isValid(String val); For the simple validators, they could extend this class and only implement the abstract method. I'm not sure what else one could do since the limiting factor is the unique signatures of the actual validation method. Don David Graham wrote: --- Don Brown [EMAIL PROTECTED] wrote: Just to be clear, the approach I feel would be simplest is to add isValid(Object bean, Field field)-type methods to each validator. This way, the validators commons-validator provides can be used as they are or front-ended like how Struts' FieldChecks class interacts with them. So would you configure validator xml elements that reference DateValidator directly instead of FieldChecks? Would we be able to remove some of FieldChecks' methods? I've already gone through several validators, adding unit tests as I go, and things are looking good. Before I finish the rest of the validators, however, I want to make sure this is a good idea in the eyes of everyone else. For example, the new DateValidator looks like this: public boolean isValid(Object bean, Field field); public boolean isValid(Object bean, Field field, Locale locale); public boolean isValid(String value, String datePattern, boolean strict); public boolean isValid(String value, Locale locale); The top two methods do four things: 1. Pull the necessary parameters out of field variables (ie datePattern out of a field var to be passed to the third method) 2. Extract the field value as a String 3. Return true if the value is blank or null since the field may not be required (the bottom two methods return false in such a case) 4. Delegate handling to the bottom two methods Are these steps going to be duplicated for every pluggable validator? If so, maybe we could front DateValidator and friends with something like FieldChecks that contains the glue code? David Any objections? Don David Graham wrote: I'd be interested in any patches in this area so please open a bugzilla ticket for this. It sounds like you have some good ideas for making validator easier to use; I just don't have much time right now to look into it more. Thanks, David --- Don Brown [EMAIL PROTECTED] wrote: After looking through the different validator usages - Struts, Spring, and the unit tests - I'm a bit confused why commons-validator doesn't ship with functional validators that can be used directly and not hidden by some adapter. commons-validator contains validator classes, yes, but you still need to create a validator adapter class that accepts at least the bean and the Field object to interact with the validator. Furthermore, this adapter
RE: [Validator] Niall Pemberton as Committer
+1 -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED] Sent: Monday, May 24, 2004 10:16 PM To: Jakarta Commons Developers List Subject: [Validator] Niall Pemberton as Committer Niall Pemberton is an Apache Struts Committer who would like to apply some patches to the Validator, with the hope of moving toward another release. Here's my +1 -Ted. - 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: [validator] Why doesn't commons-validator include functional validators?
Actually both advantages you mention still exist in this design. All I'm doing is adding additional methods to make the validator usable directly, but the other public methods are still available. You can still use the validator without having to adopt the framework since you can call the actual validation method directly which doesn't depend on any other Validator classes. Furthermore, the validator is still simple to test as, again, you still have access to the actual validation method. As for the context idea, I agree, that would be a nice way to not only pass in objects, but return more than true or false. In particular, I was needing the ability to pass in parameters that were simple strings to be used by different validators. Using the current design, that isn't possible. The only problem I see is the temptation to mix presentation classes like HttpServletRequest in the validation method, like how Struts' FieldChecks works now. There is value in forcing the validator to be written without knowledge of the context in which it is used. Don Niall Pemberton wrote: Personally I prefer the facade method. I like the fact that, for example, the UrlValidator only contains the logic to validate a url and knows nothing about the validator framework it sits in. I think this has two advantages: * Users could utilise the validation without having to adopt the framework - maybe embedding it in their business logic or an alternative framework. Some users (e.g. Edgar Dollin's recent message on the Struts Dev list) don't want to put their validation rules in an XML file. I don't think we should limit validator's use by forcing the adoption of the framework. * It's easier to test - writing test scripts is simpler, you don't have to have a whole load of XML set up to test the actual validation logic. The other thing I was thinking is that the method signitures are too simple...validations could return several things: true/false, a converted value, an error code, an error message - maybe all of these should be returned in a ValidatorResult object rather than just true/false. Also how about having a validator context object - in the Struts world if someone wanted to write a validator which accessed the Request, then they could provide it through the context. public ValidatorResult isValid(Object bean, Field field, ValidatorAction va, Context context); Niall - Original Message - From: Don Brown [EMAIL PROTECTED] To: Jakarta Commons Developers List [EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 4:58 PM Subject: Re: [validator] Why doesn't commons-validator include functional validators? Yes, in my view, validator config should refer directly to the validator being used. This makes the config more readable, IMO. I thought about making a FieldChecks-type facade object for commons-validator, but the adapter methods - i.e. isValid(Object bean, Field field) - still need to be generated for each validator and I think it is cleaner to, when adding a new validator or changing an existing, only have to modify one file, the validator, rather than the validator and the facade. To help solve the duplication, I've created a SimpleValidator abstract class that has two methods: public boolean isValid(Object bean, Field field); public abstract boolean isValid(String val); For the simple validators, they could extend this class and only implement the abstract method. I'm not sure what else one could do since the limiting factor is the unique signatures of the actual validation method. Don David Graham wrote: --- Don Brown [EMAIL PROTECTED] wrote: Just to be clear, the approach I feel would be simplest is to add isValid(Object bean, Field field)-type methods to each validator. This way, the validators commons-validator provides can be used as they are or front-ended like how Struts' FieldChecks class interacts with them. So would you configure validator xml elements that reference DateValidator directly instead of FieldChecks? Would we be able to remove some of FieldChecks' methods? I've already gone through several validators, adding unit tests as I go, and things are looking good. Before I finish the rest of the validators, however, I want to make sure this is a good idea in the eyes of everyone else. For example, the new DateValidator looks like this: public boolean isValid(Object bean, Field field); public boolean isValid(Object bean, Field field, Locale locale); public boolean isValid(String value, String datePattern, boolean strict); public boolean isValid(String value, Locale locale); The top two methods do four things: 1. Pull the necessary parameters out of field variables (ie datePattern out of a field var to be passed to the third method) 2. Extract the field value as a String 3. Return true if the value is blank or null since the field may not be required (the bottom two methods return false in such a case) 4. Delegate handling to the bottom two
RE: [validator] Why doesn't commons-validator include functional validators?
that facade method sounds great, i use in JSF-Apps the business logic of some commons validators ;-) Cheers, -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 7:17 PM To: Jakarta Commons Developers List Subject: Re: [validator] Why doesn't commons-validator include functional validators? Personally I prefer the facade method. I like the fact that, for example, the UrlValidator only contains the logic to validate a url and knows nothing about the validator framework it sits in. I think this has two advantages: * Users could utilise the validation without having to adopt the framework - maybe embedding it in their business logic or an alternative framework. Some users (e.g. Edgar Dollin's recent message on the Struts Dev list) don't want to put their validation rules in an XML file. I don't think we should limit validator's use by forcing the adoption of the framework. * It's easier to test - writing test scripts is simpler, you don't have to have a whole load of XML set up to test the actual validation logic. The other thing I was thinking is that the method signitures are too simple...validations could return several things: true/false, a converted value, an error code, an error message - maybe all of these should be returned in a ValidatorResult object rather than just true/false. Also how about having a validator context object - in the Struts world if someone wanted to write a validator which accessed the Request, then they could provide it through the context. public ValidatorResult isValid(Object bean, Field field, ValidatorAction va, Context context); Niall - Original Message - From: Don Brown [EMAIL PROTECTED] To: Jakarta Commons Developers List [EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 4:58 PM Subject: Re: [validator] Why doesn't commons-validator include functional validators? Yes, in my view, validator config should refer directly to the validator being used. This makes the config more readable, IMO. I thought about making a FieldChecks-type facade object for commons-validator, but the adapter methods - i.e. isValid(Object bean, Field field) - still need to be generated for each validator and I think it is cleaner to, when adding a new validator or changing an existing, only have to modify one file, the validator, rather than the validator and the facade. To help solve the duplication, I've created a SimpleValidator abstract class that has two methods: public boolean isValid(Object bean, Field field); public abstract boolean isValid(String val); For the simple validators, they could extend this class and only implement the abstract method. I'm not sure what else one could do since the limiting factor is the unique signatures of the actual validation method. Don David Graham wrote: --- Don Brown [EMAIL PROTECTED] wrote: Just to be clear, the approach I feel would be simplest is to add isValid(Object bean, Field field)-type methods to each validator. This way, the validators commons-validator provides can be used as they are or front-ended like how Struts' FieldChecks class interacts with them. So would you configure validator xml elements that reference DateValidator directly instead of FieldChecks? Would we be able to remove some of FieldChecks' methods? I've already gone through several validators, adding unit tests as I go, and things are looking good. Before I finish the rest of the validators, however, I want to make sure this is a good idea in the eyes of everyone else. For example, the new DateValidator looks like this: public boolean isValid(Object bean, Field field); public boolean isValid(Object bean, Field field, Locale locale); public boolean isValid(String value, String datePattern, boolean strict); public boolean isValid(String value, Locale locale); The top two methods do four things: 1. Pull the necessary parameters out of field variables (ie datePattern out of a field var to be passed to the third method) 2. Extract the field value as a String 3. Return true if the value is blank or null since the field may not be required (the bottom two methods return false in such a case) 4. Delegate handling to the bottom two methods Are these steps going to be duplicated for every pluggable validator? If so, maybe we could front DateValidator and friends with something like FieldChecks that contains the glue code? David Any objections? Don David Graham wrote: I'd be interested in any patches in this area so please open a bugzilla ticket for this. It sounds like you have some good ideas for making validator easier to use; I just don't have much time right now to
Re: [validator] Why doesn't commons-validator include functional validators?
OK that removes any real issues - I guess its just a case of style then - either one class with the framework included or two separate classes, one a facade with the framework stuff and the other the actual validation logic. I'd rather the latter but its only a minor preference and I wouldn't fall out over it :-) I agree we wouldn't want to do anything in commons validator that referenced anything like HttpServletRequest, but if a user wanted to create their own custom validators that did then thats up to them - if they are only ever building for webapps then why stop them? On a slightly different topic - does anyone know why the validwhen validator is part of struts rather than commons validator? Niall - Original Message - From: Don Brown [EMAIL PROTECTED] To: Jakarta Commons Developers List [EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 6:23 PM Subject: Re: [validator] Why doesn't commons-validator include functional validators? Actually both advantages you mention still exist in this design. All I'm doing is adding additional methods to make the validator usable directly, but the other public methods are still available. You can still use the validator without having to adopt the framework since you can call the actual validation method directly which doesn't depend on any other Validator classes. Furthermore, the validator is still simple to test as, again, you still have access to the actual validation method. As for the context idea, I agree, that would be a nice way to not only pass in objects, but return more than true or false. In particular, I was needing the ability to pass in parameters that were simple strings to be used by different validators. Using the current design, that isn't possible. The only problem I see is the temptation to mix presentation classes like HttpServletRequest in the validation method, like how Struts' FieldChecks works now. There is value in forcing the validator to be written without knowledge of the context in which it is used. Don Niall Pemberton wrote: Personally I prefer the facade method. I like the fact that, for example, the UrlValidator only contains the logic to validate a url and knows nothing about the validator framework it sits in. I think this has two advantages: * Users could utilise the validation without having to adopt the framework - maybe embedding it in their business logic or an alternative framework. Some users (e.g. Edgar Dollin's recent message on the Struts Dev list) don't want to put their validation rules in an XML file. I don't think we should limit validator's use by forcing the adoption of the framework. * It's easier to test - writing test scripts is simpler, you don't have to have a whole load of XML set up to test the actual validation logic. The other thing I was thinking is that the method signitures are too simple...validations could return several things: true/false, a converted value, an error code, an error message - maybe all of these should be returned in a ValidatorResult object rather than just true/false. Also how about having a validator context object - in the Struts world if someone wanted to write a validator which accessed the Request, then they could provide it through the context. public ValidatorResult isValid(Object bean, Field field, ValidatorAction va, Context context); Niall - Original Message - From: Don Brown [EMAIL PROTECTED] To: Jakarta Commons Developers List [EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 4:58 PM Subject: Re: [validator] Why doesn't commons-validator include functional validators? Yes, in my view, validator config should refer directly to the validator being used. This makes the config more readable, IMO. I thought about making a FieldChecks-type facade object for commons-validator, but the adapter methods - i.e. isValid(Object bean, Field field) - still need to be generated for each validator and I think it is cleaner to, when adding a new validator or changing an existing, only have to modify one file, the validator, rather than the validator and the facade. To help solve the duplication, I've created a SimpleValidator abstract class that has two methods: public boolean isValid(Object bean, Field field); public abstract boolean isValid(String val); For the simple validators, they could extend this class and only implement the abstract method. I'm not sure what else one could do since the limiting factor is the unique signatures of the actual validation method. Don David Graham wrote: --- Don Brown [EMAIL PROTECTED] wrote: Just to be clear, the approach I feel would be simplest is to add isValid(Object bean, Field field)-type methods to each validator. This way, the validators commons-validator provides can be used as they are or front-ended like how Struts' FieldChecks class interacts with them. So would you configure
[Jakarta Commons Wiki] Updated: Logging/1.0.4ReleasePlan
Date: 2004-05-26T12:20:46 Editor: 82.38.65.173 Wiki: Jakarta Commons Wiki Page: Logging/1.0.4ReleasePlan URL: http://wiki.apache.org/jakarta-commons/Logging/1.0.4ReleasePlan no comment Change Log: -- @@ -38,6 +38,10 @@ There seems no need to create a release branch since Commons-Logging is reasonable stable. +== Release Candidate == + +A release candidate will be prepared for final sanity checking but expect the final vote to procede once it has been posted. + = Comments = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 28933] - patch to make commons-logging compileable againt cvs-head of log4j
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=28933. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=28933 patch to make commons-logging compileable againt cvs-head of log4j [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX --- Additional Comments From [EMAIL PROTECTED] 2004-05-26 19:28 --- Thanks for the patch mario but the solution offered (in the end) by Ceki allows commons-logging to be compatible with both 1.2.x and (hopefully) the upcoming 1.3 release. Therefore, I'm marking this bug closed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Logging/1.0.4ReleasePlan
Date: 2004-05-26T12:30:35 Editor: 82.38.65.173 Wiki: Jakarta Commons Wiki Page: Logging/1.0.4ReleasePlan URL: http://wiki.apache.org/jakarta-commons/Logging/1.0.4ReleasePlan no comment Change Log: -- @@ -20,7 +20,21 @@ == Bug Review == -Review bugs +Review open bugs: + + 1. 28933 Cri NEW patch to make commons-logging compileable againt cvs-head + 1. 27504 Maj NEW LogConfigurationException when using STRUTS with 2 applicati + 1. 27528 Nor NEW [logging][PATCH] Enable the configuration of date and time f + 1. 28291 Nor NEW ContextClassLoader may load Log impl from wrong context in J + 1. 27663 Enh NEW [logging] Add MemoryLog + +Resolution (proposed by review) + + 1. CLOSED + 1. + 1. + 1. + 1. == Bug Fix == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Logging/1.0.4ReleasePlan
Date: 2004-05-26T12:31:04 Editor: 82.38.65.173 Wiki: Jakarta Commons Wiki Page: Logging/1.0.4ReleasePlan URL: http://wiki.apache.org/jakarta-commons/Logging/1.0.4ReleasePlan no comment Change Log: -- @@ -30,7 +30,7 @@ Resolution (proposed by review) - 1. CLOSED + 1. CLOSED (alternative patch already applied) 1. 1. 1. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Logging/1.0.4ReleasePlan
Date: 2004-05-26T12:32:32 Editor: 82.38.65.173 Wiki: Jakarta Commons Wiki Page: Logging/1.0.4ReleasePlan URL: http://wiki.apache.org/jakarta-commons/Logging/1.0.4ReleasePlan no comment Change Log: -- @@ -31,7 +31,7 @@ Resolution (proposed by review) 1. CLOSED (alternative patch already applied) - 1. + 1. close and document craig's comments in FAQ 1. 1. 1. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 28291] - ContextClassLoader may load Log impl from wrong context in JDK 1.4
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=28291. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=28291 ContextClassLoader may load Log impl from wrong context in JDK 1.4 --- Additional Comments From [EMAIL PROTECTED] 2004-05-26 19:37 --- Using the context classloader is vital if this code is going to run correctly in containers. So the proposed solution is probably a non-starter. Maybe I can think of an alternative solution... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Logging/1.0.4ReleasePlan
Date: 2004-05-26T12:37:41 Editor: 82.38.65.173 Wiki: Jakarta Commons Wiki Page: Logging/1.0.4ReleasePlan URL: http://wiki.apache.org/jakarta-commons/Logging/1.0.4ReleasePlan Bug review Change Log: -- @@ -32,9 +32,9 @@ 1. CLOSED (alternative patch already applied) 1. close and document craig's comments in FAQ - 1. - 1. - 1. + 1. inclined to support this enhancement (robert burrell donkin) + 1. need more time to think about this one (see comments). probably one to mark LATER + 1. inclined to support this enhancement (robert burrell donkin) == Bug Fix == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Logging/1.0.4ReleasePlan
Date: 2004-05-26T12:41:28 Editor: 82.38.65.173 Wiki: Jakarta Commons Wiki Page: Logging/1.0.4ReleasePlan URL: http://wiki.apache.org/jakarta-commons/Logging/1.0.4ReleasePlan Added release notes to plan Change Log: -- @@ -52,6 +52,11 @@ There seems no need to create a release branch since Commons-Logging is reasonable stable. + +== Release Notes == + +Once the code is frozen (once all the pre-release tasks are complete) the release notes will be prepared in the time homoured fashion (from CVS commit comments). + == Release Candidate == A release candidate will be prepared for final sanity checking but expect the final vote to procede once it has been posted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-05-26T12:50:36 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan Improvements to release plan Change Log: -- @@ -37,6 +37,32 @@ * Create unit tests to make sure that BeanUtils works with collections 2.1 and collections 3.0 in the classpath. +== General == + +=== Bug Review === + +Review current bugs + +=== Bug Fix === + +Fix any bugs highlighted by the review. + + + += Release Plan = + +== CVS == + +No branch will be needed for release since commons-beanutils is stable. + +== Release Notes == + +These will be prepared in the traditional fashion. + +== Release Candidate == + +A release candidate will be prepared but most likely the VOTE will be proceeded to as soon as this is done. + Up to BeanUtils - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: BeanUtils/1.7.0ReleasePlan
Date: 2004-05-26T12:51:26 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: BeanUtils/1.7.0ReleasePlan URL: http://wiki.apache.org/jakarta-commons/BeanUtils/1.7.0ReleasePlan no comment Change Log: -- @@ -32,6 +32,7 @@ * Review method names and accessibility for new method * Deprecate methods (or possibly have a future deprecation release) + * Think about introducing abstract classes for the beans == Collections Compatibility == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vfs] maven create changelog problems
Dirk Verbeeck wrote: I just tried to build vfs site and it works, so it's not a server side problem. site:run-reports: [echo] Generating the Change Log... maven-changelog-plugin:report: [echo] Generating the changelog report org.netbeans.lib.cvsclient.command.CommandException ChangeLog found: 0 entries Strange, but it looks like this is a combination of cvslib-3.6 (maven rc3) and with certain cvs server versions http://javacvs.netbeans.org/issues/show_bug.cgi?id=40347 .-- Mario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[logging] ServletContextLogger
Is there any call for a Log implementation which will log to a javax.servlet.ServletContext object? I think it would be good to provide. It could fit in between the LogFactoryImpl right before simple logger: if ((logClassName == null) isJdk13LumberjackAvailable()) { logClassName = org.apache.commons.logging.impl.Jdk13LumberjackLogger; } if (logClassName == null isServletAvailable()) { logClassName = org.apache.commons.logging.impl.ServletContextLogger; } if (logClassName == null) { logClassName = org.apache.commons.logging.impl.SimpleLog; } As far as initialization, it could provide a static method (since there's only ever one ServletContext per web app anyway, a static variable will suffice), which could be called from the Servlet's init method. (I'm open to other suggestions here, but it's the only way i see to make this happen) public class ServletContextLogger { private static ServletContext context; public static synchronized init(ServletContext context) { ServletContextLogger.context = context; } ... } If the context has not yet been set, we can do one of two things, and i'm not sure what the appropriate thing to do is: 1. do nothing when a log message is issued public void debug(Object message) { if (context != null) { context.log(toString(message)); } } 2. create a SimpleLog for every ServletContextLog, and log the message to that SimpleLog instance public void debug(Object message) { if (context != null) { context.log(toString(message)); } else { simpleLogger.debug(message); } } Any thoughts? PS: I'm also willing to create a new implementation of LogFactory which will discover the available log implementations at runtime, rather than the compile time strategy which exists now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[VOTE] Release Commons Collections 2.1.1
Commons Collections 2.1.1 is a patch release to 2.1 to allow binary compatability with CVS head and the upcoming 3.1 release. http://www.apache.org/~scolebourne/release/ The patch includes: 1) Deprecate clashing methods in IteratorUtils (emptyIterator, arrayIterator, singletonIterator) 2) Add two new classes EmptyIterator and EmptyListIterator to be used as deprecation destinations. 3) Switch to ASL2 license. Votes on the release: NOTE: I would like to receive feedback/votes from a Tomcat and a Struts committer before release!!! --- [ ] +1 Yes, release the patch [ ] +0 [ ] -0 [ ] -1 No, because --- Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [logging] ServletContextLogger
Hi, What's the isServletAvailable() method look like? Yoav Shapira Millennium Research Informatics -Original Message- From: Inger, Matthew [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 4:22 PM To: 'Jakarta Commons Developers List' Subject: [logging] ServletContextLogger Is there any call for a Log implementation which will log to a javax.servlet.ServletContext object? I think it would be good to provide. It could fit in between the LogFactoryImpl right before simple logger: if ((logClassName == null) isJdk13LumberjackAvailable()) { logClassName = org.apache.commons.logging.impl.Jdk13LumberjackLogger; } if (logClassName == null isServletAvailable()) { logClassName = org.apache.commons.logging.impl.ServletContextLogger; } if (logClassName == null) { logClassName = org.apache.commons.logging.impl.SimpleLog; } As far as initialization, it could provide a static method (since there's only ever one ServletContext per web app anyway, a static variable will suffice), which could be called from the Servlet's init method. (I'm open to other suggestions here, but it's the only way i see to make this happen) public class ServletContextLogger { private static ServletContext context; public static synchronized init(ServletContext context) { ServletContextLogger.context = context; } ... } If the context has not yet been set, we can do one of two things, and i'm not sure what the appropriate thing to do is: 1. do nothing when a log message is issued public void debug(Object message) { if (context != null) { context.log(toString(message)); } } 2. create a SimpleLog for every ServletContextLog, and log the message to that SimpleLog instance public void debug(Object message) { if (context != null) { context.log(toString(message)); } else { simpleLogger.debug(message); } } Any thoughts? PS: I'm also willing to create a new implementation of LogFactory which will discover the available log implementations at runtime, rather than the compile time strategy which exists now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [VOTE] Release Commons Collections 2.1.1
Hi, Votes on the release: NOTE: I would like to receive feedback/votes from a Tomcat and a Struts committer before release!!! --- [ X ] +1 Yes, release the patch [ ] +0 [ ] -0 [ ] -1 No, because --- Yup yup yup. I'll pick it up for the next tomcat release. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VOTE] Release Commons Collections 2.1.1
Stephen Colebourne wrote: Commons Collections 2.1.1 is a patch release to 2.1 to allow binary compatability with CVS head and the upcoming 3.1 release. [ x ] +1 Yes, release the patch [ ] +0 [ ] -0 [ ] -1 No, because - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [logging] ServletContextLogger
try { ClassLoader cl = Thread.currentThread().getContextClassLoader(); Class clazz = cl.loadClass(javax.servlet.ServletContext); return true; } catch ( ClassNotFoundException e ) { return false; } or something similar. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 4:26 PM To: Jakarta Commons Developers List Subject: RE: [logging] ServletContextLogger Hi, What's the isServletAvailable() method look like? Yoav Shapira Millennium Research Informatics -Original Message- From: Inger, Matthew [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 4:22 PM To: 'Jakarta Commons Developers List' Subject: [logging] ServletContextLogger Is there any call for a Log implementation which will log to a javax.servlet.ServletContext object? I think it would be good to provide. It could fit in between the LogFactoryImpl right before simple logger: if ((logClassName == null) isJdk13LumberjackAvailable()) { logClassName = org.apache.commons.logging.impl.Jdk13LumberjackLogger; } if (logClassName == null isServletAvailable()) { logClassName = org.apache.commons.logging.impl.ServletContextLogger; } if (logClassName == null) { logClassName = org.apache.commons.logging.impl.SimpleLog; } As far as initialization, it could provide a static method (since there's only ever one ServletContext per web app anyway, a static variable will suffice), which could be called from the Servlet's init method. (I'm open to other suggestions here, but it's the only way i see to make this happen) public class ServletContextLogger { private static ServletContext context; public static synchronized init(ServletContext context) { ServletContextLogger.context = context; } ... } If the context has not yet been set, we can do one of two things, and i'm not sure what the appropriate thing to do is: 1. do nothing when a log message is issued public void debug(Object message) { if (context != null) { context.log(toString(message)); } } 2. create a SimpleLog for every ServletContextLog, and log the message to that SimpleLog instance public void debug(Object message) { if (context != null) { context.log(toString(message)); } else { simpleLogger.debug(message); } } Any thoughts? PS: I'm also willing to create a new implementation of LogFactory which will discover the available log implementations at runtime, rather than the compile time strategy which exists now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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]
[GUMP@brutus]: jelly-tags/commons-jelly-tags-jsl 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 folk at [EMAIL PROTECTED] Project commons-jelly-tags-jsl has an issue affecting its community integration, and has been outstanding for 6 runs. Project State : 'Failed', Reason 'Build Failed' Full details are available at: http://brutus.apache.org:8080/gump/jelly-tags/commons-jelly-tags-jsl/index.html That said, some snippets follow: The following annotations were provided: -INFO- Sole jar [commons-jelly-tags-jsl-20040526.jar] identifier set to project name -INFO- Enable verbose output, due to 5 previous error(s). -INFO- Failed with reason build failed -INFO- Enable debug output, due to build failure. The following work was performed: http://brutus.apache.org:8080/gump/jelly-tags/commons-jelly-tags-jsl/gump_work/build_jelly-tags_commons-jelly-tags-jsl.html Work Name: build_jelly-tags_commons-jelly-tags-jsl (Type: Build) State: Failed Elapsed: 0 hours, 0 minutes, 6 seconds Command Line: java -Djava.awt.headless=true -Dbuild.clonevm=true -Xbootclasspath/p:/usr/local/gump/public/workspace/xml-xerces2/java/build/xercesImpl.jar:/usr/local/gump/public/workspace/xml-xerces2/java/build/xml-apis.jar org.apache.tools.ant.Main -verbose -Dgump.merge=/usr/local/gump/public/gump/work/merge.xml -Dbuild.sysclasspath=only -Dfinal.name=commons-jelly-tags-jsl-20040526 jar [Working Directory: /usr/local/gump/public/workspace/jelly-tags/jsl] CLASSPATH : /usr/local/j2sdk1.4.2_04/lib/tools.jar:/usr/local/gump/public/workspace/jelly-tags/jsl/target/classes:/usr/local/gump/public/workspace/jelly-tags/jsl/target/test-classes:/usr/local/gump/public/workspace/jakarta-commons/jelly/target/commons-jelly-20040526.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-stylebook.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-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-xalan2.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-20040526.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-20040526.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging-api.jar:/usr/local/gump/packages/dom4j-1.4/dom4j-full.jar:/usr/local/gump/public/workspace/dist/junit/junit.jar:/usr/local/gump/public/workspace/jakarta-commons/cli/target/commons-cli-20040526.jar:/usr/local/gump/public/workspace/jakarta-commons/discovery/dist/commons-discovery.jar:/usr/local/gump/public/workspace/jakarta-servletapi-4/lib/servlet.jar:/usr/local/gump/packages/nekohtml-0.9.2/nekohtmlXni.jar:/usr/local/gump/packages/nekohtml-0.9.2/nekohtml.jar:/usr/local/gump/public/workspace/jelly-tags/xml/target/commons-jelly-tags-xml-20040526.jar:/usr/local/gump/public/workspace/jelly-tags/junit/target/commons-jelly-tags-junit-20040526.jar:/usr/local/gump/public/workspace/jelly-tags/ant/target/commons-jelly-tags-ant-20040526.jar:/usr/local/gump/public/workspace/commons-grant/target/commons-grant-20040526.jar:/usr/local/gump/public/workspace/jelly-tags/log/target/commons-jelly-tags-log-20040526.jar- [junit] at org.apache.commons.jelly.tags.junit.AssertTagSupport.fail(AssertTagSupport.java:50) [junit] at org.apache.commons.jelly.tags.junit.AssertTag.doTag(AssertTag.java:58) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:233) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:89) [junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) [junit] at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:65) [junit] at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:102) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:89) [junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) [junit] at org.apache.commons.jelly.tags.jsl.TemplateTag$1.run(TemplateTag.java:160) [junit] at org.dom4j.rule.Mode.fireRule(Mode.java:51) [junit] at org.dom4j.rule.Mode.applyTemplates(Mode.java:71) [junit] at org.dom4j.rule.RuleManager$1.run(RuleManager.java:148) [junit] at org.dom4j.rule.Mode.fireRule(Mode.java:51) [junit] at org.dom4j.rule.Stylesheet.run(Stylesheet.java:73) [junit
[GUMP@brutus]: jelly-tags/commons-jelly-tags-betwixt 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 folk at [EMAIL PROTECTED] Project commons-jelly-tags-betwixt has an issue affecting its community integration, and has been outstanding for 6 runs. Project State : 'Failed', Reason 'Build Failed' Full details are available at: http://brutus.apache.org:8080/gump/jelly-tags/commons-jelly-tags-betwixt/index.html That said, some snippets follow: The following annotations were provided: -INFO- Sole jar [commons-jelly-tags-betwixt-20040526.jar] identifier set to project name -INFO- Enable verbose output, due to 5 previous error(s). -INFO- Failed with reason build failed -INFO- Enable debug output, due to build failure. The following work was performed: http://brutus.apache.org:8080/gump/jelly-tags/commons-jelly-tags-betwixt/gump_work/build_jelly-tags_commons-jelly-tags-betwixt.html Work Name: build_jelly-tags_commons-jelly-tags-betwixt (Type: Build) State: Failed Elapsed: 0 hours, 0 minutes, 3 seconds Command Line: java -Djava.awt.headless=true -Xbootclasspath/p:/usr/local/gump/public/workspace/xml-xerces2/java/build/xercesImpl.jar:/usr/local/gump/public/workspace/xml-xerces2/java/build/xml-apis.jar org.apache.tools.ant.Main -verbose -Dgump.merge=/usr/local/gump/public/gump/work/merge.xml -Dbuild.sysclasspath=only -Dfinal.name=commons-jelly-tags-betwixt-20040526 jar [Working Directory: /usr/local/gump/public/workspace/jelly-tags/betwixt] CLASSPATH : /usr/local/j2sdk1.4.2_04/lib/tools.jar:/usr/local/gump/public/workspace/jelly-tags/betwixt/target/classes:/usr/local/gump/public/workspace/jelly-tags/betwixt/target/test-classes:/usr/local/gump/public/workspace/jakarta-commons/jelly/target/commons-jelly-20040526.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-stylebook.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-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-xalan2.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-20040526.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-20040526.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging-api.jar:/usr/local/gump/packages/dom4j-1.4/dom4j-full.jar:/usr/local/gump/public/workspace/dist/junit/junit.jar:/usr/local/gump/public/workspace/jakarta-commons/cli/target/commons-cli-20040526.jar:/usr/local/gump/public/workspace/jakarta-commons/discovery/dist/commons-discovery.jar:/usr/local/gump/public/workspace/jakarta-servletapi-4/lib/servlet.jar:/usr/local/gump/packages/nekohtml-0.9.2/nekohtmlXni.jar:/usr/local/gump/packages/nekohtml-0.9.2/nekohtml.jar:/usr/local/gump/public/workspace/jakarta-commons/betwixt/target/commons-betwixt-20040526.jar:/usr/local/gump/public/workspace/jakarta-commons/digester/dist/commons-digester.jar:/usr/local/gump/public/workspace/jelly-tags/junit/target/commons-jelly-tags-junit-20040526.jar:/usr/local/gump/public/workspace/jelly-tags/log/target/commons-jelly-tags-log-20040526.jar- [junit] Testcase: rssParseViaURI took 0.093 sec [junit] Caused an ERROR [junit] file:/usr/local/gump/public/workspace/jelly-tags/betwixt/target/test-classes/org/apache/commons/jelly/betwixt/suite.jelly:28:-1: b:parse Could not load class called: org.apache.commons.digester.rss.Channel [junit] org.apache.commons.jelly.JellyTagException: file:/usr/local/gump/public/workspace/jelly-tags/betwixt/target/test-classes/org/apache/commons/jelly/betwixt/suite.jelly:28:-1: b:parse Could not load class called: org.apache.commons.digester.rss.Channel [junit] at org.apache.commons.jelly.tags.betwixt.ParseTag.doTag(ParseTag.java:80) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:233) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:89) [junit] at org.apache.commons.jelly.tags.junit.CaseTag$1.runTest(CaseTag.java:59) [junit] Caused by: java.lang.ClassNotFoundException: org.apache.commons.digester.rss.Channel [junit] at java.net.URLClassLoader$1.run(URLClassLoader.java:199) [junit] at java.security.AccessController.doPrivileged(Native Method) [junit] at java.net.URLClassLoader.findClass(URLClassLoader.java:187) [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java
[GUMP@brutus]: jelly-tags/commons-jelly-tags-define 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 folk at [EMAIL PROTECTED] Project commons-jelly-tags-define has an issue affecting its community integration, and has been outstanding for 6 runs. Project State : 'Failed', Reason 'Build Failed' Full details are available at: http://brutus.apache.org:8080/gump/jelly-tags/commons-jelly-tags-define/index.html That said, some snippets follow: The following annotations were provided: -INFO- Sole jar [commons-jelly-tags-define-20040526.jar] identifier set to project name -INFO- Enable verbose output, due to 5 previous error(s). -INFO- Failed with reason build failed -INFO- Enable debug output, due to build failure. The following work was performed: http://brutus.apache.org:8080/gump/jelly-tags/commons-jelly-tags-define/gump_work/build_jelly-tags_commons-jelly-tags-define.html Work Name: build_jelly-tags_commons-jelly-tags-define (Type: Build) State: Failed Elapsed: 0 hours, 0 minutes, 5 seconds Command Line: java -Djava.awt.headless=true -Dbuild.clonevm=true -Xbootclasspath/p:/usr/local/gump/public/workspace/xml-xerces2/java/build/xercesImpl.jar:/usr/local/gump/public/workspace/xml-xerces2/java/build/xml-apis.jar:/usr/local/gump/public/workspace/xml-xalan/java/build/xalan-unbundled.jar:/usr/local/gump/public/workspace/xml-commons/java/external/build/xml-apis.jar org.apache.tools.ant.Main -verbose -Dgump.merge=/usr/local/gump/public/gump/work/merge.xml -Dbuild.sysclasspath=only -Dfinal.name=commons-jelly-tags-define-20040526 jar [Working Directory: /usr/local/gump/public/workspace/jelly-tags/define] CLASSPATH : /usr/local/j2sdk1.4.2_04/lib/tools.jar:/usr/local/gump/public/workspace/jelly-tags/define/target/classes:/usr/local/gump/public/workspace/jelly-tags/define/target/test-classes:/usr/local/gump/public/workspace/jakarta-commons/jelly/target/commons-jelly-20040526.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-stylebook.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-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-xalan2.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/usr/local/gump/public/workspace/ant/dist/lib/ant.jar:/usr/local/gump/public/workspace/jakarta-commons/beanutils/dist/commons-beanutils-core.jar:/usr/local/gump/public/workspace/jakarta-commons/collections/build/commons-collections-20040526.jar:/usr/local/gump/public/workspace/jakarta-commons/jexl/dist/commons-jexl-20040526.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging.jar:/usr/local/gump/public/workspace/jakarta-commons/logging/dist/commons-logging-api.jar:/usr/local/gump/packages/dom4j-1.4/dom4j-full.jar:/usr/local/gump/public/workspace/dist/junit/junit.jar:/usr/local/gump/public/workspace/jakarta-commons/cli/target/commons-cli-20040526.jar:/usr/local/gump/public/workspace/jakarta-commons/discovery/dist/commons-discovery.jar:/usr/local/gump/public/workspace/jakarta-servletapi-4/lib/servlet.jar:/usr/local/gump/packages/nekohtml-0.9.2/nekohtmlXni.jar:/usr/local/gump/packages/nekohtml-0.9.2/nekohtml.jar:/usr/local/gump/public/workspace/jelly-tags/dynabean/target/commons-jelly-tags-dynabean-20040526.jar:/usr/local/gump/public/workspace/jelly-tags/junit/target/commons-jelly-tags-junit-20040526.jar:/usr/local/gump/public/workspace/jelly-tags/log/target/commons-jelly-tags-log-20040526.jar:/usr/local/gump/public/workspace/jelly-tags/xml/target/commons-jelly-tags-xml-20040526.jar- [junit] at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:642) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:242) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:89) [junit] at org.apache.commons.jelly.impl.DynamicTag.doTag(DynamicTag.java:79) [junit] at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:102) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:89) [junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) [junit] at org.apache.commons.jelly.TagSupport.getBodyText(TagSupport.java:236) [junit] at org.apache.commons.jelly.tags.core.SetTag.doTag(SetTag.java:90) [junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:233) [junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:89) [junit] at org.apache.commons.jelly.tags.junit.CaseTag$1.runTest(CaseTag.java:59) [junit] Caused by: java.lang.NullPointerException [junit
RE: [workflow] outstanding bugs
i'd probably be willing to take a look at the patches once things are a little less hectic (which the way things have been going might be quite a long while) but i suspect that the best plan would be wait until after java one when craig is going to have some more time. Thanks, Robert, I appreciate the response. Of course, I do know the best way to become a committer is to keep on submitting stuff, so I might have a look at a component that's a bit more active ;-) i admire your dedication and if you could remind us again once digester and validator have been released, that'd be very much appreciated. I'll do that. Incidentally, it's likely that the project I'm working on will have quite a bit of stuff that could be submitted back into workflow. Our first release is at the end of July, and after that I'll have a bit of time to look at harvesting some assets. Colin Sharples IBM IT Architect Email: [EMAIL PROTECTED] Mobile: +64 21 402 085 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/iterators AbstractEmptyIterator.java
scolebourne2004/05/26 13:57:43 Modified:collections/src/java/org/apache/commons/collections/iterators AbstractEmptyIterator.java Log: Change to package scoped Revision ChangesPath 1.2 +2 -2 jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/AbstractEmptyIterator.java Index: AbstractEmptyIterator.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/AbstractEmptyIterator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AbstractEmptyIterator.java22 May 2004 09:46:39 - 1.1 +++ AbstractEmptyIterator.java26 May 2004 20:57:43 - 1.2 @@ -25,7 +25,7 @@ * * @author Stephen Colebourne */ -public abstract class AbstractEmptyIterator { +abstract class AbstractEmptyIterator { /** * Constructor. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [logging] ServletContextLogger
On 26 May 2004, at 21:22, Inger, Matthew wrote: hi matthew snip As far as initialization, it could provide a static method (since there's only ever one ServletContext per web app anyway, a static variable will suffice), which could be called from the Servlet's init method. (I'm open to other suggestions here, but it's the only way i see to make this happen) public class ServletContextLogger { private static ServletContext context; public static synchronized init(ServletContext context) { ServletContextLogger.context = context; } ... } the code you propose is unlikely to be safe in a servlet container environment. you'd have to use a per-context-classloader singleton. ideally, this would have to be held in a weak hashmap (to ensure that the context is garbage collection) but probably this should be discovered at runtime to allow better compatibility. i'd probably not see this as part of the default logging compile time search (due to the fact that this registration stage is needed) but could be a good addition as an optional logger. it may be a good idea to wait until after the upcoming 1.0.4 release before adding any new loggers. PS: I'm also willing to create a new implementation of LogFactory which will discover the available log implementations at runtime, rather than the compile time strategy which exists now. sounds interesting. the idea of using commons-discovery to find all implementation at runtime has come up before but AFAIK without much action. - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [VOTE] Release Commons Collections 2.1.1
+1 David --- Stephen Colebourne [EMAIL PROTECTED] wrote: Commons Collections 2.1.1 is a patch release to 2.1 to allow binary compatability with CVS head and the upcoming 3.1 release. http://www.apache.org/~scolebourne/release/ The patch includes: 1) Deprecate clashing methods in IteratorUtils (emptyIterator, arrayIterator, singletonIterator) 2) Add two new classes EmptyIterator and EmptyListIterator to be used as deprecation destinations. 3) Switch to ASL2 license. Votes on the release: NOTE: I would like to receive feedback/votes from a Tomcat and a Struts committer before release!!! --- [ ] +1 Yes, release the patch [ ] +0 [ ] -0 [ ] -1 No, because --- Stephen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [logging] ServletContextLogger
--- robert burrell donkin [EMAIL PROTECTED] wrote: snip/ PS: I'm also willing to create a new implementation of LogFactory which will discover the available log implementations at runtime, rather than the compile time strategy which exists now. sounds interesting. the idea of using commons-discovery to find all implementation at runtime has come up before but AFAIK without much action. IMO, adding a dependency to commons-logging is a very bad idea considering how many other projects use it and have no need for commons-discovery. If commons-logging was released with another dependency I would just keep using old versions to avoid the new dependency :-(. David - robert __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Betwixt
Date: 2004-05-26T14:18:38 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: Betwixt URL: http://wiki.apache.org/jakarta-commons/Betwixt Added topic section Change Log: -- @@ -1,3 +1,5 @@ + + = Betwixt Component Page = Betwixt is an xml-object mapping component devised (originally) by [http://radio.weblogs.com/0112098/ James Strachan]. It [http://jakarta.apache.org/commons/betwixt/index.html lives] in [http://jakarta.apache.org/commons/ Jakarta-Commons]. @@ -9,5 +11,9 @@ * BetwixtDesignNextGeneration + + += General XML Mapping Topics = + * ObjectPipelines - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] Updated: Betwixt
Date: 2004-05-26T14:19:07 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: Betwixt URL: http://wiki.apache.org/jakarta-commons/Betwixt no comment Change Log: -- @@ -1,6 +1,6 @@ -= Betwixt Component Page = += Betwixt = Betwixt is an xml-object mapping component devised (originally) by [http://radio.weblogs.com/0112098/ James Strachan]. It [http://jakarta.apache.org/commons/betwixt/index.html lives] in [http://jakarta.apache.org/commons/ Jakarta-Commons]. @@ -15,5 +15,5 @@ = General XML Mapping Topics = - * ObjectPipelines + * /ObjectPipelines - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [logging] ServletContextLogger
On 26 May 2004, at 22:17, David Graham wrote: --- robert burrell donkin [EMAIL PROTECTED] wrote: snip/ PS: I'm also willing to create a new implementation of LogFactory which will discover the available log implementations at runtime, rather than the compile time strategy which exists now. sounds interesting. the idea of using commons-discovery to find all implementation at runtime has come up before but AFAIK without much action. IMO, adding a dependency to commons-logging is a very bad idea considering how many other projects use it and have no need for commons-discovery. If commons-logging was released with another dependency I would just keep using old versions to avoid the new dependency :-(. it could be an optional dependency distributed in an optional jar. those users who wanted to use a discovery based method could drop in the jars. other downstream users would continue to use the core library which would not have such a dependency. - robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Jakarta Commons Wiki] New: Betwixt/ObjectPipelines
Date: 2004-05-26T14:31:25 Editor: RobertBurrellDonkin [EMAIL PROTECTED] Wiki: Jakarta Commons Wiki Page: Betwixt/ObjectPipelines URL: http://wiki.apache.org/jakarta-commons/Betwixt/ObjectPipelines Page about object pipelines New Page: = Object Pipelines = One common use case is unmarshalling large XML documents which consist of a regular pattern of sub-trees. For example: {{{ ?xml version='1.0'? root objects object ... /object object ... /object ... object ... /object /objects /root }}} each document fragment enclosed by the object tag needs to be unmarshalled to an object then each object processed in turn. The usually way to do this is to unmarshal the whole document into a collection and then process each in turn. DOM based binding solutions are likely to use a lot of memory since they must read the document and all the objects into memory before processing can begin. SAX based binding solutions (such as Betwixt) have an advantage in this case. They can process each fragment in turn without having to keep the whole document in memory at any time. Unfortunately, they still need to keep all the objects in memory. = Object Pipelines = One solution is to use a SAX based binder combined with a Object pipeline. The idea is that the binder supplies each object to the consumer for processing as soon as it becomes available. This should be pretty easy to add to Betwixt (and other binders). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/functors InvokerTransformer.java
scolebourne2004/05/26 14:44:05 Modified:collections/src/java/org/apache/commons/collections/functors InvokerTransformer.java Log: Add additional getInstance method Revision ChangesPath 1.7 +16 -2 jakarta-commons/collections/src/java/org/apache/commons/collections/functors/InvokerTransformer.java Index: InvokerTransformer.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/functors/InvokerTransformer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- InvokerTransformer.java 16 May 2004 11:36:31 - 1.6 +++ InvokerTransformer.java 26 May 2004 21:44:05 - 1.7 @@ -43,7 +43,21 @@ private final Object[] iArgs; /** - * Gets an instanceof this transformer calling a specific method with specific values. + * Gets an instance of this transformer calling a specific method with no arguments. + * + * @param methodName the method name to call + * @return an invoker transformer + * @since Commons Collections 3.1 + */ +public static Transformer getInstance(String methodName) { +if (methodName == null) { +throw new IllegalArgumentException(The method to invoke must not be null); +} +return new InvokerTransformer(methodName); +} + +/** + * Gets an instance of this transformer calling a specific method with specific values. * * @param methodName the method name to call * @param paramTypes the parameter types of the method - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/beanutils/optional/bean-collections/src/java/org/apache/commons/beanutils BeanPredicate.java
rdonkin 2004/05/26 14:49:06 Modified: beanutils/optional/bean-collections/src/java/org/apache/commons/beanutils BeanPredicate.java Log: JavaDoc'd BeanPredicate Revision ChangesPath 1.2 +41 -1 jakarta-commons/beanutils/optional/bean-collections/src/java/org/apache/commons/beanutils/BeanPredicate.java Index: BeanPredicate.java === RCS file: /home/cvs/jakarta-commons/beanutils/optional/bean-collections/src/java/org/apache/commons/beanutils/BeanPredicate.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- BeanPredicate.java10 May 2004 19:58:15 - 1.1 +++ BeanPredicate.java26 May 2004 21:49:06 - 1.2 @@ -22,18 +22,38 @@ import java.lang.reflect.InvocationTargetException; +/** + * pPredicate implementation that applies the given codePredicate/code + * to the result of calling the given property getter. + * /p + */ public class BeanPredicate implements Predicate { private final Log log = LogFactory.getLog(this.getClass()); - + +/** Name of the property whose value will be predicated */ private String propertyName; +/** codePredicate/code to be applied to the property value */ private Predicate predicate; +/** + * Constructs a codeBeanPredicate/code that applies the given + * codePredicate/code to the named property value. + * @param propertyName the name of the property whose value is to be predicated, + * not null + * @param predicate the codePredicate/code to be applied, + * not null + */ public BeanPredicate(String propertyName, Predicate predicate) { this.propertyName = propertyName; this.predicate = predicate; } +/** + * Evaluates the given object by applying the [EMAIL PROTECTED] #getPredicate()} + * to a property value named by [EMAIL PROTECTED] #getPropertyName()}. + * @throws IllegalAccessException when the property cannot be evaluated + */ public boolean evaluate(Object object) { boolean evaluation = false; @@ -62,18 +82,38 @@ return evaluation; } +/** + * Gets the name of the property whose value is to be predicated. + * in the evaluation. + * @return the property name, not null + */ public String getPropertyName() { return propertyName; } +/** + * Sets the name of the property whose value is to be predicated. + * @param propertyName the name of the property whose value is to be predicated, + * not null + */ public void setPropertyName(String propertyName) { this.propertyName = propertyName; } +/** + * Gets the codePredicate/code to be applied to the value of the named property + * during [EMAIL PROTECTED] #evaluate}. + * @return codePredicate/code, not null + */ public Predicate getPredicate() { return predicate; } +/** + * Sets the codePredicate/code to be applied to the value of the named property + * during [EMAIL PROTECTED] evaluate}. + * @param predicate codePredicate/code, not null + */ public void setPredicate(Predicate predicate) { this.predicate = predicate; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections TransformerUtils.java PredicateUtils.java ClosureUtils.java
scolebourne2004/05/26 14:50:52 Modified:collections/src/java/org/apache/commons/collections TransformerUtils.java PredicateUtils.java ClosureUtils.java Log: Replace calls to Utils classes with direct references to implementations Revision ChangesPath 1.13 +3 -2 jakarta-commons/collections/src/java/org/apache/commons/collections/TransformerUtils.java Index: TransformerUtils.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/TransformerUtils.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- TransformerUtils.java 14 Apr 2004 21:47:47 - 1.12 +++ TransformerUtils.java 26 May 2004 21:50:52 - 1.13 @@ -23,6 +23,7 @@ import org.apache.commons.collections.functors.CloneTransformer; import org.apache.commons.collections.functors.ClosureTransformer; import org.apache.commons.collections.functors.ConstantTransformer; +import org.apache.commons.collections.functors.EqualPredicate; import org.apache.commons.collections.functors.ExceptionTransformer; import org.apache.commons.collections.functors.FactoryTransformer; import org.apache.commons.collections.functors.InstantiateTransformer; @@ -339,7 +340,7 @@ int i = 0; for (Iterator it = objectsAndTransformers.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); -preds[i] = PredicateUtils.equalPredicate(entry.getKey()); +preds[i] = EqualPredicate.getInstance(entry.getKey()); trs[i] = (Transformer) entry.getValue(); i++; } 1.19 +5 -3 jakarta-commons/collections/src/java/org/apache/commons/collections/PredicateUtils.java Index: PredicateUtils.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/PredicateUtils.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- PredicateUtils.java 14 Apr 2004 21:47:47 - 1.18 +++ PredicateUtils.java 26 May 2004 21:50:52 - 1.19 @@ -25,6 +25,7 @@ import org.apache.commons.collections.functors.FalsePredicate; import org.apache.commons.collections.functors.IdentityPredicate; import org.apache.commons.collections.functors.InstanceofPredicate; +import org.apache.commons.collections.functors.InvokerTransformer; import org.apache.commons.collections.functors.NonePredicate; import org.apache.commons.collections.functors.NotNullPredicate; import org.apache.commons.collections.functors.NotPredicate; @@ -60,6 +61,7 @@ * liFalse - always return false * liException - always throws an exception * liNullIsException/NullIsFalse/NullIsTrue - check for null input + * liTransformed - transforms the input before calling the predicate * /ul * All the supplied predicates are Serializable. * @@ -213,7 +215,7 @@ */ public static Predicate invokerPredicate(String methodName){ // reuse transformer as it has caching - this is lazy really, should have inner class here -return asPredicate(TransformerUtils.invokerTransformer(methodName)); +return asPredicate(InvokerTransformer.getInstance(methodName)); } /** @@ -238,7 +240,7 @@ */ public static Predicate invokerPredicate(String methodName, Class[] paramTypes, Object[] args){ // reuse transformer as it has caching - this is lazy really, should have inner class here -return asPredicate(TransformerUtils.invokerTransformer(methodName, paramTypes, args)); +return asPredicate(InvokerTransformer.getInstance(methodName, paramTypes, args)); } // Boolean combinations 1.9 +6 -4 jakarta-commons/collections/src/java/org/apache/commons/collections/ClosureUtils.java Index: ClosureUtils.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/ClosureUtils.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ClosureUtils.java 14 Apr 2004 21:47:47 - 1.8 +++ ClosureUtils.java 26 May 2004 21:50:52 - 1.9 @@ -20,9 +20,11 @@ import java.util.Map; import org.apache.commons.collections.functors.ChainedClosure; +import org.apache.commons.collections.functors.EqualPredicate; import org.apache.commons.collections.functors.ExceptionClosure; import org.apache.commons.collections.functors.ForClosure; import org.apache.commons.collections.functors.IfClosure; +import org.apache.commons.collections.functors.InvokerTransformer;
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/iterators EmptyOrderedIterator.java
scolebourne2004/05/26 14:52:40 Added: collections/src/java/org/apache/commons/collections/iterators EmptyOrderedIterator.java Log: Add iterator to ensure implementation is as per v3.0 Revision ChangesPath 1.1 jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/EmptyOrderedIterator.java Index: EmptyOrderedIterator.java === /* * Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.collections.iterators; import org.apache.commons.collections.OrderedIterator; import org.apache.commons.collections.ResettableIterator; /** * Provides an implementation of an empty ordered iterator. * * @since Commons Collections 3.1 * @version $Revision: 1.1 $ $Date: 2004/05/26 21:52:40 $ * * @author Stephen Colebourne */ public class EmptyOrderedIterator extends AbstractEmptyIterator implements OrderedIterator, ResettableIterator { /** * Singleton instance of the iterator. * @since Commons Collections 3.1 */ public static final OrderedIterator INSTANCE = new EmptyOrderedIterator(); /** * Constructor. */ protected EmptyOrderedIterator() { super(); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/iterators EmptyListIterator.java
scolebourne2004/05/26 14:53:18 Modified:collections/src/java/org/apache/commons/collections/iterators EmptyListIterator.java Log: Ensure implementation is as per v3.0 Revision ChangesPath 1.2 +2 -8 jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/EmptyListIterator.java Index: EmptyListIterator.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/EmptyListIterator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- EmptyListIterator.java22 May 2004 09:46:39 - 1.1 +++ EmptyListIterator.java26 May 2004 21:53:18 - 1.2 @@ -17,7 +17,6 @@ import java.util.ListIterator; -import org.apache.commons.collections.OrderedIterator; import org.apache.commons.collections.ResettableListIterator; /** @@ -32,7 +31,7 @@ * * @author Stephen Colebourne */ -public class EmptyListIterator extends AbstractEmptyIterator implements ResettableListIterator, OrderedIterator { +public class EmptyListIterator extends AbstractEmptyIterator implements ResettableListIterator { /** * Singleton instance of the iterator. @@ -44,11 +43,6 @@ * @since Commons Collections 2.1.1 and 3.1 */ public static final ListIterator INSTANCE = RESETTABLE_INSTANCE; -/** - * Singleton instance of the iterator. - * @since Commons Collections 3.1 - */ -public static final OrderedIterator ORDERED_INSTANCE = (OrderedIterator) RESETTABLE_INSTANCE; /** * Constructor. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections IteratorUtils.java
scolebourne2004/05/26 14:53:46 Modified:collections/src/java/org/apache/commons/collections IteratorUtils.java Log: Ensure empty iterator implementation is as per v3.0 Revision ChangesPath 1.27 +11 -10 jakarta-commons/collections/src/java/org/apache/commons/collections/IteratorUtils.java Index: IteratorUtils.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/IteratorUtils.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- IteratorUtils.java22 May 2004 09:46:39 - 1.26 +++ IteratorUtils.java26 May 2004 21:53:46 - 1.27 @@ -33,6 +33,7 @@ import org.apache.commons.collections.iterators.EmptyIterator; import org.apache.commons.collections.iterators.EmptyListIterator; import org.apache.commons.collections.iterators.EmptyMapIterator; +import org.apache.commons.collections.iterators.EmptyOrderedIterator; import org.apache.commons.collections.iterators.EmptyOrderedMapIterator; import org.apache.commons.collections.iterators.EnumerationIterator; import org.apache.commons.collections.iterators.FilterIterator; @@ -75,21 +76,21 @@ /** * An iterator over no elements. * p - * WARNING: This constant is binary incompatible with Commons Collections 2.1. + * WARNING: This constant is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use codeEmptyIterator.INSTANCE/code for compatability with Commons Collections 2.1.1. */ public static final ResettableIterator EMPTY_ITERATOR = EmptyIterator.RESETTABLE_INSTANCE; /** * A list iterator over no elements. * p - * WARNING: This constant is binary incompatible with Commons Collections 2.1. + * WARNING: This constant is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use codeEmptyListIterator.INSTANCE/code for compatability with Commons Collections 2.1.1. */ public static final ResettableListIterator EMPTY_LIST_ITERATOR = EmptyListIterator.RESETTABLE_INSTANCE; /** * An ordered iterator over no elements. */ -public static final OrderedIterator EMPTY_ORDERED_ITERATOR = EmptyListIterator.ORDERED_INSTANCE; +public static final OrderedIterator EMPTY_ORDERED_ITERATOR = EmptyOrderedIterator.INSTANCE; /** * A map iterator over no elements. */ @@ -113,7 +114,7 @@ * This iterator is a valid iterator object that will iterate over * nothing. * p - * WARNING: This method is binary incompatible with Commons Collections 2.1. + * WARNING: This method is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use codeEmptyIterator.INSTANCE/code for compatability with Commons Collections 2.1.1. * * @return an iterator over nothing @@ -128,7 +129,7 @@ * This iterator is a valid list iterator object that will iterate * over nothing. * p - * WARNING: This method is binary incompatible with Commons Collections 2.1. + * WARNING: This method is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use codeEmptyListIterator.INSTANCE/code for compatability with Commons Collections 2.1.1. * * @return a list iterator over nothing @@ -181,7 +182,7 @@ * This iterator is a valid iterator object that will iterate over * the specified object. * p - * WARNING: This method is binary incompatible with Commons Collections 2.1. + * WARNING: This method is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use codenew SingletonIterator(object)/code for compatability. * * @param object the single object over which to iterate @@ -209,7 +210,7 @@ /** * Gets an iterator over an object array. * p - * WARNING: This method is binary incompatible with Commons Collections 2.1. + * WARNING: This method is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use codenew ArrayIterator(array)/code for compatability. * * @param array the array over which to iterate @@ -238,7 +239,7 @@ /** * Gets an iterator over the end part of an object array. * p - * WARNING: This method is binary incompatible with Commons Collections 2.1. + * WARNING: This method is binary incompatible with Commons Collections 2.1 and 2.1.1. * Use codenew ArrayIterator(array,start)/code for compatability. * * @param array the array over which to iterate @@ -273,7 +274,7 @@ /** * Gets an iterator over part of an object array. * p - * WARNING: This method is binary incompatible with Commons Collections
Re: [math] Design review pre 1.0
--- Mark R. Diggory [EMAIL PROTECTED] wrote: Al Chou wrote: Before we go too far down this path, it would be very helpful to know just how much performance penalty is incurred by specifying strictfp. That FAQ certainly suggests that the difference is large and undesirable, but like profiling, you never really know what it is until you actually measure it Suggestion: conduct an informal timing test of a few representative functions, say, some of the transcendental functions in java.lang.Math, with and without strictfp. A loop doing 100,000 of these method calls should be sufficient to have runtime lasting several seconds to several minutes depending on the operation. Run it at least three times to get an idea of the mean runtime and standard deviation. The tough part is that I think all the java.lang.Math functions already are strict in that they simply call their strict counterparts in java.lang.StrictMath. Yeah, and almost all that stuff seems to be JNI calls, IIRC. I downloaded the fdlibm from metalab.unc.edu just for kicks, as well as some interesting-sounding other libraries in the same directory. Looks like that C source code is GPL'ed, though, so we couldn't use it for commons-math (we may have discussed that before), though maybe it could serve as a model for a Java implementation just for benchmarking the penalty strictfp incurs. I saw a gamma function evaluator in there, and probably one or two others at least, that could be good tests. Al __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections MultiHashMap.java
scolebourne2004/05/26 14:56:05 Modified:collections/src/java/org/apache/commons/collections/list TreeList.java collections/src/java/org/apache/commons/collections/map AbstractHashedMap.java AbstractLinkedMap.java Flat3Map.java collections/src/java/org/apache/commons/collections MultiHashMap.java Log: Replace IteratorUtils calls with direct implementation calls Revision ChangesPath 1.3 +2 -2 jakarta-commons/collections/src/java/org/apache/commons/collections/list/TreeList.java Index: TreeList.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/list/TreeList.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TreeList.java 12 May 2004 23:24:45 - 1.2 +++ TreeList.java 26 May 2004 21:56:05 - 1.3 @@ -135,7 +135,7 @@ */ public ListIterator listIterator(int fromIndex) { // override to go 75% faster -// cannot use IteratorUtils.EMPTY_ITERATOR as iterator.add() must work +// cannot use EmptyIterator as iterator.add() must work checkInterval(fromIndex, 0, size()); return new TreeListIterator(this, fromIndex); } 1.18 +7 -6 jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractHashedMap.java Index: AbstractHashedMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractHashedMap.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- AbstractHashedMap.java27 Apr 2004 21:28:40 - 1.17 +++ AbstractHashedMap.java26 May 2004 21:56:05 - 1.18 @@ -28,9 +28,10 @@ import java.util.Set; import org.apache.commons.collections.IterableMap; -import org.apache.commons.collections.IteratorUtils; import org.apache.commons.collections.KeyValue; import org.apache.commons.collections.MapIterator; +import org.apache.commons.collections.iterators.EmptyIterator; +import org.apache.commons.collections.iterators.EmptyMapIterator; /** * An abstract implementation of a hash-based map which provides numerous points for @@ -713,7 +714,7 @@ */ public MapIterator mapIterator() { if (size == 0) { -return IteratorUtils.EMPTY_MAP_ITERATOR; +return EmptyMapIterator.INSTANCE; } return new HashMapIterator(this); } @@ -779,7 +780,7 @@ */ protected Iterator createEntrySetIterator() { if (size() == 0) { -return IteratorUtils.EMPTY_ITERATOR; +return EmptyIterator.INSTANCE; } return new EntrySetIterator(this); } @@ -868,7 +869,7 @@ */ protected Iterator createKeySetIterator() { if (size() == 0) { -return IteratorUtils.EMPTY_ITERATOR; +return EmptyIterator.INSTANCE; } return new KeySetIterator(this); } @@ -945,7 +946,7 @@ */ protected Iterator createValuesIterator() { if (size() == 0) { -return IteratorUtils.EMPTY_ITERATOR; +return EmptyIterator.INSTANCE; } return new ValuesIterator(this); } 1.12 +8 -7 jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractLinkedMap.java Index: AbstractLinkedMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/AbstractLinkedMap.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- AbstractLinkedMap.java9 Apr 2004 22:52:48 - 1.11 +++ AbstractLinkedMap.java26 May 2004 21:56:05 - 1.12 @@ -20,12 +20,13 @@ import java.util.Map; import java.util.NoSuchElementException; -import org.apache.commons.collections.IteratorUtils; import org.apache.commons.collections.MapIterator; import org.apache.commons.collections.OrderedIterator; import org.apache.commons.collections.OrderedMap; import org.apache.commons.collections.OrderedMapIterator; import org.apache.commons.collections.ResettableIterator; +import org.apache.commons.collections.iterators.EmptyOrderedIterator; +import org.apache.commons.collections.iterators.EmptyOrderedMapIterator; /** * An abstract implementation of a hash-based map that links entries to create an @@ -331,7 +332,7 @@ */ public MapIterator mapIterator() { if (size == 0) { -return
cvs commit: jakarta-commons/collections/src/test/org/apache/commons/collections TestIteratorUtils.java
scolebourne2004/05/26 14:56:45 Modified:collections/src/test/org/apache/commons/collections TestIteratorUtils.java Log: Ensure empty iterator implementation is as per v3.0 Revision ChangesPath 1.16 +4 -2 jakarta-commons/collections/src/test/org/apache/commons/collections/TestIteratorUtils.java Index: TestIteratorUtils.java === RCS file: /home/cvs/jakarta-commons/collections/src/test/org/apache/commons/collections/TestIteratorUtils.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- TestIteratorUtils.java22 May 2004 09:46:39 - 1.15 +++ TestIteratorUtils.java26 May 2004 21:56:45 - 1.16 @@ -27,6 +27,7 @@ import org.apache.commons.collections.iterators.EmptyIterator; import org.apache.commons.collections.iterators.EmptyListIterator; import org.apache.commons.collections.iterators.EmptyMapIterator; +import org.apache.commons.collections.iterators.EmptyOrderedIterator; import org.apache.commons.collections.iterators.EmptyOrderedMapIterator; /** @@ -493,10 +494,11 @@ * Test empty map iterator */ public void testEmptyOrderedIterator() { -assertSame(EmptyListIterator.ORDERED_INSTANCE, IteratorUtils.EMPTY_ORDERED_ITERATOR); +assertSame(EmptyOrderedIterator.INSTANCE, IteratorUtils.EMPTY_ORDERED_ITERATOR); assertEquals(true, IteratorUtils.EMPTY_ORDERED_ITERATOR instanceof Iterator); assertEquals(true, IteratorUtils.EMPTY_ORDERED_ITERATOR instanceof OrderedIterator); assertEquals(true, IteratorUtils.EMPTY_ORDERED_ITERATOR instanceof ResettableIterator); +assertEquals(false, IteratorUtils.EMPTY_ORDERED_ITERATOR instanceof ListIterator); assertEquals(false, IteratorUtils.EMPTY_ORDERED_ITERATOR instanceof MapIterator); assertEquals(false, IteratorUtils.EMPTY_ORDERED_ITERATOR.hasNext()); assertEquals(false, IteratorUtils.EMPTY_ORDERED_ITERATOR.hasPrevious()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/collection CompositeCollection.java
scolebourne2004/05/26 14:58:02 Modified:collections/src/java/org/apache/commons/collections/iterators IteratorChain.java collections/src/java/org/apache/commons/collections/bidimap TreeBidiMap.java collections/src/java/org/apache/commons/collections/collection CompositeCollection.java Log: Replace IteratorUtils calls with direct implementation calls Revision ChangesPath 1.13 +2 -3 jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/IteratorChain.java Index: IteratorChain.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/IteratorChain.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- IteratorChain.java18 Feb 2004 00:59:50 - 1.12 +++ IteratorChain.java26 May 2004 21:58:02 - 1.13 @@ -20,7 +20,6 @@ import java.util.Iterator; import java.util.List; -import org.apache.commons.collections.IteratorUtils; import org.apache.commons.collections.list.UnmodifiableList; /** @@ -222,7 +221,7 @@ protected void updateCurrentIterator() { if (currentIterator == null) { if (iteratorChain.isEmpty()) { -currentIterator = IteratorUtils.EMPTY_ITERATOR; +currentIterator = EmptyIterator.INSTANCE; } else { currentIterator = (Iterator) iteratorChain.get(0); } 1.14 +6 -6 jakarta-commons/collections/src/java/org/apache/commons/collections/bidimap/TreeBidiMap.java Index: TreeBidiMap.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bidimap/TreeBidiMap.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- TreeBidiMap.java 15 May 2004 11:59:15 - 1.13 +++ TreeBidiMap.java 26 May 2004 21:58:02 - 1.14 @@ -24,12 +24,12 @@ import java.util.Set; import org.apache.commons.collections.BidiMap; -import org.apache.commons.collections.IteratorUtils; import org.apache.commons.collections.KeyValue; import org.apache.commons.collections.MapIterator; import org.apache.commons.collections.OrderedBidiMap; import org.apache.commons.collections.OrderedIterator; import org.apache.commons.collections.OrderedMapIterator; +import org.apache.commons.collections.iterators.EmptyOrderedMapIterator; import org.apache.commons.collections.keyvalue.UnmodifiableMapEntry; /** @@ -406,7 +406,7 @@ */ public MapIterator mapIterator() { if (isEmpty()) { -return IteratorUtils.EMPTY_ORDERED_MAP_ITERATOR; +return EmptyOrderedMapIterator.INSTANCE; } return new ViewMapIterator(this, KEY); } @@ -420,7 +420,7 @@ */ public OrderedMapIterator orderedMapIterator() { if (isEmpty()) { -return IteratorUtils.EMPTY_ORDERED_MAP_ITERATOR; +return EmptyOrderedMapIterator.INSTANCE; } return new ViewMapIterator(this, KEY); } @@ -2048,14 +2048,14 @@ public MapIterator mapIterator() { if (isEmpty()) { -return IteratorUtils.EMPTY_ORDERED_MAP_ITERATOR; +return EmptyOrderedMapIterator.INSTANCE; } return new ViewMapIterator(main, VALUE); } public OrderedMapIterator orderedMapIterator() { if (isEmpty()) { -return IteratorUtils.EMPTY_ORDERED_MAP_ITERATOR; +return EmptyOrderedMapIterator.INSTANCE; } return new ViewMapIterator(main, VALUE); } 1.7 +3 -3 jakarta-commons/collections/src/java/org/apache/commons/collections/collection/CompositeCollection.java Index: CompositeCollection.java === RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/collection/CompositeCollection.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- CompositeCollection.java 15 May 2004 12:39:13 - 1.6 +++ CompositeCollection.java 26 May 2004 21:58:02 - 1.7 @@ -21,7 +21,7 @@ import java.util.Collection; import java.util.Iterator; -import org.apache.commons.collections.IteratorUtils; +import org.apache.commons.collections.iterators.EmptyIterator; import org.apache.commons.collections.iterators.IteratorChain; import org.apache.commons.collections.list.UnmodifiableList; @@ -137,7 +137,7 @@
cvs commit: jakarta-commons/collections RELEASE-NOTES.html
scolebourne2004/05/26 14:59:28 Modified:collections RELEASE-NOTES.html Log: Replace IteratorUtils calls with direct implementation calls Revision ChangesPath 1.53 +2 -0 jakarta-commons/collections/RELEASE-NOTES.html Index: RELEASE-NOTES.html === RCS file: /home/cvs/jakarta-commons/collections/RELEASE-NOTES.html,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- RELEASE-NOTES.html22 May 2004 09:46:39 - 1.52 +++ RELEASE-NOTES.html26 May 2004 21:59:28 - 1.53 @@ -58,6 +58,8 @@ liAbstractLinkedList/NodeCachingLinkedList - added getValue() and setValue() to Node, and made everything use them/li liLRUMap - The addMapping() method now uses isFull() to determine whether it is full/li liLRUMap - Add boolean flag, scanUntilRemovable, giving the removeLRU() method more power [28887]/li +liInvokerTransformer - Add additional getInstance() method/li +liReduced inter-class and inter-package dependencies, especially via *Utils classes/li /ul h4Made Serializable/h4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help on getting started using HttpClient
Gowda, Prasad wrote: HTML !-- File: redirectmeta.html -- HEAD TITLELivelink - Redirection/TITLE META HTTP-EQUIV=Refresh CONTENT=0; URL=/customapp/view/ASE_Roles.html?func=loadParentPage /HEAD /HTML Now my question, how do I get the HttpClient to go to this redirect url and retrieve the actual content. Prasad, Let me explain, that normally redirects are caused by the Location HTTP header and a redirect status code. But the redirect in your case is requested by the body of the HTTP message, that is the HTML code. HttpClient is not HTML specific and not a web browser. Therefore HttpClient does not look into the HTTP message body and can not interprete HTML. You will need to parse the HTML code and find the meta tag yourself. You could either just write a simple parser for this specific purpose or employ a full-blown HTML parser [1]. [1] ask Google: http://www.google.com/search?q=java+HTML+parserhl=debtnG=Search -- _ NOSE applied intelligence ag ortwin glück [www] http://www.nose.ch software engineer [email] [EMAIL PROTECTED] hardturmstrasse 171 [pgp id] 0x81CF3416 8005 zürich [office] +41-1-277 57 35 switzerland [fax] +41-1-277 57 12 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: NTLM authentication problem
Hi there, I'm kinda frustrated here. Not your fault at all, frustrated about MS support, cause there isn't any. I'm trying it here again, maybe here are any IIS pros who can give me a little hint: Can I tell the IIS to give me more info in the logfile anyhow? Need info about why the authentification process failed. Greetings, Hauke Fuhrmann Airbus Deutschland GmbH ECYA3 - Cabin Communication Systems Application Kreetslag 10 21129 Hamburg, Germany Phone: +49 (0) 40 743 - 88260 Mail: [EMAIL PROTECTED] -Ursprüngliche Nachricht- Von: Kalnichevski, Oleg [mailto:[EMAIL PROTECTED] Gesendet: Montag, 3. Mai 2004 16:32 An: Commons HttpClient Project Betreff: RE: NTLM authentication problem Hauke, NTLM problems are notoriously difficult to troubleshoot. Usually it all boils down to extensive guesswork. (1) is user name in the fully-qualified format: domain/account? If yes, use the account name only (2) do you have any 'funny' characters in the password (like German umlauts, for instance)? If yes, try using an account with plain US-ASCII password Oleg -Original Message- From: Fuhrmann, Hauke [mailto:[EMAIL PROTECTED] Sent: Monday, May 03, 2004 16:11 To: '[EMAIL PROTECTED]' Subject: NTLM authentication problem Hi there, I hope you can help me with a little problem I got: I have to download a file from a MS IIS webserver which uses NTLM authentification. The only client I performed a successful download with is MS IE. But I have to use a Java client, so I tried the jakarta commons httpclient. I implemented a test class which sets the correct NTCredentials and performs the request. The source looks somehow like this: String url = http://host/index.html;; NTCredentials creds = new NTCredentials( username, password, hostname, domain); HttpClient client = new HttpClient(); HttpMethod method = new GetMethod(url); client.getState().setCredentials(null, null, creds); where 'username', 'password', 'hostname' and 'domain' are changed with the correct values for the server. After running int statusCode = client.executeMethod(method); I get the following logfile output: --- [DEBUG] HttpClient - -Java version: 1.4.2 [DEBUG] HttpClient - -Java vendor: Sun Microsystems Inc. [DEBUG] HttpClient - -Operating system name: Windows 2000 [DEBUG] HttpClient - -Operating system architecture: x86 [DEBUG] HttpClient - -Operating system version: 5.0 [DEBUG] HttpClient - -SUN 1.42: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores) [DEBUG] HttpClient - -SunJSSE 1.42: Sun JSSE provider(implements RSA Signatures, PKCS12, SunX509 key/trust factories, SSLv3, TLSv1) [DEBUG] HttpClient - -SunRsaSign 1.42: SUN's provider for RSA signatures [DEBUG] HttpClient - -SunJCE 1.42: SunJCE Provider (implements DES, Triple DES, AES, Blowfish, PBE, Diffie-Hellman, HMAC-MD5, HMAC-SHA1) [DEBUG] HttpClient - -SunJGSS 1.0: Sun (Kerberos v5) [DEBUG] HttpConnection - -HttpConnection.setSoTimeout(0) [DEBUG] HttpMethodBase - -Execute loop try 1 [DEBUG] wire - - GET /index.html HTTP/1.1[\r][\n] [DEBUG] HttpMethodBase - -Adding Host request header [DEBUG] wire - - User-Agent: Jakarta Commons-HttpClient/2.0final[\r][\n] [DEBUG] wire - - Host: host[\r][\n] [DEBUG] wire - - [\r][\n] [DEBUG] wire - - HTTP/1.1 401 Access Denied[\r][\n] [DEBUG] wire - - Server: Microsoft-IIS/5.0[\r][\n] [DEBUG] wire - - Date: Mon, 03 May 2004 12:47:03 GMT[\r][\n] [DEBUG] wire - - WWW-Authenticate: Negotiate[\r][\n] [DEBUG] wire - - WWW-Authenticate: NTLM[\r][\n] [DEBUG] wire - - Connection: close[\r][\n] [DEBUG] wire - - Content-Length: 24[\r][\n] [DEBUG] wire - - Content-Type: text/html[\r][\n] [DEBUG] HttpMethodBase - -Authorization required [DEBUG] HttpAuthenticator - -Authenticating with the default authentication realm at host [DEBUG] HttpMethodBase - -HttpMethodBase.execute(): Server demanded authentication credentials, will try again. [DEBUG] wire - - Error: Access is Denied. [DEBUG] HttpMethodBase - -Should close connection in response to Connection: close [DEBUG] HttpMethodBase - -Execute loop try 2 [DEBUG] HttpMethodBase - -Opening the connection. [DEBUG] wire - - GET /index.html HTTP/1.1[\r][\n] [DEBUG] HttpMethodBase - -Request to add Host header ignored: header already added [DEBUG] wire - - User-Agent: Jakarta Commons-HttpClient/2.0final[\r][\n] [DEBUG] wire - - Host: host[\r][\n] [DEBUG] wire - - Authorization: NTLM TlRMTVNTUAABBlIAABgAGAAoCAAIACBEMDE1Nzc4MkFGSVMuUk 9DS1dFTExDT0x MSU5TLkNPTQ==[\r][\n] [DEBUG] wire - - [\r][\n] [DEBUG] wire - - HTTP/1.1 401 Access Denied[\r][\n] [DEBUG] wire - - Server: Microsoft-IIS/5.0[\r][\n] [DEBUG] wire - - Date: Mon, 03 May 2004 12:47:03 GMT[\r][\n] [DEBUG] wire - - WWW-Authenticate:
DO NOT REPLY [Bug 29062] - [API Doc] Improve the description of the preemptive authentication
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=29062. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29062 [API Doc] Improve the description of the preemptive authentication --- Additional Comments From [EMAIL PROTECTED] 2004-05-26 18:02 --- Mike, I see three possibilities for the default credentials end up sent to untrusted web application: (1) when credentials are set for null host and null realm. We should have never allowed that in the very first place, but we did, and now we have to live with that. I believe at the very least we should warn the users about security implications of setting default credentials for null host and realm (2) HttpClient 2.0 does not take target port into consideration when selecting credentials for the HTTP state. This also should have not have happened, but it did. So, even if default credentials are set for a specific host, HttpClient can send them to a untrusted application if it is hosted on a different port (3) I believe there are at least several web platforms capable of supporting different authentication realms defined within the same virtual host. There's no way HttpClient can differentiate those realms unless it receives an authorization challenge. 2 and 3 are really fringe cases but they are not impossible. Think of a hosting company serving massive number of virtual sites off the same web platform I do admit that the part about being cautious when using preemptive may be badly worded, but I do think it should be there Oleg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]