You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by st...@apache.org on 2014/06/12 09:57:24 UTC
svn commit: r1602086 -
/sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java
Author: stefanegli
Date: Thu Jun 12 07:57:23 2014
New Revision: 1602086
URL: http://svn.apache.org/r1602086
Log:
SLING-3647 : fixed Classloader used by ServiceRegistry.lookupProviders (as it otherwise uses the thread's context classloader - with which it will never find any providers and always report false
Modified:
sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java
Modified: sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java?rev=1602086&r1=1602085&r2=1602086&view=diff
==============================================================================
--- sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java (original)
+++ sling/trunk/tooling/ide/impl-vlt/src/org/apache/sling/ide/jcr/RepositoryUtils.java Thu Jun 12 07:57:23 2014
@@ -50,8 +50,9 @@ public abstract class RepositoryUtils {
* @return
*/
public static boolean isRepositoryProviderReady() {
- Iterator<RepositoryFactory> providerIt = ServiceRegistry.lookupProviders(RepositoryFactory.class);
- return providerIt.hasNext();
+ final Iterator<RepositoryFactory> providerIt = ServiceRegistry.lookupProviders(RepositoryFactory.class, RepositoryFactory.class.getClassLoader());
+ final boolean isReady = providerIt.hasNext();
+ return isReady;
}
public static Repository getRepository(RepositoryInfo repositoryInfo) throws RepositoryException {