FELIX-4307: only log something when a real context ID is given.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1540480 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java
index 34b5fb2..12445be 100644
--- a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java
+++ b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java
@@ -96,7 +96,6 @@
// no context yet, put the mapping on hold
if (holder == null)
{
-
// care for default context if no context ID
if (ExtenderManager.isEmpty(contextId))
{
@@ -111,13 +110,22 @@
orphaned = new HashSet<AbstractMapping>();
this.orphanMappings.put(contextId, orphaned);
}
- SystemLogger.debug("Holding off mapping with unregistered context with id [" + contextId + "]");
+ if (contextId != null)
+ {
+ // Only log something when an actual context ID is used. Should solve FELIX-4307...
+ SystemLogger.debug("Holding off mapping with unregistered context with id [" + contextId + "]");
+ }
orphaned.add(mapping);
return null;
}
// otherwise use the context
- SystemLogger.debug("Reusing context with id [" + contextId + "]");
+ if (contextId != null)
+ {
+ // Only log something when an actual context ID is used. Should solve FELIX-4307...
+ SystemLogger.debug("Reusing context with id [" + contextId + "]");
+ }
+
holder.addMapping(mapping);
return holder.getContext();
}