felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1656075 - in /felix/trunk/http/base/src: main/java/org/apache/felix/http/base/internal/handler/ main/java/org/apache/felix/http/base/internal/service/ main/java/org/apache/felix/http/base/internal/whiteboard/ main/java/org/apache/felix/htt...
Date Fri, 30 Jan 2015 17:59:58 GMT
Author: cziegeler
Date: Fri Jan 30 17:59:58 2015
New Revision: 1656075

URL: http://svn.apache.org/r1656075
Log:
FELIX-4545 : Implement Servlet Context Helper. Integrate resource handling

Removed:
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/AbstractMapping.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ResourceMapping.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/AbstractTracker.java
Modified:
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/FilterHandler.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HandlerMapping.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HandlerRegistry.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ExtenderManager.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ServletContextHelperManager.java
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/ResourceTracker.java
    felix/trunk/http/base/src/test/java/org/apache/felix/http/base/internal/handler/FilterHandlerTest.java

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/FilterHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/FilterHandler.java?rev=1656075&r1=1656074&r2=1656075&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/FilterHandler.java
(original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/FilterHandler.java
Fri Jan 30 17:59:58 2015
@@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletReq
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.felix.http.base.internal.context.ExtServletContext;
+import org.apache.felix.http.base.internal.runtime.ContextInfo;
 import org.apache.felix.http.base.internal.runtime.FilterInfo;
 import org.apache.felix.http.base.internal.util.PatternUtil;
 
@@ -40,7 +41,9 @@ public final class FilterHandler extends
     private final FilterInfo filterInfo;
     private final Pattern[] patterns;
 
-    public FilterHandler(ExtServletContext context, Filter filter, FilterInfo filterInfo)
+    private final long contextServiceId;
+
+    public FilterHandler(final ContextInfo contextInfo, ExtServletContext context, Filter
filter, FilterInfo filterInfo)
     {
         super(context, filterInfo.getInitParams(), filterInfo.getName());
         this.filter = filter;
@@ -53,6 +56,14 @@ public final class FilterHandler extends
         {
             this.patterns[i] = Pattern.compile(patterns[i]);
         }
+        if ( contextInfo != null )
+        {
+            this.contextServiceId = contextInfo.getServiceId();
+        }
+        else
+        {
+            this.contextServiceId = -1;
+        }
     }
 
     @Override
@@ -137,4 +148,9 @@ public final class FilterHandler extends
     public Pattern[] getPatterns() {
         return this.patterns;
     }
+
+    public long getContextServiceId()
+    {
+        return this.contextServiceId;
+    }
 }

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HandlerMapping.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HandlerMapping.java?rev=1656075&r1=1656074&r2=1656075&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HandlerMapping.java
(original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HandlerMapping.java
Fri Jan 30 17:59:58 2015
@@ -35,7 +35,7 @@ import java.util.regex.Pattern;
  * Represents a Map-like structure that can map path-patterns to servlet/filter handlers,
allowing
  * for easy access to those handlers, based on the match rules defined in section 12.1 of
Servlet
  * 3.0 specification.
- * 
+ *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 public class HandlerMapping<V extends AbstractHandler>
@@ -48,12 +48,13 @@ public class HandlerMapping<V extends Ab
      * <li>lastly all wildcard extension matches.</li>
      * </ol>
      * <p>
-     * Equal matches will first be sorted on length in descending order (longest patterns
first), 
+     * Equal matches will first be sorted on length in descending order (longest patterns
first),
      * and in case of equal lengths, they are sorted in natural (ascending) order.
      * </p>
      */
     static class PatternComparator implements Comparator<Pattern>
     {
+        @Override
         public int compare(Pattern p1, Pattern p2)
         {
             String ps1 = p1.pattern();
@@ -135,7 +136,7 @@ public class HandlerMapping<V extends Ab
 
     /**
      * Creates a new {@link HandlerMapping} instance for the given elements.
-     * 
+     *
      * @param elements the elements to map, cannot be <code>null</code>.
      */
     public HandlerMapping(Collection<V> elements)
@@ -180,7 +181,7 @@ public class HandlerMapping<V extends Ab
 
     /**
      * Returns all mapped elements.
-     * 
+     *
      * @return a collection of mapped elements, never <code>null</code>.
      */
     public Collection<V> getAllElements()
@@ -190,7 +191,7 @@ public class HandlerMapping<V extends Ab
 
     /**
      * Returns all matching handlers for the given path.
-     * 
+     *
      * @param path the path that should match, cannot be <code>null</code>.
      * @return a {@link Collection} of all matching handlers, never <code>null</code>.
      */
@@ -208,7 +209,7 @@ public class HandlerMapping<V extends Ab
      * <li>if the last segment in the URL path contains an extension (e.g. .jsp), the
servlet container will try to match a servlet that
      *     handles requests for the extension. An extension is defined as the part of the
last segment after the last '.' character.</li>
      * </ul>
-     * 
+     *
      * @param path the path that should match, cannot be <code>null</code>.
      * @return the best matching handler for the given path, or <code>null</code>
in case no handler matched.
      */
@@ -243,7 +244,7 @@ public class HandlerMapping<V extends Ab
 
     /**
      * Provides information on whether there are elements mapped or not.
-     * 
+     *
      * @return <code>true</code> if there is at least one element mapped, <code>false</code>
otherwise.
      */
     public boolean hasElements()
@@ -253,10 +254,10 @@ public class HandlerMapping<V extends Ab
 
     /**
      * Performs the actual matching, yielding a list of either the first or all matching
patterns.
-     * 
-     * @param path the path to match, can be <code>null</code> in which case
an empty string is 
+     *
+     * @param path the path to match, can be <code>null</code> in which case
an empty string is
      *        used;
-     * @param firstOnly <code>true</code> if only the first matching pattern
should be returned, 
+     * @param firstOnly <code>true</code> if only the first matching pattern
should be returned,
      *        <code>false</code> if all matching patterns should be returned.
      * @return a list with matching elements, never <code>null</code>.
      */
@@ -309,7 +310,7 @@ public class HandlerMapping<V extends Ab
                 }
             }
         }
