jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r390660 - /jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/TestRepository.java
Date Sat, 01 Apr 2006 12:40:37 GMT
Author: jukka
Date: Sat Apr  1 04:40:35 2006
New Revision: 390660

URL: http://svn.apache.org/viewcvs?rev=390660&view=rev
Log:
JCR-368: Fixed a problem with the TestRepository only working when the test-repository.xml
configuration file was located in the classpath root.

Modified:
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/TestRepository.java

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/TestRepository.java
URL: http://svn.apache.org/viewcvs/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/TestRepository.java?rev=390660&r1=390659&r2=390660&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/TestRepository.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/TestRepository.java
Sat Apr  1 04:40:35 2006
@@ -23,6 +23,7 @@
 
 import org.apache.jackrabbit.core.config.ConfigurationException;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
+import org.xml.sax.InputSource;
 
 /**
  * Utility class for easy handling a test repository. This class contains
@@ -71,8 +72,8 @@
     public static synchronized Repository getInstance() throws RepositoryException {
         try {
             if (instance == null) {
-                ClassLoader loader = TestRepository.class.getClassLoader();
-                InputStream xml = loader.getResourceAsStream(CONF_RESOURCE);
+                InputStream xml =
+                    TestRepository.class.getResourceAsStream(CONF_RESOURCE);
                 String home = System.getProperty(HOME_PROPERTY, HOME_DEFAULT);
                 RepositoryConfig config = RepositoryConfig.create(xml, home);
                 instance = new TransientRepository(config);



Mime
View raw message