incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1439814 - /sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java
Date Tue, 29 Jan 2013 10:20:23 GMT
Author: bdelacretaz
Date: Tue Jan 29 10:20:23 2013
New Revision: 1439814

URL: http://svn.apache.org/viewvc?rev=1439814&view=rev
Log:
SLING-2717 - avoid blank record request patterns, which disable request recording

Modified:
    sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java

Modified: sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java?rev=1439814&r1=1439813&r2=1439814&view=diff
==============================================================================
--- sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java
(original)
+++ sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java
Tue Jan 29 10:20:23 2013
@@ -416,7 +416,9 @@ public class SlingMainServlet extends Ge
             String[] patterns = OsgiUtil.toStringArray(componentConfig.get(PROP_TRACK_PATTERNS_REQUESTS),
new String[0]);
             List<Pattern> compiledPatterns = new ArrayList<Pattern>(patterns.length);
             for (String pattern : patterns) {
-                compiledPatterns.add(Pattern.compile(pattern));
+                if(pattern != null && pattern.trim().length() > 0) {
+                    compiledPatterns.add(Pattern.compile(pattern));
+                }
             }
             RequestHistoryConsolePlugin.initPlugin(bundleContext, maxRequests, compiledPatterns);
         } catch (Throwable t) {



Mime
View raw message