-        
+
         // Make sure the results are properly sorted...
         Collections.sort(result);
 

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HandlerRegistry.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HandlerRegistry.java?rev=1656075&r1=1656074&r2=1656075&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HandlerRegistry.java
(original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HandlerRegistry.java
Fri Jan 30 17:59:58 2015
@@ -122,6 +122,16 @@ public final class HandlerRegistry
             }
         }
 
+        // TODO - we should already check for the context when building up the result set
+        final Iterator<FilterHandler> i = result.iterator();
+        while ( i.hasNext() )
+        {
+            final FilterHandler handler = i.next();
+            if ( handler.getContextServiceId() != servletHandler.getContextServiceId() )
+            {
+                i.remove();
+            }
+        }
         return result.toArray(new FilterHandler[result.size()]);
     }
 

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java?rev=1656075&r1=1656074&r2=1656075&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java
(original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java
Fri Jan 30 17:59:58 2015
@@ -116,7 +116,7 @@ public final class HttpServiceImpl imple
             // TODO create failure DTO if null
         }
 
-        FilterHandler handler = new FilterHandler(httpContext, filter, filterInfo);
+        FilterHandler handler = new FilterHandler(contextInfo, httpContext, filter, filterInfo);
         try {
             this.handlerRegistry.addFilter(handler);
         } catch (ServletException e) {

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ExtenderManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ExtenderManager.java?rev=1656075&r1=1656074&r2=1656075&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ExtenderManager.java
(original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ExtenderManager.java
Fri Jan 30 17:59:58 2015
@@ -17,42 +17,30 @@
 package org.apache.felix.http.base.internal.whiteboard;
 
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
 
-import org.apache.felix.http.base.internal.logger.SystemLogger;
 import org.apache.felix.http.base.internal.service.HttpServiceImpl;
 import org.apache.felix.http.base.internal.whiteboard.tracker.FilterTracker;
+import org.apache.felix.http.base.internal.whiteboard.tracker.ResourceTracker;
 import org.apache.felix.http.base.internal.whiteboard.tracker.ServletContextHelperTracker;
 import org.apache.felix.http.base.internal.whiteboard.tracker.ServletTracker;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.http.HttpService;
-import org.osgi.service.http.runtime.dto.ResourceDTO;
-import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
 import org.osgi.util.tracker.ServiceTracker;
 
+/**
+ * TODO - move code to ServletContextHelperManager
+ */
 public final class ExtenderManager
 {
-    static final String TYPE_RESOURCE = "r";
-
-    private final Map<String, AbstractMapping> mapping;
-
     private final ServletContextHelperManager contextManager;
 
-    private final HttpService httpService;
-
     private final ArrayList<ServiceTracker<?, ?>> trackers = new ArrayList<ServiceTracker<?,
?>>();
 
     public ExtenderManager(final HttpServiceImpl httpService, final BundleContext bundleContext)
     {
-        this.mapping = new HashMap<String, AbstractMapping>();
         this.contextManager = new ServletContextHelperManager(bundleContext, httpService);
-        this.httpService = httpService;
         addTracker(new FilterTracker(bundleContext, contextManager));
         addTracker(new ServletTracker(bundleContext, this.contextManager));
+        addTracker(new ResourceTracker(bundleContext, this.contextManager));
         addTracker(new ServletContextHelperTracker(bundleContext, this.contextManager));
     }
 
@@ -63,7 +51,6 @@ public final class ExtenderManager
             t.close();
         }
         this.trackers.clear();
-        this.unregisterAll();
         this.contextManager.close();
     }
 
@@ -72,139 +59,4 @@ public final class ExtenderManager
         this.trackers.add(tracker);
         tracker.open();
     }
