cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestConfigurationUtils.java
ebourg 2004/09/23 01:41:56 Modified:configuration/src/java/org/apache/commons/configuration ConfigurationUtils.java configuration/src/test/org/apache/commons/configuration TestConfigurationUtils.java Log: Added tests for ConfigurationUtils.getBasePath() Revision ChangesPath 1.8 +5 -4 jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationUtils.java Index: ConfigurationUtils.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationUtils.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ConfigurationUtils.java 22 Sep 2004 17:17:30 - 1.7 +++ ConfigurationUtils.java 23 Sep 2004 08:41:55 - 1.8 @@ -323,7 +323,8 @@ } /** - * Return the path without the file name, for example http://xyz.net/foo/bar.xml results in http://xyz.net/foo/ + * Return the path without the file name, for example http://xyz.net/foo/bar.xml + * results in http://xyz.net/foo/ * * @param url * @return @@ -332,13 +333,13 @@ { String s = url.toString(); -if (s.endsWith(/)) +if (s.endsWith(/) || StringUtils.isEmpty(url.getPath())) { return s; } else { -return s.substring(0, s.lastIndexOf(/) + 1); // todo: doesn't work for http://xyz.net ! +return s.substring(0, s.lastIndexOf(/) + 1); } } 1.6 +19 -0 jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestConfigurationUtils.java Index: TestConfigurationUtils.java === RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestConfigurationUtils.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- TestConfigurationUtils.java 12 Jul 2004 14:35:29 - 1.5 +++ TestConfigurationUtils.java 23 Sep 2004 08:41:56 - 1.6 @@ -93,4 +93,23 @@ assertEquals(absFile.toURL(), ConfigurationUtils.getURL(absFile.getParent(), config.xml)); } + +public void testGetBasePath() throws Exception +{ +URL url = new URL(http://xyz.net/foo/bar.xml;); +assertEquals(base path of + url, http://xyz.net/foo/;, ConfigurationUtils.getBasePath(url)); + +url = new URL(http://xyz.net/foo/;); +assertEquals(base path of + url, http://xyz.net/foo/;, ConfigurationUtils.getBasePath(url)); + +url = new URL(http://xyz.net/foo;); +assertEquals(base path of + url, http://xyz.net/;, ConfigurationUtils.getBasePath(url)); + +url = new URL(http://xyz.net/;); +assertEquals(base path of + url, http://xyz.net/;, ConfigurationUtils.getBasePath(url)); + +url = new URL(http://xyz.net;); +assertEquals(base path of + url, http://xyz.net;, ConfigurationUtils.getBasePath(url)); +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31329] - [PATCH] Support for evaluating a predicate when determining if a rule is valid for a given element
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=31329. 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=31329 [PATCH] Support for evaluating a predicate when determining if a rule is valid for a given element --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 09:51 --- Hi Simon, Thanks for your feedback and comments. Much appreciated. Sure, we could remove the use of Collections Predicate and have a local source file that offered the same style of interface, this would even remove the need to downcast the supplied Object parameter to PredicateContext in Predicate.evaluate() , which would also be good. I agree with your comments re XPath style matching - perhaps in the future an XPath-ish Predicate implementation could also be written to allow one to write a XPath style check as well. Just an idea. If there's anything you'd like me to change, etc, just let me know. Cheers, Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestSubsetConfiguration.java
ebourg 2004/09/23 04:37:40 Modified:configuration/src/test/org/apache/commons/configuration TestSubsetConfiguration.java Log: Trivial tests for SubsetConfiguration Revision ChangesPath 1.4 +11 -1 jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestSubsetConfiguration.java Index: TestSubsetConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestSubsetConfiguration.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TestSubsetConfiguration.java 16 Aug 2004 22:16:31 - 1.3 +++ TestSubsetConfiguration.java 23 Sep 2004 11:37:40 - 1.4 @@ -129,4 +129,14 @@ assertEquals(3, vector.size()); } +public void testEmptySubset() { +BaseConfiguration conf = new BaseConfiguration(); +Configuration subset = new SubsetConfiguration(conf, test, .); + +assertTrue(the subset is not empty, subset.isEmpty()); + +conf.addProperty(foo, bar); +assertTrue(the subset is not empty, subset.isEmpty()); +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestSubsetConfiguration.java
ebourg 2004/09/23 04:41:06 Modified:configuration/src/test/org/apache/commons/configuration TestSubsetConfiguration.java Log: Trivial tests for SubsetConfiguration Revision ChangesPath 1.5 +51 -27 jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestSubsetConfiguration.java Index: TestSubsetConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestSubsetConfiguration.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- TestSubsetConfiguration.java 23 Sep 2004 11:37:40 - 1.4 +++ TestSubsetConfiguration.java 23 Sep 2004 11:41:05 - 1.5 @@ -16,23 +16,25 @@ package org.apache.commons.configuration; -import junit.framework.TestCase; - import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Vector; +import junit.framework.TestCase; + /** * Test case for the [EMAIL PROTECTED] SubsetConfiguration} class. * * @author Emmanuel Bourg * @version $Revision$, $Date$ */ -public class TestSubsetConfiguration extends TestCase { +public class TestSubsetConfiguration extends TestCase +{ -public void testGetProperty() { -BaseConfiguration conf = new BaseConfiguration(); +public void testGetProperty() +{ +Configuration conf = new BaseConfiguration(); conf.setProperty(test.key1, value1); conf.setProperty(testing.key2, value1); @@ -42,8 +44,9 @@ assertFalse('ng.key2' found in the subset, subset.containsKey(ng.key2)); } -public void testSetProperty() { -BaseConfiguration conf = new BaseConfiguration(); +public void testSetProperty() +{ +Configuration conf = new BaseConfiguration(); Configuration subset = new SubsetConfiguration(conf, test, .); // set a property in the subset and check the parent @@ -57,7 +60,8 @@ assertEquals(key2 in the subset configuration, value2, subset.getProperty(key2)); } -public void testGetParentKey() { +public void testGetParentKey() +{ // subset with delimiter SubsetConfiguration subset = new SubsetConfiguration(null, prefix, .); assertEquals(parent key for \key\, prefix.key, subset.getParentKey(key)); @@ -69,7 +73,8 @@ assertEquals(parent key for \\, prefix, subset.getParentKey()); } -public void testGetChildKey() { +public void testGetChildKey() +{ // subset with delimiter SubsetConfiguration subset = new SubsetConfiguration(null, prefix, .); assertEquals(parent key for \prefixkey\, key, subset.getChildKey(prefix.key)); @@ -81,8 +86,9 @@ assertEquals(parent key for \prefix\, , subset.getChildKey(prefix)); } -public void testGetKeys() { -BaseConfiguration conf = new BaseConfiguration(); +public void testGetKeys() +{ +Configuration conf = new BaseConfiguration(); conf.setProperty(test, value0); conf.setProperty(test.key1, value1); conf.setProperty(testing.key2, value1); @@ -95,8 +101,9 @@ assertFalse(too many elements, it.hasNext()); } -public void testGetKeysWithPrefix() { -BaseConfiguration conf = new BaseConfiguration(); +public void testGetKeysWithPrefix() +{ +Configuration conf = new BaseConfiguration(); conf.setProperty(test.abc, value0); conf.setProperty(test.abc.key1, value1); conf.setProperty(test.abcdef.key2, value1); @@ -108,35 +115,52 @@ assertEquals(2nd key, abc.key1, it.next()); assertFalse(too many elements, it.hasNext()); } - -public void testGetList() { -BaseConfiguration conf = new BaseConfiguration(); + +public void testGetList() +{ +Configuration conf = new BaseConfiguration(); conf.setProperty(test.abc, value0,value1); -conf.addProperty(test.abc,value3); +conf.addProperty(test.abc, value3); Configuration subset = new SubsetConfiguration(conf, test, .); List list = subset.getList(abc, new ArrayList()); assertEquals(3, list.size()); } -public void testGetVector() { -BaseConfiguration conf = new BaseConfiguration(); +public void testGetVector() +{ +Configuration conf = new BaseConfiguration(); conf.setProperty(test.abc, value0,value1); -conf.addProperty(test.abc,value3); +conf.addProperty(test.abc, value3); Configuration subset = new SubsetConfiguration(conf, test, .);
cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestConfigurationUtils.java
ebourg 2004/09/23 04:42:02 Modified:configuration/src/java/org/apache/commons/configuration ConfigurationUtils.java configuration/src/test/org/apache/commons/configuration TestConfigurationUtils.java Log: Added getFileName(URL) Revision ChangesPath 1.9 +31 -6 jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationUtils.java Index: ConfigurationUtils.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/ConfigurationUtils.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ConfigurationUtils.java 23 Sep 2004 08:41:55 - 1.8 +++ ConfigurationUtils.java 23 Sep 2004 11:42:00 - 1.9 @@ -17,10 +17,10 @@ package org.apache.commons.configuration; import java.io.File; +import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; import java.io.StringWriter; -import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.Iterator; @@ -39,7 +39,7 @@ */ public final class ConfigurationUtils { -private static Log log = LogFactory.getLog(ConfigurationUtils.class); +private static Log log = LogFactory.getLog(ConfigurationUtils.class); private ConfigurationUtils() { @@ -220,7 +220,7 @@ { if (base == null) { -url = new URL(name); +url = new URL(name); } else { @@ -241,10 +241,13 @@ File file = new File(name); if (file.isAbsolute()) // already absolute? { -try { +try +{ url = file.toURL(); log.debug(Configuration loaded from the absolute path + name); -} catch (MalformedURLException e) { +} +catch (MalformedURLException e) +{ e.printStackTrace(); } } @@ -340,6 +343,28 @@ else { return s.substring(0, s.lastIndexOf(/) + 1); +} +} + +/** + * Extract the file name from the specified URL. + */ +static String getFileName(URL url) +{ +if (url == null) +{ +return null; +} + +String path = url.getPath(); + +if (path.endsWith(/) || StringUtils.isEmpty(path)) +{ +return null; +} +else +{ +return path.substring(path.lastIndexOf(/) + 1); } } 1.7 +11 -0 jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestConfigurationUtils.java Index: TestConfigurationUtils.java === RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestConfigurationUtils.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TestConfigurationUtils.java 23 Sep 2004 08:41:56 - 1.6 +++ TestConfigurationUtils.java 23 Sep 2004 11:42:00 - 1.7 @@ -112,4 +112,15 @@ assertEquals(base path of + url, http://xyz.net;, ConfigurationUtils.getBasePath(url)); } +public void testGetFileName() throws Exception +{ +assertEquals(file name for a null URL, null, ConfigurationUtils.getFileName(null)); + +URL url = new URL(http://xyz.net/foo/;); +assertEquals(file for a directory URL + url, null, ConfigurationUtils.getFileName(url)); + +url = new URL(http://xyz.net/foo/bar.xml;); +assertEquals(file name for a valid URL + url, bar.xml, ConfigurationUtils.getFileName(url)); +} + } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration XMLConfiguration.java
ebourg 2004/09/23 04:43:27 Modified:configuration/src/java/org/apache/commons/configuration XMLConfiguration.java Log: Added a constructor using a URL Removed set/getFile() Code formating Revision ChangesPath 1.15 +192 -119 jakarta-commons/configuration/src/java/org/apache/commons/configuration/XMLConfiguration.java Index: XMLConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/XMLConfiguration.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- XMLConfiguration.java 22 Sep 2004 17:17:30 - 1.14 +++ XMLConfiguration.java 23 Sep 2004 11:43:27 - 1.15 @@ -20,6 +20,7 @@ import java.io.Reader; import java.io.StringWriter; import java.io.Writer; +import java.net.URL; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -65,7 +66,7 @@ * @version $Revision$, $Date$ */ public class XMLConfiguration extends AbstractFileConfiguration -{ +{ // For conformance with xpath private static final String ATTRIBUTE_START = [@; @@ -88,15 +89,18 @@ private boolean autoSave = false; /** - * Empty construtor. You must provide a file/fileName to save the - * configuration. + * Creates an empty XML configuration. */ -public XMLConfiguration() { +public XMLConfiguration() +{ // build an empty document. DocumentBuilder builder = null; -try { +try +{ builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); -} catch (ParserConfigurationException e) { +} +catch (ParserConfigurationException e) +{ throw new ConfigurationRuntimeException(e.getMessage(), e); } @@ -105,33 +109,46 @@ } /** - * Attempts to load the XML file as a resource from the classpath. The XML - * file must be located somewhere in the classpath. + * Creates and loads the XML configuration from the specified resource. + * + * @param resource The name of the resource to load. * - * @param resource - *Name of the resource - * @throws ConfigurationException - * If error reading data source. + * @throws ConfigurationException Error while loading the XML file */ -public XMLConfiguration(String resource) throws ConfigurationException { +public XMLConfiguration(String resource) throws ConfigurationException +{ this.fileName = resource; url = ConfigurationUtils.locate(resource); load(); } /** - * Attempts to load the XML file. + * Creates and loads the XML configuration from the specified file. * - * @param file - *File object representing the XML file. - * @throws ConfigurationException - * If error reading data source. + * @param file The XML file to load. + * @throws ConfigurationException Error while loading the XML file */ -public XMLConfiguration(File file) throws ConfigurationException { +public XMLConfiguration(File file) throws ConfigurationException +{ setFile(file); load(); } +/** + * Creates and loads the XML configuration from the specified URL. + * + * @param url The location of the XML file to load. + * @throws ConfigurationException Error while loading the XML file + */ +public XMLConfiguration(URL url) throws ConfigurationException +{ +setURL(url); +load(); +} + +/** + * [EMAIL PROTECTED] + */ public void load(Reader in) throws ConfigurationException { try @@ -155,26 +172,32 @@ *the root element of the document. * @param hierarchy */ -private void initProperties(Element element, StringBuffer hierarchy) { +private void initProperties(Element element, StringBuffer hierarchy) +{ StringBuffer buffer = new StringBuffer(); NodeList list = element.getChildNodes(); -for (int i = 0; i list.getLength(); i++) { +for (int i = 0; i list.getLength(); i++) +{ Node node = list.item(i); -if (node instanceof Element) { +if (node instanceof Element) +{ Element child = (Element) node; StringBuffer subhierarchy = new StringBuffer(hierarchy.toString()); subhierarchy.append(child.getTagName()); processAttributes(subhierarchy.toString(), child);
cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration PropertiesConfiguration.java
ebourg 2004/09/23 04:45:08 Modified:configuration/src/java/org/apache/commons/configuration PropertiesConfiguration.java Log: Added 2 constructors using a File and an URL Revision ChangesPath 1.15 +44 -2 jakarta-commons/configuration/src/java/org/apache/commons/configuration/PropertiesConfiguration.java Index: PropertiesConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/PropertiesConfiguration.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- PropertiesConfiguration.java 22 Sep 2004 17:17:30 - 1.14 +++ PropertiesConfiguration.java 23 Sep 2004 11:45:07 - 1.15 @@ -16,11 +16,13 @@ package org.apache.commons.configuration; +import java.io.File; import java.io.FilterWriter; import java.io.IOException; import java.io.LineNumberReader; import java.io.Reader; import java.io.Writer; +import java.net.URL; import java.util.Date; import java.util.Iterator; import java.util.List; @@ -156,7 +158,7 @@ * The specified file can contain include = properties which then * are loaded and merged into the properties. * - * @param fileName The name of the Properties File to load. + * @param fileName The name of the properties file to load. * @throws ConfigurationException Error while loading the properties file */ public PropertiesConfiguration(String fileName) throws ConfigurationException @@ -172,6 +174,46 @@ // update the base path setBasePath(ConfigurationUtils.getBasePath(url)); + +// load the file +load(); +} + +/** + * Creates and loads the extended properties from the specified file. + * The specified file can contain include = properties which then + * are loaded and merged into the properties. + * + * @param file The properties file to load. + * @throws ConfigurationException Error while loading the properties file + */ +public PropertiesConfiguration(File file) throws ConfigurationException +{ +// enable includes +setIncludesAllowed(true); + +// set the file and update the url, the base path and the file name +setFile(file); + +// load the file +load(); +} + +/** + * Creates and loads the extended properties from the specified URL. + * The specified file can contain include = properties which then + * are loaded and merged into the properties. + * + * @param url The location of the properties file to load. + * @throws ConfigurationException Error while loading the properties file + */ +public PropertiesConfiguration(URL url) throws ConfigurationException +{ +// enable includes +setIncludesAllowed(true); + +// set the URL and update the base path and the file name +setURL(url); // load the file load(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/test/org/apache/commons/configuration TestPropertiesConfiguration.java
ebourg 2004/09/23 04:47:57 Modified:configuration/src/test/org/apache/commons/configuration TestPropertiesConfiguration.java Log: More tests: - for the new constructor PropertiesConfiguration(File) - for a file loaded from a jar - for setInclude() Revision ChangesPath 1.14 +35 -1 jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestPropertiesConfiguration.java Index: TestPropertiesConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/test/org/apache/commons/configuration/TestPropertiesConfiguration.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- TestPropertiesConfiguration.java 22 Sep 2004 17:17:30 - 1.13 +++ TestPropertiesConfiguration.java 23 Sep 2004 11:47:57 - 1.14 @@ -79,6 +79,21 @@ assertEquals(true, loaded); } +public void testSetInclude() throws Exception +{ +// change the include key +PropertiesConfiguration.setInclude(import); + +// load the configuration +PropertiesConfiguration conf = new PropertiesConfiguration(); +conf.load(conf/test.properties); + +// restore the previous value for the other tests +PropertiesConfiguration.setInclude(include); + +assertNull(conf.getString(include.loaded)); +} + /** * Tests codeList/code parsing. */ @@ -183,6 +198,25 @@ pc.load(); assertTrue(Make sure we have multiple keys, pc.getBoolean(test.boolean)); +} + +public void testLoadFromJAR() throws Exception +{ +conf = new PropertiesConfiguration(); +conf.setIncludesAllowed(true); +conf.setFileName(test-jar.properties); +conf.load(); + +assertEquals(jar, conf.getProperty(configuration.location)); +assertEquals(property in an included file, jar, conf.getProperty(include.location)); +} + +public void testLoadFromFile() throws Exception +{ +File file = new File(conf/test.properties); +conf = new PropertiesConfiguration(file); + +assertEquals(true, conf.getString(configuration.loaded)); } public void testGetStringWithEscapedChars() - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration AbstractFileConfiguration.java
ebourg 2004/09/23 04:49:45 Modified:configuration/src/java/org/apache/commons/configuration AbstractFileConfiguration.java Log: Implemented setFileName(), getFile(), setURL() More javadoc Revision ChangesPath 1.3 +25 -12 jakarta-commons/configuration/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java Index: AbstractFileConfiguration.java === RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/AbstractFileConfiguration.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AbstractFileConfiguration.java22 Sep 2004 17:29:08 - 1.2 +++ AbstractFileConfiguration.java23 Sep 2004 11:49:45 - 1.3 @@ -17,6 +17,7 @@ package org.apache.commons.configuration; import java.io.File; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; @@ -26,12 +27,9 @@ import java.io.Reader; import java.io.UnsupportedEncodingException; import java.io.Writer; -import java.io.FileNotFoundException; import java.net.MalformedURLException; import java.net.URL; -import org.apache.commons.lang.NotImplementedException; - /** * Partial implementation of the codeFileConfiguration/code interface. * Developpers of file based configuration may wan't to extend this class, @@ -203,7 +201,8 @@ } /** - * Save the configuration to the specified file. + * Save the configuration to the specified file. This doesn't change the + * source of the configuration, use setFileName() if you need it. * * @param fileName * @@ -228,6 +227,8 @@ /** * Save the configuration to the specified URL if it's a file URL. + * This doesn't change the source of the configuration, use setURL() + * if you need it. * * @param url * @@ -242,7 +243,8 @@ } /** - * Save the configuration to the specified file. + * Save the configuration to the specified file. This doesn't change the + * source of the configuration, use setFile() if you need it. * * @param file * @@ -338,6 +340,9 @@ public void setFileName(String fileName) { this.fileName = fileName; + +// update the URL +url = ConfigurationUtils.locate(basePath, fileName); } /** @@ -365,8 +370,14 @@ */ public File getFile() { -// todo: implement getFile(); -throw new NotImplementedException(coming soon!); +if (url != null file.equals(url.getProtocol())) +{ +return new File(url.getFile()); +} +else +{ +return ConfigurationUtils.constructFile(getBasePath(), getFileName()); +} } /** @@ -380,14 +391,12 @@ { try { -url = file.toURL(); +setURL(file.toURL()); } catch (MalformedURLException e) { e.printStackTrace(); } - -// todo: update the filename and the basepath } else { @@ -412,6 +421,10 @@ { this.url = url; -// todo: update the filename and the basepath +// update the base path +basePath = ConfigurationUtils.getBasePath(url); + +// update the file name +fileName = ConfigurationUtils.getFileName(url); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration project.xml
ebourg 2004/09/23 05:05:07 Modified:configuration project.xml Log: Updated the hsqldb dependency to the version 1.7.2 Revision ChangesPath 1.30 +2 -2 jakarta-commons/configuration/project.xml Index: project.xml === RCS file: /home/cvs/jakarta-commons/configuration/project.xml,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- project.xml 22 Sep 2004 17:17:30 - 1.29 +++ project.xml 23 Sep 2004 12:05:07 - 1.30 @@ -270,7 +270,7 @@ dependency groupIdhsqldb/groupId artifactIdhsqldb/artifactId - version1.7.1/version + version1.7.2.2/version /dependency dependency - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/configuration/conf testdb.script
ebourg 2004/09/23 05:05:33 Modified:configuration/conf testdb.script Log: Cleaning Revision ChangesPath 1.3 +1 -232jakarta-commons/configuration/conf/testdb.script Index: testdb.script === RCS file: /home/cvs/jakarta-commons/configuration/conf/testdb.script,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- testdb.script 24 Jul 2004 16:26:10 - 1.2 +++ testdb.script 23 Sep 2004 12:05:31 - 1.3 @@ -1,6 +1,7 @@ CREATE TABLE CONFIGURATION(KEY VARCHAR NOT NULL PRIMARY KEY,VALUE VARCHAR) CREATE TABLE CONFIGURATIONS(NAME VARCHAR NOT NULL,KEY VARCHAR NOT NULL,VALUE VARCHAR,CONSTRAINT SYS_PK_CONFIGURATIONS PRIMARY KEY(NAME,KEY)) CREATE TABLE CONFIGURATIONLIST(ID VARCHAR NOT NULL PRIMARY KEY, KEY VARCHAR NOT NULL,VALUE VARCHAR) + GRANT ALL ON CLASS java.lang.Math TO PUBLIC GRANT ALL ON CLASS org.hsqldb.Library TO PUBLIC CREATE USER SA PASSWORD ADMIN @@ -72,235 +73,3 @@ CREATE ALIAS LENGTH FOR org.hsqldb.Library.length CREATE ALIAS ROUND FOR org.hsqldb.Library.round CREATE ALIAS REPLACE FOR org.hsqldb.Library.replace -INSERT INTO CONFIGURATION VALUES('key1','value1') -INSERT INTO CONFIGURATION VALUES('key2','value2') -INSERT INTO CONFIGURATIONS VALUES('test','key1','value1') -INSERT INTO CONFIGURATIONS VALUES('test','key2','value2') -/*C1*/CONNECT USER sa PASSWORD -SET AUTOCOMMIT TRUE -SET READONLY FALSE -DELETE FROM CONFIGURATIONS WHERE NAME='test' AND KEY='key1' -DELETE FROM CONFIGURATIONS WHERE NAME='test' AND KEY='key2' -DELETE FROM CONFIGURATION WHERE KEY='key1' -DELETE FROM CONFIGURATION WHERE KEY='key2' -INSERT INTO CONFIGURATION VALUES('key1','value1') -INSERT INTO CONFIGURATION VALUES('key2','value2') -INSERT INTO CONFIGURATIONS VALUES('test','key1','value1') -INSERT INTO CONFIGURATIONS VALUES('test','key2','value2') -SET AUTOCOMMIT TRUE -SET AUTOCOMMIT TRUE -SET READONLY FALSE -INSERT INTO CONFIGURATION VALUES('key','value') -SET AUTOCOMMIT TRUE -SET AUTOCOMMIT TRUE -SET READONLY FALSE -SET AUTOCOMMIT TRUE -/*C2*/CONNECT USER sa PASSWORD -CONNECT USER sa PASSWORD -SET AUTOCOMMIT TRUE -SET READONLY FALSE -DELETE FROM CONFIGURATIONS WHERE NAME='test' AND KEY='key1' -DELETE FROM CONFIGURATIONS WHERE NAME='test' AND KEY='key2' -DELETE FROM CONFIGURATION WHERE KEY='key' -DELETE FROM CONFIGURATION WHERE KEY='key1' -DELETE FROM CONFIGURATION WHERE KEY='key2' -INSERT INTO CONFIGURATION VALUES('key1','value1') -INSERT INTO CONFIGURATION VALUES('key2','value2') -INSERT INTO CONFIGURATIONS VALUES('test','key1','value1') -INSERT INTO CONFIGURATIONS VALUES('test','key2','value2') -SET AUTOCOMMIT TRUE -SET AUTOCOMMIT TRUE -SET READONLY FALSE -INSERT INTO CONFIGURATIONS VALUES('test','key','value') -SET AUTOCOMMIT TRUE -SET AUTOCOMMIT TRUE -SET READONLY FALSE -SET AUTOCOMMIT TRUE -/*C3*/CONNECT USER sa PASSWORD -CONNECT USER sa PASSWORD -SET AUTOCOMMIT TRUE -SET READONLY FALSE -DELETE FROM CONFIGURATIONS WHERE NAME='test' AND KEY='key' -DELETE FROM CONFIGURATIONS WHERE NAME='test' AND KEY='key1' -DELETE FROM CONFIGURATIONS WHERE NAME='test' AND KEY='key2' -DELETE FROM CONFIGURATION WHERE KEY='key1' -DELETE FROM CONFIGURATION WHERE KEY='key2' -INSERT INTO CONFIGURATION VALUES('key1','value1') -INSERT INTO CONFIGURATION VALUES('key2','value2') -INSERT INTO CONFIGURATIONS VALUES('test','key1','value1') -INSERT INTO CONFIGURATIONS VALUES('test','key2','value2') -SET AUTOCOMMIT TRUE -SET AUTOCOMMIT TRUE -SET READONLY FALSE -SET AUTOCOMMIT TRUE -SET AUTOCOMMIT TRUE -SET READONLY FALSE -SET AUTOCOMMIT TRUE -SET AUTOCOMMIT TRUE -SET READONLY FALSE -SET AUTOCOMMIT TRUE -/*C4*/CONNECT USER sa PASSWORD -CONNECT USER sa PASSWORD -SET AUTOCOMMIT TRUE -SET READONLY FALSE -DELETE FROM CONFIGURATIONS WHERE NAME='test' AND KEY='key1' -DELETE FROM CONFIGURATIONS WHERE NAME='test' AND KEY='key2' -DELETE FROM CONFIGURATION WHERE KEY='key1' -DELETE FROM CONFIGURATION WHERE KEY='key2' -INSERT INTO CONFIGURATION VALUES('key1','value1') -INSERT INTO CONFIGURATION VALUES('key2','value2') -INSERT INTO CONFIGURATIONS VALUES('test','key1','value1') -INSERT INTO CONFIGURATIONS VALUES('test','key2','value2') -SET AUTOCOMMIT TRUE -SET AUTOCOMMIT TRUE -SET READONLY FALSE -SET AUTOCOMMIT TRUE -SET AUTOCOMMIT TRUE -SET READONLY FALSE -SET AUTOCOMMIT TRUE -SET AUTOCOMMIT TRUE -SET READONLY FALSE -SET AUTOCOMMIT TRUE -/*C5*/CONNECT USER sa PASSWORD -CONNECT USER sa PASSWORD -SET AUTOCOMMIT TRUE -SET READONLY FALSE -DELETE FROM CONFIGURATIONS WHERE NAME='test' AND KEY='key1' -DELETE FROM CONFIGURATIONS WHERE NAME='test' AND KEY='key2' -DELETE FROM
HTTP Client File Upload Question
Hi all, I'm being bitten by a weird bug and I have a feeling it's because I'm not sure about content-transfer encodings vs charsets. I'm using httpclient 2 to upload to a perl CGI. Uploading from a browser works fine. Uploading from my program works fine for text files. Uploading from my program fails for binary files. The resulting file is corrupted, it seems as if the two high bits of every byte have been zeroed, so a byte val of FF gets transferred as 3F. Does this make any sense to anyone? TIA, N - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/nntp Article.java Threadable.java Threader.java
rwinston2004/09/23 05:12:00 Added: net/src/java/org/apache/commons/net/nntp Article.java Threadable.java Threader.java Log: PR: 26282 Added classes to facilitate message threading Revision ChangesPath 1.1 jakarta-commons/net/src/java/org/apache/commons/net/nntp/Article.java Index: Article.java === /* * The Apache Software License, Version 1.1 * * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, *if any, must include the following acknowledgment: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowledgment may appear in the software itself, *if and wherever such third-party acknowledgments normally appear. * * 4. The names Apache and Apache Software Foundation and *Apache Commons must not be used to endorse or promote products *derived from this software without prior written permission. For *written permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache, *nor may Apache appear in their name, without *prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. */ package org.apache.commons.net.nntp; import java.util.ArrayList; import java.util.StringTokenizer; /** * This is a class that contains the basic state needed for message retrieval and threading. * With thanks to Jamie Zawinski [EMAIL PROTECTED] * @author rwinston [EMAIL PROTECTED] * */ public class Article implements Threadable { private int articleNumber; private String subject; private String date; private String articleId; private String simplifiedSubject; private String from; private StringBuffer header; private StringBuffer references; private boolean isReply = false; public Article kid, next; public Article() { header = new StringBuffer(); } /** * Adds an arbitrary header key and value to this message's header. * @param name the header name * @param val the header value */ public void addHeaderField(String name, String val) { header.append(name); header.append(: ); header.append(val); header.append('\n'); } /** * Adds a message-id to the list of messages that this message references (i.e. replies to) * @param msgId */ public void addReference(String msgId) { if (references == null) { references = new StringBuffer(); references.append(References: ); } references.append(msgId); references.append(\t); } /** * Returns the MessageId references as an array of Strings * @return an array of
cvs commit: jakarta-commons/net/src/java/examples/nntp - New directory
rwinston2004/09/23 05:12:54 jakarta-commons/net/src/java/examples/nntp - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/net/src/java/examples/nntp ExtendedNNTPOps.java MessageThreading.java NNTPUtils.java newsgroups.java post.java
rwinston2004/09/23 05:14:47 Added: net/src/java/examples/nntp ExtendedNNTPOps.java MessageThreading.java NNTPUtils.java newsgroups.java post.java Log: Add a message threading example, and refactor the NNTP examples into their own package. Also added an NNTPUtils class. Revision ChangesPath 1.1 jakarta-commons/net/src/java/examples/nntp/ExtendedNNTPOps.java Index: ExtendedNNTPOps.java === /* * Copyright 2001-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 examples.nntp; import java.io.IOException; import java.io.PrintWriter; import org.apache.commons.net.nntp.Article; import org.apache.commons.net.nntp.NNTPClient; import org.apache.commons.net.nntp.NewsgroupInfo; import examples.PrintCommandListener; /** * Simple class showing some of the extended commands (AUTH, XOVER, LIST ACTIVE) * * @author Rory Winston [EMAIL PROTECTED] */ public class ExtendedNNTPOps { NNTPClient client; public ExtendedNNTPOps() { client = new NNTPClient(); client.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out))); } public void demo(String host, String user, String password) { try { client.connect(host); // AUTHINFO USER/AUTHINFO PASS boolean success = client.authenticate(user, password); if (success) { System.out.println(Authentication succeeded); } else { System.out.println(Authentication failed, error = + client.getReplyString()); } // XOVER NewsgroupInfo testGroup = new NewsgroupInfo(); client.selectNewsgroup(alt.test, testGroup); int lowArticleNumber = testGroup.getFirstArticle(); int highArticleNumber = lowArticleNumber + 100; Article[] articles = NNTPUtils.getArticleInfo(client, lowArticleNumber, highArticleNumber); for (int i = 0; i articles.length; ++i) { System.out.println(articles[i].getSubject()); } // LIST ACTIVE NewsgroupInfo[] fanGroups = client.listNewsgroups(alt.fan.*); for (int i = 0; i fanGroups.length; ++i) { System.out.println(fanGroups[i].getNewsgroup()); } } catch (IOException e) { e.printStackTrace(); } } public static void main(String[] args) { ExtendedNNTPOps ops; if (args.length != 3) { System.err.println(usage: ExtendedNNTPOps nntpserver username password); System.exit(1); } ops = new ExtendedNNTPOps(); ops.demo(args[0], args[1], args[2]); } } /* Emacs configuration * Local variables:** * mode: java ** * c-basic-offset: 4 ** * indent-tabs-mode: nil ** * End:** */ 1.1 jakarta-commons/net/src/java/examples/nntp/MessageThreading.java Index: MessageThreading.java === package examples.nntp; import java.io.IOException; import java.io.PrintWriter; import java.net.SocketException; import org.apache.commons.net.nntp.Article; import org.apache.commons.net.nntp.NNTPClient; import org.apache.commons.net.nntp.NewsgroupInfo; import org.apache.commons.net.nntp.Threader; import examples.PrintCommandListener; public class MessageThreading { public MessageThreading() { } public static void main(String[] args) throws SocketException, IOException { if (args.length != 3) usage(); String hostname = args[0];
cvs commit: jakarta-commons/net/src/java/examples ExtendedNNTPOps.java newsgroups.java post.java
rwinston2004/09/23 05:15:38 Removed: net/src/java/examples ExtendedNNTPOps.java newsgroups.java post.java Log: Moved to examples/nntp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 26282] - Addition of message threading functionality to NNTP
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=26282. 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=26282 Addition of message threading functionality to NNTP [EMAIL PROTECTED] changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 12:17 --- Added the message threading classes, and an example. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27437] - FTP get and list tasks fail
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=27437. 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=27437 FTP get and list tasks fail --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 13:13 --- Created an attachment (id=12848) AIXFTPEntryParser.java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27437] - FTP get and list tasks fail
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=27437. 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=27437 FTP get and list tasks fail --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 13:14 --- Created an attachment (id=12849) AIXFTPEntryParserTest.java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27437] - FTP get and list tasks fail
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=27437. 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=27437 FTP get and list tasks fail --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 13:15 --- I agree with Steve that there may be a more elegant long-term solution to this, however, in the interests of the interim, I have created an AIX parser and testcase that successfully parses the output that Mark sent previously. Steve et. al, let me know if you approve of this approach, and I can commit it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 30269] - add functionality to retrieve files from mainframe
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=30269. 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=30269 add functionality to retrieve files from mainframe --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 13:23 --- Shad, Can you send a FTP directory listing for the MVS system? You can attach it to this Bugzilla entry. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 23488] - OS400 FTP server directory listing is not being parsed properly in FTPFile class.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=23488. 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=23488 OS400 FTP server directory listing is not being parsed properly in FTPFile class. --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 13:25 --- Should this bug be marked as FIXED? I can see that we have an OS400 parser in there already (last revision: 1.4 by Daniel). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [RESULT][VOTE] Release Math 1.0
I think c) covers most everything. +1 for path c). -Mark Phil Steitz wrote: There were not enough +1 votes to proceed with the release. Bug fixes were also applied during the vote. Therefore, we cannot proceed with the release at this time. Three issues were reported with the release package: 1) Extraneous files (forgot to do clean co before release build - my bad) 2) Failing tests for French locale (pr #31325 - fixed in CVS) 3) Integer values not handled correctly by Frequency class (fixed in CVS) The vote thread also included discussion of repackaging and/or API changes. At this point, we can a) Cut a clean release candidate including the fixes applied during the vote and restart the release vote b) Cut an RC2 based on current CVS, vote on releasing this as a test release, similar to RC1. Follow with a 1.0 vote two weeks later. c) Reopen discussion of API changes, agree on release plan, bundle changes into RC2, then do b). My preference would be a); but if others have reservations, I am open to the other options as well. I would appreciate it if committers and other interested parties would weigh in with their opinions. Thanks in advance. Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mark Diggory Software Developer Harvard MIT Data Center http://www.hmdc.harvard.edu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/nntp Threadable.java Threader.java
rwinston2004/09/23 06:41:48 Modified:net/src/java/org/apache/commons/net/nntp Threadable.java Threader.java Log: Change to ASL 2.0 Revision ChangesPath 1.2 +13 -52 jakarta-commons/net/src/java/org/apache/commons/net/nntp/Threadable.java Index: Threadable.java === RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/nntp/Threadable.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Threadable.java 23 Sep 2004 12:12:00 - 1.1 +++ Threadable.java 23 Sep 2004 13:41:48 - 1.2 @@ -1,57 +1,18 @@ -/* - * The Apache Software License, Version 1.1 +/* + * Copyright 2001-2004 The Apache Software Foundation * - * Copyright (c) 2001-2004 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in - *the documentation and/or other materials provided with the - *distribution. - * - * 3. The end-user documentation included with the redistribution, - *if any, must include the following acknowledgment: - * This product includes software developed by the - *Apache Software Foundation (http://www.apache.org/). - *Alternately, this acknowledgment may appear in the software itself, - *if and wherever such third-party acknowledgments normally appear. - * - * 4. The names Apache and Apache Software Foundation and - *Apache Commons must not be used to endorse or promote products - *derived from this software without prior written permission. For - *written permission, please contact [EMAIL PROTECTED] - * - * 5. Products derived from this software may not be called Apache, - *nor may Apache appear in their name, without - *prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * http://www.apache.org/. + * 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.net.nntp; /** 1.2 +13 -51 jakarta-commons/net/src/java/org/apache/commons/net/nntp/Threader.java Index: Threader.java === RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/nntp/Threader.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Threader.java 23 Sep 2004 12:12:00 - 1.1 +++ Threader.java 23 Sep 2004 13:41:48 - 1.2 @@ -1,55 +1,17 @@ -/* - * The Apache Software License, Version 1.1 +/* + * Copyright 2001-2004 The Apache Software Foundation * - * Copyright (c) 2001-2004 The Apache Software Foundation. All rights - *
cvs commit: jakarta-commons/net/src/java/examples/nntp MessageThreading.java
rwinston2004/09/23 06:42:07 Modified:net/src/java/examples/nntp MessageThreading.java Log: Change to ASL 2.0 Revision ChangesPath 1.2 +16 -0 jakarta-commons/net/src/java/examples/nntp/MessageThreading.java Index: MessageThreading.java === RCS file: /home/cvs/jakarta-commons/net/src/java/examples/nntp/MessageThreading.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MessageThreading.java 23 Sep 2004 12:14:46 - 1.1 +++ MessageThreading.java 23 Sep 2004 13:42:06 - 1.2 @@ -1,3 +1,19 @@ +/* + * Copyright 2001-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 examples.nntp; import java.io.IOException; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31387] New: - TFTPClient.setMaxTimeouts() param check broken
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=31387. 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=31387 TFTPClient.setMaxTimeouts() param check broken Summary: TFTPClient.setMaxTimeouts() param check broken Product: Commons Version: 1.0 Alpha Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Net AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The input check on this method inspects the instance variable it is going to set not the input received. Index: TFTPClient.java === RCS file: /home/cvspublic/jakarta-commons/net/src/java/org/apache/commons/net/ tftp/TFTPClient.java,v retrieving revision 1.14 diff -u -r1.14 TFTPClient.java --- TFTPClient.java 29 Jun 2004 04:54:31 - 1.14 +++ TFTPClient.java 23 Sep 2004 13:55:24 - @@ -86,7 +86,7 @@ ***/ public void setMaxTimeouts(int numTimeouts) { -if (__maxTimeouts 1) +if (numTimeouts 1) __maxTimeouts = 1; else __maxTimeouts = numTimeouts; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/tftp TFTPClient.java
rwinston2004/09/23 07:32:55 Modified:net/src/java/org/apache/commons/net/tftp TFTPClient.java Log: PR: 31387 Fixed bug in setMaxTimeout() Revision ChangesPath 1.15 +1 -1 jakarta-commons/net/src/java/org/apache/commons/net/tftp/TFTPClient.java Index: TFTPClient.java === RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/tftp/TFTPClient.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- TFTPClient.java 29 Jun 2004 04:54:31 - 1.14 +++ TFTPClient.java 23 Sep 2004 14:32:54 - 1.15 @@ -86,7 +86,7 @@ ***/ public void setMaxTimeouts(int numTimeouts) { -if (__maxTimeouts 1) +if (numTimeouts 1) __maxTimeouts = 1; else __maxTimeouts = numTimeouts; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31387] - TFTPClient.setMaxTimeouts() param check broken
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=31387. 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=31387 TFTPClient.setMaxTimeouts() param check broken [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 14:34 --- Fixed in CVS. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27437] - FTP get and list tasks fail
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=27437. 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=27437 FTP get and list tasks fail --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 15:00 --- Sorry, my bad. I didn't realize that Daniel has an AIX parser in there already. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
j:forEach bug
Hi, I'm new to this list, and developer tasks in Apache projects. I found a bug in jelly's forEach tag, which is not conformant to jstl. I've tried to fix it and am close (I think), but it's not functioning exactly as I suspected it would. Maybe someone could offer some help. I want to check the specific process for this. Should I enter a bug in bugzilla? I can then post my patch there? Also, I've added a couple of files(tests). Do I just append these? Somethine like: $cvs diff -u site.patch $echo src/test/org/apache/commons/jelly/core/TestForEachTag.java site.patch $cat src/test/org/apache/commons/jelly/core/TestForEachTag.java site.patch $echo src/test/org/apache/commons/jelly/core/testForEachTag.jelly site.patch $cat src/test/org/apache/commons/jelly/core/testForEachTag.jelly site.patch also, like I said this patch isn't complete. What I'm doing is creating an anonymous inner class and setting that in the context. The jelly script recognizes the object, but doesn't proper evaluate it's methods: !-- this evaluates correctly -- j:out value=${myClass.class}/ !-- the class contains a method getProp1() but it isn't evaluating correctly -- j:out value=${myClass.prop1}/ I'm thinking this may have something to do with it being an anonymous inner class. Eyeballing my patch would be much easier than me explaining here, so I won't go into much detail. I'm just curious as to the next step I should take. Thanks, Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read DogBean.java
rdonkin 2004/09/23 14:47:28 Added: betwixt/src/test/org/apache/commons/betwixt/io/read DogBean.java Log: Improved support for derived beans. Revision ChangesPath 1.1 jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/DogBean.java Index: DogBean.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.betwixt.io.read; /** * @author a href='http://jakarta.apache.org/commons'Jakarta Commons Team/a, a href='http://www.apache.org'Apache Software Foundation/a */ public class DogBean extends Animal { private boolean pedigree; private String breed; private String name; public DogBean() {} public DogBean(String name) { this(false, mongrol, name); } public DogBean(boolean pedigree, String breed, String name) { this.pedigree = pedigree; this.breed = breed; this.name = name; } public String getCall() { return Woof; } public String getBreed() { return breed; } public void setBreed(String breed) { this.breed = breed; } public String getName() { return name; } public void setName(String name) { this.name = name; } public boolean isPedigree() { return pedigree; } public void setPedigree(boolean pedigree) { this.pedigree = pedigree; } public String getLatinName() { return Canis familiaris; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read FerretBean.java
rdonkin 2004/09/23 14:47:41 Added: betwixt/src/test/org/apache/commons/betwixt/io/read FerretBean.java Log: Improved support for derived beans. Revision ChangesPath 1.1 jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/FerretBean.java Index: FerretBean.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.betwixt.io.read; /** * @author a href='http://jakarta.apache.org/commons'Jakarta Commons Team/a, a href='http://www.apache.org'Apache Software Foundation/a */ public class FerretBean extends Animal { private String colour; private String name; public FerretBean() {} public FerretBean(String colour, String name) { this.colour = colour; setName(name); } public String getName() { return name; } public String getLatinName() { return Mustela putoris furo; } public String getCall() { return Dook; } public String getColour() { return colour; } public void setColour(String colour) { this.colour = colour; } public void setName(String name) { this.name = name; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read CatBean.java
rdonkin 2004/09/23 14:47:13 Added: betwixt/src/test/org/apache/commons/betwixt/io/read CatBean.java Log: Improved support for derived beans. Revision ChangesPath 1.1 jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/CatBean.java Index: CatBean.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.betwixt.io.read; /** * @author a href='http://jakarta.apache.org/commons'Jakarta Commons Team/a, a href='http://www.apache.org'Apache Software Foundation/a */ public class CatBean extends Animal { private String name; private String colour; public CatBean() {} public CatBean(String name, String colour) { super(); this.name = name; this.colour = colour; } public String getCall() { return Meow; } public String getLatinName() { return Felis catus; } public String getColour() { return colour; } public void setColour(String colour) { this.colour = colour; } public String getName() { return name; } public void setName(String name) { this.name = name; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read PetBean.java
rdonkin 2004/09/23 14:48:00 Added: betwixt/src/test/org/apache/commons/betwixt/io/read PetBean.java Log: Improved support for derived beans. Revision ChangesPath 1.1 jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/PetBean.java Index: PetBean.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.betwixt.io.read; /** * @author a href='http://jakarta.apache.org/commons'Jakarta Commons Team/a, a href='http://www.apache.org'Apache Software Foundation/a */ public class PetBean { private Animal pet; private PersonBean owner; public PetBean() {} public PetBean(Animal pet, PersonBean owner) { super(); this.pet = pet; this.owner = owner; } public PersonBean getOwner() { return owner; } public void setOwner(PersonBean owner) { this.owner = owner; } public Animal getPet() { return pet; } public void setPet(Animal pet) { this.pet = pet; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31393] New: - SetNestedPropertiesRule causes StackOverflowError
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=31393. 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=31393 SetNestedPropertiesRule causes StackOverflowError Summary: SetNestedPropertiesRule causes StackOverflowError Product: Commons Version: 1.6 Final Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Digester AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] when setnestedpropertiesrule encounters something like: foo bar foo bar /bar /foo /bar /foo where it is added as a rule with a pattern of */foo/bar it will end up calling SetNestedPropertiesRule$AnyChildRules.match in an infinite loop (see line 290) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: j:forEach bug
On Thu, 23 Sep 2004 08:28:13 -0700, Ben Anderson [EMAIL PROTECTED] wrote: Hi, I'm new to this list, and developer tasks in Apache projects. I found a bug in jelly's forEach tag, which is not conformant to jstl. I've tried to fix it and am close (I think), but it's not functioning exactly as I suspected it would. Maybe someone could offer some help. I want to check the specific process for this. Should I enter a bug in bugzilla? I can then post my patch there? Also, I've added a couple of files(tests). Do I just append these? Somethine like: You should post your patch in JIRA: http://nagoya.apache.org/jira/secure/BrowseProject.jspa?id=10012 $cvs diff -u site.patch $echo src/test/org/apache/commons/jelly/core/TestForEachTag.java site.patch $cat src/test/org/apache/commons/jelly/core/TestForEachTag.java site.patch $echo src/test/org/apache/commons/jelly/core/testForEachTag.jelly site.patch $cat src/test/org/apache/commons/jelly/core/testForEachTag.jelly site.patch Why are you adding whole files to the patch? There should be a diff option for new files. also, like I said this patch isn't complete. What I'm doing is creating an Failing test cases make this easier. If you can show how it doesn't work, and how the fixes are removing the failures, you'll get a dialog going. anonymous inner class and setting that in the context. The jelly script recognizes the object, but doesn't proper evaluate it's methods: !-- this evaluates correctly -- j:out value=${myClass.class}/ !-- the class contains a method getProp1() but it isn't evaluating correctly -- j:out value=${myClass.prop1}/ I'm thinking this may have something to do with it being an anonymous inner class. Eyeballing my patch would be much easier than me explaining here, so I won't go into much detail. I'm just curious as to the next step I should take. Show us the failures -- http://www.multitask.com.au/people/dion/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27437] - FTP get and list tasks fail
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=27437. 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=27437 FTP get and list tasks fail --- Additional Comments From [EMAIL PROTECTED] 2004-09-24 02:11 --- Rory - I favor your submission far above the old thing in the proposal tree which I think must be what you're talking about. Your submission will work with the current setup and the old one needs significant rework. However, before we commit it, I would like to get clarity on my main question, which nobody has ever answered, ever since this bug (and similar ones before it) was first posted. So, let me reiterate: Is the d/m/y ordering of the date a particular attribute of AIX or the AIX ftp server, anywhere and everywhere, or is it an artifact of LOCALE? Do American AIX servers format the date in the American traditional m/d/y way - or do they follow the d/m/y model? Because if it's the former, I am opposed to creating an AIX parser that is only good for a particular locale. Of course, non-Americans may complain, and rightfully so, IMHO, that that's what THEY have had to put up with all these years. But the extremely low volume of such complaints, plus the utter lack of response I've received to multiple requests for ANY actual data on the prevalence of the various date schemes on FTP servers around the world, inclines me to believe that there must be many FTP servers in Europe that are following the American model. If I am wrong about this, PLEASE, let someone correct me! In other words, I am opposed to saying AIX when what we really mean is AIX in a British locale or AIX in a European locale. That will lead to a jumble. What I'm really worried about is that we might start to see requests for UnixFTPFileEntryParserDeutsch or NTFTPFileEntryParserEspanol. We need to SOLVE the locale thing, not just paper over it. Also, we need to now think about the autodetection mechanism. Do you know how AIX FTP servers identify themselves to the SYST command? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 23488] - OS400 FTP server directory listing is not being parsed properly in FTPFile class.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=23488. 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=23488 OS400 FTP server directory listing is not being parsed properly in FTPFile class. [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-09-24 02:19 --- I think you're right. I am going to mark it fixed. If anyone still has the problem it can be reopened, but clearly this bug was written before the OS400 parser was contributed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 22193] - Unable to reference statics
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=22193. 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=22193 Unable to reference statics --- Additional Comments From [EMAIL PROTECTED] 2004-09-24 02:36 --- I'd much rather we use the fully qualified name, e.g. java.lang.System and have some switch somewhere to turn on classloading for references that are null. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [JELLY] Re: j:forEach bug
Well... this would definitely be a nice feature. FYI, Ben, this example/explanation is perfect. The original email about a bug and your patch would have been more concise and easily digested if it included the info in this last email. If the functionality worked properly in XML but didn't exactly implement javax.servlet.jsp.jstl.core.LoopTagStatus, would that be good for you? Hans -Original Message- From: Ben Anderson [mailto:[EMAIL PROTECTED] Sent: Thursday, September 23, 2004 11:59 AM To: Jakarta Commons Developers List Subject: [JELLY] Re: j:forEach bug I'll post my patch to jira tomorrow - I left the code at work. The JSTL compliance I'm referring to is the varStatus attribute, which according to the jstl spec should implement javax.servlet.jsp.jstl.core.LoopTagStatus. Meanwhile the jelly attribute assigns a variable with type of Integer which is an index. I would like to do something like this, which works nicely using the Standard 1.1 taglibs. j:forEach var=element items=${list} varStatus=status j:if test=${status.last} this is the last time through /j:if /j:forEach I know there are other ways to do this, but is seems to me the jstl way is much nicer ;-) -Ben Paul Libbrecht wrote: Ben, There has been several considerations on making j:forEach more jstl compliant... you might to consider them first: http://nagoya.apache.org/jira/secure/IssueNavigator.jspa? reset=truemode=hidesummary=truedescription=truequery=forEach Do note that Jelly uses Jira and not Bugzilla! To make your patch, I think there's an option of cvs diff that allows a unified diff... All in all, I haven't understood very well what is the goal of your change! Personally, I'd more and more consider the need for forEach to be JSTL compliant as somewhat... annoying. paul Le 23 sept. 04, à 17:28, Ben Anderson a écrit : I'm new to this list, and developer tasks in Apache projects. I found a bug in jelly's forEach tag, which is not conformant to jstl. I've tried to fix it and am close (I think), but it's not functioning exactly as I suspected it would. Maybe someone could offer some help. I want to check the specific process for this. Should I enter a bug in bugzilla? I can then post my patch there? Also, I've added a couple of files(tests). Do I just append these? Somethine like: $cvs diff -u site.patch $echo src/test/org/apache/commons/jelly/core/TestForEachTag.java site.patch $cat src/test/org/apache/commons/jelly/core/TestForEachTag.java site.patch $echo src/test/org/apache/commons/jelly/core/testForEachTag.jelly site.patch $cat src/test/org/apache/commons/jelly/core/testForEachTag.jelly site.patch also, like I said this patch isn't complete. What I'm doing is creating an anonymous inner class and setting that in the context. The jelly script recognizes the object, but doesn't proper evaluate it's methods: !-- this evaluates correctly -- j:out value=${myClass.class}/ !-- the class contains a method getProp1() but it isn't evaluating correctly -- j:out value=${myClass.prop1}/ I'm thinking this may have something to do with it being an anonymous inner class. Eyeballing my patch would be much easier than me explaining here, so I won't go into much detail. I'm just curious as to the next step I should take. Thanks, Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[math] API changes for RC2
Subject line says it all...what changes do we feel are necessary to get 1.0 out the door? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DO NOT REPLY [Bug 27437] - FTP get and list tasks fail
In message [EMAIL PROTECTED], [EMAIL PROTECTED] .org writes: --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 15:00 --- Sorry, my bad. I didn't realize that Daniel has an AIX parser in there already . I don't think I wrote any of the parsers other than the original default one which has been phased out. I don't think there's an AIX parser. One of the Unix listing parsers should handle it I think. Steve or Jeff would know better than I. daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DO NOT REPLY [Bug 23488] - OS400 FTP server directory listing is not being parsed properly in FTPFile class.
http://issues.apache.org/bugzilla/show_bug.cgi?id=23488 OS400 FTP server directory listing is not being parsed properly in FTPFile cla ss. --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 13:25 --- Should this bug be marked as FIXED? I can see that we have an OS400 parser in there already (last revision: 1.4 by Daniel). If I touched it, it was to fix a problem with file sizes being returned as ints instead of longs. I think Steve committed the file and Mario may have written it, so I trust Steve knows what the deal is. Ah, I see he's indicated the bug was reported before the parser was added. daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/telnet TelnetClient.java TelnetInputStream.java
dfs 2004/09/23 22:03:01 Modified:net/src/java/org/apache/commons/net/telnet TelnetClient.java TelnetInputStream.java Log: Applied fix for issue http://issues.apache.org/bugzilla/show_bug.cgi?id=31272 reported by Mark Johnson [EMAIL PROTECTED]. The TelnetClient class has a setReaderThread that inhibits the starting of the TelnetInputStream instance. However TelnetInputStream creates a thread in its constructor, which caused a resource leak when readerThread was set to false. I applied the suggested changes which prevent the thread from being created unless explicitly requested. Revision ChangesPath 1.13 +1 -1 jakarta-commons/net/src/java/org/apache/commons/net/telnet/TelnetClient.java Index: TelnetClient.java === RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/telnet/TelnetClient.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- TelnetClient.java 29 Jun 2004 04:54:31 - 1.12 +++ TelnetClient.java 24 Sep 2004 05:03:01 - 1.13 @@ -98,7 +98,7 @@ input = _input_; -tmp = new TelnetInputStream(input, this); +tmp = new TelnetInputStream(input, this, readerThread); if(readerThread) { tmp._start(); 1.12 +16 -5 jakarta-commons/net/src/java/org/apache/commons/net/telnet/TelnetInputStream.java Index: TelnetInputStream.java === RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/telnet/TelnetInputStream.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- TelnetInputStream.java29 Feb 2004 10:26:55 - 1.11 +++ TelnetInputStream.java24 Sep 2004 05:03:01 - 1.12 @@ -50,10 +50,10 @@ private int __suboption_count = 0; /* TERMINAL-TYPE option (end)*/ -private boolean _ayt_flag = false; +private boolean __threaded; -private boolean __threaded = false; -TelnetInputStream(InputStream input, TelnetClient client) +TelnetInputStream(InputStream input, TelnetClient client, + boolean readerThread) { super(input); __client = client; @@ -69,11 +69,22 @@ __bytesAvailable = 0; __ioException = null; __readIsWaiting = false; -__thread = new Thread(this); +__threaded = false; +if(__threaded) +__thread = new Thread(this); +else +__thread = null; +} + +TelnetInputStream(InputStream input, TelnetClient client) { +this(input, client, true); } void _start() { +if(__thread == null) +return; + int priority; __isClosed = false; // Need to set a higher priority in case JVM does not use pre-emptive @@ -495,7 +506,7 @@ __hasReachedEOF = true; __isClosed = true; -if (__thread.isAlive()) +if (__thread != null __thread.isAlive()) { __thread.interrupt(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31272] - TelnetInputStream zombie thread memory leak, FTPClient TelnetClient
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=31272. 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=31272 TelnetInputStream zombie thread memory leak, FTPClient TelnetClient [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2004-09-24 05:07 --- Bruno was responsible for adding setReaderThread, so I was kind of hoping he'd chime in and look at this. However, it's pretty clear from looking at the code that he overlooked what happens with TelnetInputStream, so I'm applying your fix. Please verify it has the desired effect before closing. I can't wait until we get rid of TelnetInputStream and TelnetOutputStream once and for all. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (JELLY-148) Huge memory leak resulting from the use of ThreadLocal
The following comment has been added to this issue: Author: Hans Gilde Created: Thu, 23 Sep 2004 10:15 PM Body: Putting the thread local stuff in the JellyContext makes the memory leak go away as soon as the context is disposed of. Depending on how you use the context, the XMLParser might keep a reference to it. And it will have varying amounts of data in it depending on your export setting... this is all *if* we implement the tag cache in the context. The Servlet stuff doesn't reuse the context or the parser so there's no leak for Servlets. But others might reuse the context, I know that I do. So, we have a few choices: 1) Let it leak memory into the context, tell people to trash the context and the parser as often as possible. If you don't, tough luck, you get a memory leak. 2) Implement a context method to clear the cache, tell people to clear the cache as often as possible. Clearing the cache will harm only those scripts that keep references to their body Script, like Swing Action or WindowListener. 3) Use the WeakReference thing, and tell everyone if you want to use Action tags, where the action is a Jelly tag (as opposed to a class that implements ActionListener), you have to keep the Jelly Script around as long as the Swing screen stays up. 4) Some other solution that I can't think of due to my recent lack of sleep. Any suggestions/votes? I think I like #3. - View this comment: http://issues.apache.org/jira/browse/JELLY-148?page=comments#action_53372 - View the issue: http://issues.apache.org/jira/browse/JELLY-148 Here is an overview of the issue: - Key: JELLY-148 Summary: Huge memory leak resulting from the use of ThreadLocal Type: Bug Status: Unassigned Priority: Critical Project: jelly Components: core / taglib.core Versions: 1.0-beta-5 Assignee: Reporter: Hans Gilde Created: Sat, 18 Sep 2004 9:34 PM Updated: Thu, 23 Sep 2004 10:15 PM Description: There is a huge memory leak that results from the TagScript's use of ThreadLocal. ThreadLocal is usually used from a staic variable, while TagScript uses it from an instance variable. Although this looks legal to me, it causes a huge memory leak. - JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 27437] - FTP get and list tasks fail
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=27437. 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=27437 FTP get and list tasks fail --- Additional Comments From [EMAIL PROTECTED] 2004-09-24 05:33 --- This is what i got on an AIX 4.2: UNIX Type: L8 Version: BSD-44 Not much information to gather a locale. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Commented: (JELLY-148) Huge memory leak resulting from the use of ThreadLocal
Maybe caching could be disabled via a context variable? On Thu, 23 Sep 2004 22:15:32 -0700 (PDT), [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The following comment has been added to this issue: Author: Hans Gilde Created: Thu, 23 Sep 2004 10:15 PM Body: Putting the thread local stuff in the JellyContext makes the memory leak go away as soon as the context is disposed of. Depending on how you use the context, the XMLParser might keep a reference to it. And it will have varying amounts of data in it depending on your export setting... this is all *if* we implement the tag cache in the context. The Servlet stuff doesn't reuse the context or the parser so there's no leak for Servlets. But others might reuse the context, I know that I do. So, we have a few choices: 1) Let it leak memory into the context, tell people to trash the context and the parser as often as possible. If you don't, tough luck, you get a memory leak. 2) Implement a context method to clear the cache, tell people to clear the cache as often as possible. Clearing the cache will harm only those scripts that keep references to their body Script, like Swing Action or WindowListener. 3) Use the WeakReference thing, and tell everyone if you want to use Action tags, where the action is a Jelly tag (as opposed to a class that implements ActionListener), you have to keep the Jelly Script around as long as the Swing screen stays up. 4) Some other solution that I can't think of due to my recent lack of sleep. Any suggestions/votes? I think I like #3. - View this comment: http://issues.apache.org/jira/browse/JELLY-148?page=comments#action_53372 - View the issue: http://issues.apache.org/jira/browse/JELLY-148 Here is an overview of the issue: - Key: JELLY-148 Summary: Huge memory leak resulting from the use of ThreadLocal Type: Bug Status: Unassigned Priority: Critical Project: jelly Components: core / taglib.core Versions: 1.0-beta-5 Assignee: Reporter: Hans Gilde Created: Sat, 18 Sep 2004 9:34 PM Updated: Thu, 23 Sep 2004 10:15 PM Description: There is a huge memory leak that results from the TagScript's use of ThreadLocal. ThreadLocal is usually used from a staic variable, while TagScript uses it from an instance variable. Although this looks legal to me, it causes a huge memory leak. - JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.multitask.com.au/people/dion/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31378] - Move multipart request to a new RequestEntity type
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=31378. 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=31378 Move multipart request to a new RequestEntity type --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 07:46 --- Mike, I like this redesign a lot. But it needs to be well-documented in the guide, so that people understand how to use it. You made the MIME boundary string a param. I have a strong feeling that we should avoid that. The boundary string should not be a constant at all. It should be randomly generated on each request. Multipart-MIME is an extremely hierarchical format that can be nested deeply. So there can be more than one boundary string and we must ensure they are all unique within the same request. I know we had a request when somebody wanted to control the boundary string. We could still allow that by accepting an optional parameter in a Part constructor. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 17416] - Send InputStreams instead of files in MultipartPostMethod
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=17416. 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=17416 Send InputStreams instead of files in MultipartPostMethod [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 11:09 --- *** This bug has been marked as a duplicate of 31378 *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31378] - Move multipart request to a new RequestEntity type
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=31378. 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=31378 Move multipart request to a new RequestEntity type [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 11:09 --- *** Bug 17416 has been marked as a duplicate of this bug. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31378] - Move multipart request to a new RequestEntity type
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=31378. 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=31378 Move multipart request to a new RequestEntity type [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED Target Milestone|--- |3.0 Beta 1 --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 11:15 --- Mike, I would like to echo Odi's comment on the boundary string. It does make sense to have it randomly generated when not explicitly defined. One little comment I have is that the patch currently makes use of some deprecated classes (HttpConstants). If that's not intentional, references to HttpConstants should be removed. Otherwise all looks cool Oleg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31378] - Move multipart request to a new RequestEntity type
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=31378. 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=31378 Move multipart request to a new RequestEntity type --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 12:26 --- Hi Odi, Oleg, Thank you for looking over the patch. I'll change the boundary string to be randomly generated where it can be overridden by using a param. The use of HttpConstants is intentional as there doesn't seem to be a non-deprecated replacement. Is the default content charset statically available anywhere else? Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 31378] - Move multipart request to a new RequestEntity type
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=31378. 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=31378 Move multipart request to a new RequestEntity type --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 12:44 --- Is the default content charset statically available anywhere else? It's defined in the DefaultHttpParams these days. I would not like to see SimpleHttpServerConnection tightly coupled with DefaultHttpParams, though. In my opinion the SimpleHttpServerConnection should define its own DEFAULT_CONTENT_CHAR static variable. HttpConstants should be let quietly go away in the next release. Oleg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DO NOT REPLY [Bug 31378] - Move multipart request to a new RequestEntity type
Works for me. Mike [EMAIL PROTECTED] wrote: 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=31378. 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=31378 Move multipart request to a new RequestEntity type --- Additional Comments From [EMAIL PROTECTED] 2004-09-23 12:44 --- Is the default content charset statically available anywhere else? It's defined in the DefaultHttpParams these days. I would not like to see SimpleHttpServerConnection tightly coupled with DefaultHttpParams, though. In my opinion the SimpleHttpServerConnection should define its own DEFAULT_CONTENT_CHAR static variable. HttpConstants should be let quietly go away in the next release. Oleg - 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]