You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by jm...@apache.org on 2008/02/19 17:28:02 UTC
svn commit: r629146 - in
/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed:
CollectionAdapterConfiguration.java Configuration.java
Author: jmsnell
Date: Tue Feb 19 08:27:59 2008
New Revision: 629146
URL: http://svn.apache.org/viewvc?rev=629146&view=rev
Log:
per https://issues.apache.org/jira/browse/ABDERA-126
load the feed config file using the context class loader
Modified:
incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/CollectionAdapterConfiguration.java
incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/Configuration.java
Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/CollectionAdapterConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/CollectionAdapterConfiguration.java?rev=629146&r1=629145&r2=629146&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/CollectionAdapterConfiguration.java (original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/CollectionAdapterConfiguration.java Tue Feb 19 08:27:59 2008
@@ -17,8 +17,8 @@
*/
package org.apache.abdera.protocol.server.provider.managed;
-import java.io.FileInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
@@ -34,7 +34,7 @@
this.serverConfiguration = serverConfiguration;
}
- public FileInputStream getConfigAsFileInputStream()
+ public InputStream getConfigAsFileInputStream()
throws IOException {
String filePath
= serverConfiguration.getAdapterConfigLocation() + fileLocation;
Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/Configuration.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/Configuration.java?rev=629146&r1=629145&r2=629146&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/Configuration.java (original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/provider/managed/Configuration.java Tue Feb 19 08:27:59 2008
@@ -19,6 +19,7 @@
import java.io.FileInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.util.Properties;
public abstract class Configuration {
@@ -31,10 +32,12 @@
return props;
}
- static FileInputStream loadFileAsInputStream(
+ static InputStream loadFileAsInputStream(
String fileLocation)
throws IOException {
- return new FileInputStream(fileLocation);
+ return Thread.currentThread()
+ .getContextClassLoader()
+ .getResourceAsStream(fileLocation);
}
static String getProperty(