-
-    static boolean isEmpty(final String value)
-    {
-        return value == null || value.length() == 0;
-    }
-
-    static boolean isEmpty(final String[] value)
-    {
-        return value == null || value.length == 0;
-    }
-
-    private String getStringProperty(ServiceReference ref, String key)
-    {
-        Object value = ref.getProperty(key);
-        return (value instanceof String) ? (String) value : null;
-    }
-
-    private String[] getStringArrayProperty(ServiceReference ref, String key)
-    {
-        Object value = ref.getProperty(key);
-
-        if (value instanceof String)
-        {
-            return new String[] { (String) value };
-        }
-        else if (value instanceof String[])
-        {
-            return (String[]) value;
-        }
-        else if (value instanceof Collection<?>)
-        {
-            Collection<?> collectionValues = (Collection<?>) value;
-            String[] values = new String[collectionValues.size()];
-
-            int i = 0;
-            for (Object current : collectionValues)
-            {
-                values[i++] = current != null ? String.valueOf(current) : null;
-            }
-
-            return values;
-        }
-
-        return null;
-    }
-
-    public void addResource(final ServiceReference ref)
-    {
-        final String[] pattern = getStringArrayProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN);
-        final String prefix = getStringProperty(ref, HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PREFIX);
-
-        if (!isEmpty(pattern))
-        {
-            if ( !isEmpty(prefix))
-            {
-                for(final String p : pattern)
-                {
-                    // TODO : check if p is empty - and then log?
-                    final ResourceDTO resourceDTO = new ResourceDTO();
-                    resourceDTO.patterns = new String[] {p};
-                    resourceDTO.prefix = prefix;
-                    final ResourceMapping mapping = new ResourceMapping(ref.getBundle(),
resourceDTO);
-                    this.addMapping(TYPE_RESOURCE, ref, mapping);
-                }
-            }
-            else
-            {
-                SystemLogger.debug("Ignoring Resource Service " + ref + ", " + HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PREFIX
+ " is missing or empty");
-            }
-        }
-        else
-        {
-            SystemLogger.debug("Ignoring Resource Service " + ref + ", " + HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN
+ " is missing or empty");
-        }
-    }
-
-    public void removeResource(final ServiceReference ref)
-    {
-        this.removeMapping(TYPE_RESOURCE, ref);
-    }
-
-    private synchronized void unregisterAll()
-    {
-        AbstractMapping[] mappings = null;
-        HttpService service;
-        synchronized (this)
-        {
-            service = this.httpService;
-            if (service != null)
-            {
-                Collection<AbstractMapping> values = this.mapping.values();
-                mappings = values.toArray(new AbstractMapping[values.size()]);
-            }
-        }
-        if (mappings != null)
-        {
-            for (AbstractMapping mapping : mappings)
-            {
-                mapping.unregister(service);
-            }
-        }
-    }
-
-    private synchronized void addMapping(final String servType, ServiceReference ref, AbstractMapping
mapping)
-    {
-        this.mapping.put(ref.getProperty(Constants.SERVICE_ID).toString().concat(servType),
mapping);
-        this.registerMapping(mapping);
-    }
-
-    private synchronized void removeMapping(final String servType, ServiceReference ref)
-    {
-        AbstractMapping mapping = this.mapping.remove(ref.getProperty(Constants.SERVICE_ID).toString().concat(servType));
-        if (mapping != null)
-        {
-            unregisterMapping(mapping);
-        }
-    }
-
-    private void registerMapping(AbstractMapping mapping)
-    {
-        HttpService httpService = this.httpService;
-        if (httpService != null)
-        {
-            mapping.register(httpService);
-        }
-    }
-
-    private void unregisterMapping(AbstractMapping mapping)
-    {
-        HttpService httpService = this.httpService;
-        if (httpService != null)
-        {
-            mapping.unregister(httpService);
-        }
-    }
  }

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ServletContextHelperManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ServletContextHelperManager.java?rev=1656075&r1=1656074&r2=1656075&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ServletContextHelperManager.java
(original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/ServletContextHelperManager.java
Fri Jan 30 17:59:58 2015
@@ -28,12 +28,14 @@ import java.util.Map;
 import org.apache.felix.http.base.internal.runtime.AbstractInfo;
 import org.apache.felix.http.base.internal.runtime.ContextInfo;
 import org.apache.felix.http.base.internal.runtime.FilterInfo;
+import org.apache.felix.http.base.internal.runtime.ResourceInfo;
 import org.apache.felix.http.base.internal.runtime.ServletInfo;
 import org.apache.felix.http.base.internal.service.HttpServiceImpl;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceFactory;
 import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.http.NamespaceException;
 import org.osgi.service.http.context.ServletContextHelper;
 import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
 
@@ -105,6 +107,10 @@ public final class ServletContextHelperM
                 {
                     this.registerFilter((FilterInfo)entry.getKey(), holder);
                 }
+                else if ( entry.getKey() instanceof ResourceInfo )
+                {
+                    this.registerResource((ResourceInfo)entry.getKey(), holder);
+                }
             }
         }
     }
