Author: jdonnerstag
Date: Thu Jul 21 20:08:28 2011
New Revision: 1149339

URL: http://svn.apache.org/viewvc?rev=1149339&view=rev
Log:
fixed: in development mode Wicket stops picking up markup changes
Issue: WICKET-3891

Modified:
    
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/MarkupCache.java

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/MarkupCache.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/MarkupCache.java?rev=1149339&r1=1149338&r2=1149339&view=diff
==============================================================================
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/MarkupCache.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/MarkupCache.java
 Thu Jul 21 20:08:28 2011
@@ -194,23 +194,29 @@ public class MarkupCache implements IMar
                        {
                                Markup markup = iter.next();
 
-                               // Check if the markup associated with key has 
a base markup. And if yes, test
-                               // if that is cached. If the base markup has 
been removed, than remove the derived
-                               // markup as well.
-
-                               MarkupResourceStream resourceStream = 
markup.getMarkupResourceStream()
-                                       .getBaseMarkupResourceStream();
-
-                               // Is the base markup available in the cache?
-                               if ((resourceStream != null) && 
!isMarkupCached(resourceStream))
+                               if ((markup != null) && (markup != 
Markup.NO_MARKUP))
                                {
-                                       iter.remove();
-                                       count++;
+                                       // Check if the markup associated with 
key has a base markup. And if yes, test
+                                       // if that is cached. If the base 
markup has been removed, than remove the
+                                       // derived markup as well.
+
+                                       MarkupResourceStream resourceStream = 
markup.getMarkupResourceStream();
+                                       if (resourceStream != null)
+                                       {
+                                               resourceStream = 
resourceStream.getBaseMarkupResourceStream();
+                                       }
 
-                                       if (log.isDebugEnabled())
+                                       // Is the base markup available in the 
cache?
+                                       if ((resourceStream != null) && 
!isMarkupCached(resourceStream))
                                        {
-                                               log.debug("Removed derived 
markup from cache: " +
-                                                       
markup.getMarkupResourceStream());
+                                               iter.remove();
+                                               count++;
+
+                                               if (log.isDebugEnabled())
+                                               {
+                                                       log.debug("Removed 
derived markup from cache: " +
+                                                               
markup.getMarkupResourceStream());
+                                               }
                                        }
                                }
                        }


Reply via email to