You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by cr...@apache.org on 2002/12/27 20:18:04 UTC
cvs commit: jakarta-commons-sandbox/resources/src/test/org/apache/commons/resources/tests FileResourcesTest.java
craigmcc 2002/12/27 11:18:04
Modified: resources build.xml
resources/src/java/org/apache/commons/resources
XMLConfigurationReader.java
resources/src/test/org/apache/commons/resources/tests
FileResourcesTest.java
Log:
Eliminate inclusion of an XML parser in the webapp (the container will have
one already).
The Crimson parser doesn't like Attributes.getValue(prefix,localName), so
switch to Attributes.getValue(qname) instead. This was causing all sorts
of grief in XMLConfigurationReader under JDK 1.4.
Revision Changes Path
1.13 +5 -1 jakarta-commons-sandbox/resources/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/resources/build.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- build.xml 27 Dec 2002 18:30:23 -0000 1.12
+++ build.xml 27 Dec 2002 19:18:03 -0000 1.13
@@ -164,7 +164,9 @@
<pathelement location="${build.home}/tests"/>
<pathelement location="${commons-collections.jar}"/>
<pathelement location="${junit.jar}"/>
+<!--
<pathelement location="${jaxp.parser.jar}"/>
+-->
<pathelement location="${build.home}/classes"/>
<pathelement location="${commons-collections.jar}"/>
<pathelement location="${commons-digester.jar}"/>
@@ -257,8 +259,10 @@
<copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${httpclient.jar}" />
<copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${cactus.jar}" />
<copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${junit.jar}" />
+<!--
<copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${jaxp.parser.jar}" />
<copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${jaxp.home}/jaxp.jar" />
+-->
<copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${commons-collections.jar}" />
<copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${commons-digester.jar}" />
<copy todir="${build.home}/webapps/test-webapp-resource/WEB-INF/lib" file="${commons-beanutils.jar}" />
1.6 +7 -7 jakarta-commons-sandbox/resources/src/java/org/apache/commons/resources/XMLConfigurationReader.java
Index: XMLConfigurationReader.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/resources/src/java/org/apache/commons/resources/XMLConfigurationReader.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XMLConfigurationReader.java 27 Dec 2002 00:27:51 -0000 1.5
+++ XMLConfigurationReader.java 27 Dec 2002 19:18:04 -0000 1.6
@@ -150,9 +150,9 @@
Attributes attributes) throws ResourcesException {
//create instance of resource from factory instance
- String factoryClass = attributes.getValue("", "factory");
- String config = attributes.getValue("", "config");
- String name = attributes.getValue("", "name");
+ String factoryClass = attributes.getValue("factory");
+ String config = attributes.getValue("config");
+ String name = attributes.getValue("name");
Resources resource = null;
try {
ResourcesFactory factory;
1.4 +2 -0 jakarta-commons-sandbox/resources/src/test/org/apache/commons/resources/tests/FileResourcesTest.java
Index: FileResourcesTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/resources/src/test/org/apache/commons/resources/tests/FileResourcesTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FileResourcesTest.java 25 Oct 2001 19:33:22 -0000 1.3
+++ FileResourcesTest.java 27 Dec 2002 19:18:04 -0000 1.4
@@ -68,6 +68,8 @@
fileResource = null;
inputStream = this.getClass().getResourceAsStream(RESOURCE_TEST_FILE);
+ assertNotNull(inputStream);
+
manager = new ResourcesManager(inputStream);
Resources resource = manager.getResources(RESOURCE_TEST_NAME);
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>