jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r209043 - /incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/TextFilterService.java
Date Mon, 04 Jul 2005 09:27:42 GMT
Author: mreutegg
Date: Mon Jul  4 02:27:41 2005
New Revision: 209043

URL: http://svn.apache.org/viewcvs?rev=209043&view=rev
Log:
JCR-158: TextFilterService uses Sun specific classes
- Replaced use of sun.misc.Service with javax.imageio.spi.ServiceRegistry

Modified:
    incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/TextFilterService.java

Modified: incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/TextFilterService.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/TextFilterService.java?rev=209043&r1=209042&r2=209043&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/TextFilterService.java
(original)
+++ incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/query/TextFilterService.java
Mon Jul  4 02:27:41 2005
@@ -20,14 +20,13 @@
 import org.apache.jackrabbit.core.state.PropertyState;
 
 import javax.jcr.RepositoryException;
+import javax.imageio.spi.ServiceRegistry;
 import java.util.Map;
 import java.util.Iterator;
 import java.util.Collections;
 import java.util.List;
 import java.util.ArrayList;
 
-import sun.misc.Service;
-
 /**
  * Implements a service that looks up {@link TextFilter} implementations that
  * are registered in a jar file as providers for
@@ -67,9 +66,13 @@
      * Initializes the {@link #filters} list.
      */
     static {
-        Iterator it = Service.providers(TextFilterService.class);
-        while (it.hasNext()) {
-            filters.add(it.next());
+        try {
+            Iterator it = ServiceRegistry.lookupProviders(TextFilterService.class);
+            while (it.hasNext()) {
+                filters.add(it.next());
+            }
+        } catch (Error e) {
+            log.warn("Unable to load providers for TextFilterService: " + e);
         }
     }
 



Mime
View raw message