@@ -125,6 +131,10 @@ public final class ServletContextHelperM
                 {
                     this.unregisterFilter((FilterInfo)entry.getKey(), holder);
                 }
+                else if ( entry.getKey() instanceof ResourceInfo )
+                {
+                    this.unregisterResource((ResourceInfo)entry.getKey(), holder);
+                }
                 if ( entry.getValue().isEmpty() ) {
                     i.remove();
                 }
@@ -237,6 +247,29 @@ public final class ServletContextHelperM
         this.httpService.unregisterFilter(holder.getInfo(), filterInfo);
     }
 
+    private void registerResource(final ResourceInfo resourceInfo, final ContextHolder holder)
+    {
+        final ServletContextHelper helper = holder.getContext(resourceInfo.getServiceReference().getBundle());
+        // TODO - use servlet context helper and move registration to http service
+        for(final String alias : resourceInfo.getPatterns())
+        {
+            try {
+                this.httpService.registerResources(alias, resourceInfo.getPrefix(), null);
+            } catch (NamespaceException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+        }
+    }
+
+    private void unregisterResource(final ResourceInfo resourceInfo, final ContextHolder
holder)
+    {
+        for(final String alias : resourceInfo.getPatterns())
+        {
+            this.httpService.unregister(alias);
+        }
+    }
+
     /**
      * Add a new servlet.
      * @param servletInfo The servlet info
@@ -327,5 +360,31 @@ public final class ServletContextHelperM
                 }
             }
         }
+    }
+
+    public void addResource(final ResourceInfo info) {
+        synchronized ( this.contextMap )
+        {
+            final List<ContextHolder> holderList = this.getMatchingContexts(info);
+            this.servicesMap.put(info, holderList);
+            for(final ContextHolder h : holderList)
+            {
+                this.registerResource(info, h);
+            }
+        }
+    }
+
+    public void removeResource(final ResourceInfo info) {
+        synchronized ( this.contextMap )
+        {
+            final List<ContextHolder> holderList = this.servicesMap.remove(info);
+            if ( holderList != null )
+            {
+                for(final ContextHolder h : holderList)
+                {
+                    this.unregisterResource(info, h);
+                }
+            }
+        }
     }
 }

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/ResourceTracker.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/ResourceTracker.java?rev=1656075&r1=1656074&r2=1656075&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/ResourceTracker.java
(original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/tracker/ResourceTracker.java
Fri Jan 30 17:59:58 2015
@@ -16,16 +16,18 @@
  */
 package org.apache.felix.http.base.internal.whiteboard.tracker;
 
-import org.apache.felix.http.base.internal.whiteboard.ExtenderManager;
+import org.apache.felix.http.base.internal.logger.SystemLogger;
+import org.apache.felix.http.base.internal.runtime.ResourceInfo;
+import org.apache.felix.http.base.internal.whiteboard.ServletContextHelperManager;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Filter;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
 
-public final class ResourceTracker extends AbstractTracker<Object>
+public final class ResourceTracker extends AbstractReferenceTracker<Object>
 {
-    private final ExtenderManager manager;
+    private final ServletContextHelperManager contextManager;
 
     private static Filter createFilter(final BundleContext btx)
     {
@@ -42,28 +44,34 @@ public final class ResourceTracker exten
         return null; // we never get here - and if we get an NPE which is fine
     }
 
-    public ResourceTracker(final BundleContext context, final ExtenderManager manager)
+    public ResourceTracker(final BundleContext context, final ServletContextHelperManager
manager)
     {
         super(context, createFilter(context));
-        this.manager = manager;
+        this.contextManager = manager;
     }
 
     @Override
-    protected void added(final Object service, final ServiceReference ref)
+    protected void added(final ServiceReference<Object> ref)
     {
-        this.manager.addResource(ref);
-    }
+        final ResourceInfo info = new ResourceInfo(ref);
 
-    @Override
-    protected void modified(final Object service, final ServiceReference ref)
-    {
-        removed(service, ref);
-        added(service, ref);
+        if ( info.isValid() )
+        {
+            this.contextManager.addResource(info);
+        }
+        else
+        {
+            SystemLogger.debug("Ignoring Resource service " + ref);
+        }
     }
 
     @Override
-    protected void removed(final Object service, final ServiceReference ref)
+    protected void removed(final ServiceReference<Object> ref)
     {
-        this.manager.removeResource(ref);
-    }
-}
+        final ResourceInfo info = new ResourceInfo(ref);
+
+        if ( info.isValid() )
+        {
+            this.contextManager.removeResource(info);
+        }
+    }}

Modified: felix/trunk/http/base/src/test/java/org/apache/felix/http/base/internal/handler/FilterHandlerTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/test/java/org/apache/felix/http/base/internal/handler/FilterHandlerTest.java?rev=1656075&r1=1656074&r2=1656075&view=diff
==============================================================================
--- felix/trunk/http/base/src/test/java/org/apache/felix/http/base/internal/handler/FilterHandlerTest.java
(original)
+++ felix/trunk/http/base/src/test/java/org/apache/felix/http/base/internal/handler/FilterHandlerTest.java
Fri Jan 30 17:59:58 2015
@@ -243,7 +243,7 @@ public class FilterHandlerTest extends A
     private FilterHandler createHandler(String pattern, int ranking, final Map<String,
String> initParams)
     {
         final FilterInfo info = new FilterInfo(null, pattern, ranking, initParams, this.filter,
null);
-        return new FilterHandler(this.context, this.filter, info);
+        return new FilterHandler(null, this.context, this.filter, info);
     }
 
     private HttpServletRequest createServletRequest()



Mime
View raw message