Revision: 1024
          http://stripes.svn.sourceforge.net/stripes/?rev=1024&view=rev
Author:   bengunter
Date:     2008-12-23 19:13:07 +0000 (Tue, 23 Dec 2008)

Log Message:
-----------
Applied fix for second part (OnwardResolution) of STS-596 from trunk.

Modified Paths:
--------------
    
branches/1.5.x/stripes/src/net/sourceforge/stripes/action/OnwardResolution.java

Modified: 
branches/1.5.x/stripes/src/net/sourceforge/stripes/action/OnwardResolution.java
===================================================================
--- 
branches/1.5.x/stripes/src/net/sourceforge/stripes/action/OnwardResolution.java 
    2008-12-23 19:11:37 UTC (rev 1023)
+++ 
branches/1.5.x/stripes/src/net/sourceforge/stripes/action/OnwardResolution.java 
    2008-12-23 19:13:07 UTC (rev 1024)
@@ -36,8 +36,11 @@
  * @author Tim Fennell
  */
 public abstract class OnwardResolution<T extends OnwardResolution<T>> 
implements Resolution {
+    /** Initial value for fields to indicate they were not changed when null 
has special meaning */
+    private static final String VALUE_NOT_SET = "VALUE_NOT_SET";
+
     private String path;
-    private String event;
+    private String event = VALUE_NOT_SET;
     private Map<String,Object> parameters = new HashMap<String,Object>();
     private String anchor;
 
@@ -187,8 +190,8 @@
      */
     public String getUrl(Locale locale) {
         UrlBuilder builder = new UrlBuilder(locale, path, false);
-        if (event != null) {
-            builder.setEvent(event);
+        if (event != VALUE_NOT_SET) {
+            builder.setEvent(event == null || event.length() < 1 ? null : 
event);
         }
         if (anchor != null) {
             builder.setAnchor(anchor);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to