incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r782574 - in /incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl: FactoryCache.java ProcessorWrapper.java
Date Mon, 08 Jun 2009 09:54:44 GMT
Author: cziegeler
Date: Mon Jun  8 09:54:44 2009
New Revision: 782574

URL: http://svn.apache.org/viewvc?rev=782574&view=rev
Log:
Remove unused instance list.

Modified:
    incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/FactoryCache.java
    incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ProcessorWrapper.java

Modified: incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/FactoryCache.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/FactoryCache.java?rev=782574&r1=782573&r2=782574&view=diff
==============================================================================
--- incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/FactoryCache.java
(original)
+++ incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/FactoryCache.java
Mon Jun  8 09:54:44 2009
@@ -19,7 +19,6 @@
 import java.util.Arrays;
 import java.util.Comparator;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import org.apache.sling.rewriter.Generator;
@@ -34,7 +33,6 @@
 import org.osgi.framework.Constants;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
-import org.osgi.service.component.ComponentInstance;
 import org.osgi.util.tracker.ServiceTracker;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -139,7 +137,7 @@
      * @param type The processor type.
      * @return The processor or null if the processor is not available.
      */
-    public Processor getProcessor(final String type, final List<ComponentInstance>
instanceList) {
+    public Processor getProcessor(final String type) {
         final ProcessorFactory factory = this.processorTracker.getFactory(type);
         if ( factory == null ) {
             LOGGER.debug("Requested processor factory for type '{}' not found.", type);

Modified: incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ProcessorWrapper.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ProcessorWrapper.java?rev=782574&r1=782573&r2=782574&view=diff
==============================================================================
--- incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ProcessorWrapper.java
(original)
+++ incubator/sling/whiteboard/rewriter/src/main/java/org/apache/sling/rewriter/impl/ProcessorWrapper.java
Mon Jun  8 09:54:44 2009
@@ -18,14 +18,10 @@
 
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
 
 import org.apache.sling.rewriter.ProcessingContext;
 import org.apache.sling.rewriter.Processor;
 import org.apache.sling.rewriter.ProcessorConfiguration;
-import org.osgi.service.component.ComponentInstance;
 import org.xml.sax.ContentHandler;
 
 /**
@@ -35,12 +31,10 @@
 
     private final Processor delegatee;
 
-    private final List<ComponentInstance> instances = new ArrayList<ComponentInstance>(1);
-
     public ProcessorWrapper(final ProcessorConfiguration config,
                             final FactoryCache factoryCache)
     throws IOException {
-        this.delegatee = factoryCache.getProcessor(config.getType(), this.instances);
+        this.delegatee = factoryCache.getProcessor(config.getType());
         if ( this.delegatee == null ) {
             throw new IOException("Unable to get processor component for type " + config.getType());
         }
@@ -50,14 +44,7 @@
      * @see org.apache.sling.rewriter.Processor#finished()
      */
     public void finished() throws IOException {
-        try {
-            delegatee.finished();
-        } finally {
-            final Iterator<ComponentInstance> instanceIter = this.instances.iterator();
-            while ( instanceIter.hasNext() ) {
-                instanceIter.next().dispose();
-            }
-        }
+        delegatee.finished();
     }
 
     /**



Mime
View raw message