Update of /var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow
In directory james.mmbase.org:/tmp/cvs-serv15024

Modified Files:
        Url.java UrlParameters.java 
Log Message:
fixed another failing case in /mmbase/test/test/urls


See also: 
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow


Index: Url.java
===================================================================
RCS file: 
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow/Url.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- Url.java    11 Apr 2008 11:42:47 -0000      1.40
+++ Url.java    11 Apr 2008 12:09:16 -0000      1.41
@@ -35,7 +35,7 @@
  * <p>
  * The creation of the URL is delegated to the MMBase framework.
  * </p>
- * @version $Id: Url.java,v 1.40 2008/04/11 11:42:47 michiel Exp $;
+ * @version $Id: Url.java,v 1.41 2008/04/11 12:09:16 michiel Exp $;
  * @since MMBase-1.9
  */
 public class Url implements Comparable, CharSequence, Casting.Unwrappable {
@@ -121,6 +121,9 @@
     public String getLegacy(boolean writeamp) throws JspTagException {
         Map<String, Object> m = new HashMap<String, Object>();
         m.putAll(params);
+        if (log.isDebugEnabled()) {
+            log.debug("legacy url " + page + m);
+        }
         String res = BasicUrlConverter.getUrl(page, m, 
(HttpServletRequest)tag.getPageContext().getRequest(), writeamp).toString();
         pageLog.service("getting legacy: " + page + " -> " + res);
         return res;
@@ -136,7 +139,10 @@
         }
 
         String result = writeamp ? cacheAmp : cacheNoAmp;
-        if (result != null) return result;
+        if (result != null) {
+            log.debug("found cached " + result);
+            return result;
+        }
 
         Framework framework = Framework.getInstance();
 
@@ -258,6 +264,10 @@
     }
 
     protected void invalidate() {
+        log.debug("invalidating");
+        if (params instanceof UrlParameters) {
+            ((UrlParameters) params).invalidate();
+        }
         string = cacheAmp = cacheNoAmp = null;
     }
 


Index: UrlParameters.java
===================================================================
RCS file: 
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/pageflow/UrlParameters.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- UrlParameters.java  23 Feb 2008 16:00:44 -0000      1.4
+++ UrlParameters.java  11 Apr 2008 12:09:16 -0000      1.5
@@ -44,7 +44,6 @@
                 if (log.isDebugEnabled()) {
                     log.debug("url parameters " + wrapped + " " + refs + "/" + 
tag.extraParameters);
                 }
-                tag = null; // no need any more. dereference.
             } catch (JspTagException je) {
                 throw new RuntimeException(je);
             }
@@ -61,5 +60,9 @@
         return wrapped.entrySet();
     }
 
+    protected void invalidate() {
+        wrapped = null;
+    }
+
 
 }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to