webwork/src/main/webwork/view/velocity URLBean.java,1.5,1.6

[email protected] Sun, 09 Nov 2003 15:36:23 -0800
Newsgroups gmane.comp.java.open-symphony.cvs
Message-ID <[email protected]>
Update of /cvsroot/opensymphony/webwork/src/main/webwork/view/velocity
In directory sc8-pr-cvs1:/tmp/cvs-serv22425/src/main/webwork/view/velocity

Modified Files:
	URLBean.java 
Log Message:
handle unmodifiable maps for params

Index: URLBean.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/view/velocity/URLBean.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- URLBean.java	9 Nov 2003 20:46:43 -0000	1.5
+++ URLBean.java	9 Nov 2003 23:36:21 -0000	1.6
@@ -177,7 +177,17 @@
 
       // Reset params and page
       if(params.size()>0)
-        this.params.clear();
+      {
+        //if it's non-modifiable, just assign a new map.
+        try
+        {
+          this.params.clear();
+        }
+        catch(UnsupportedOperationException ex)
+        {
+          params = new HashMap();
+        }
+      }
       this.page=null;
 			link.delete(0, link.length());
 




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/