Revision: 512
          http://svn.sourceforge.net/stripes/?rev=512&view=rev
Author:   tfenne
Date:     2007-04-01 14:27:32 -0700 (Sun, 01 Apr 2007)

Log Message:
-----------
Merge fix for STS-351: Wrong key used to lookup field name in foo[1].bar[2].baz

Modified Paths:
--------------
    
branches/1.4.x/stripes/src/net/sourceforge/stripes/controller/ParameterName.java

Modified: 
branches/1.4.x/stripes/src/net/sourceforge/stripes/controller/ParameterName.java
===================================================================
--- 
branches/1.4.x/stripes/src/net/sourceforge/stripes/controller/ParameterName.java
    2007-04-01 21:26:12 UTC (rev 511)
+++ 
branches/1.4.x/stripes/src/net/sourceforge/stripes/controller/ParameterName.java
    2007-04-01 21:27:32 UTC (rev 512)
@@ -25,7 +25,7 @@
  */
 public class ParameterName implements Comparable<ParameterName> {
     /** Stores the regular expression that will remove all [] segments. */
-    public static final Pattern pattern = Pattern.compile("\\[.*\\]");
+    public static final Pattern pattern = Pattern.compile("\\[.*?\\]");
 
     /** Stores the name passed in at construction time. */
     private String name;
@@ -109,6 +109,11 @@
                 (this == obj || compareTo((ParameterName) obj) == 0);
     }
 
+    /** Simple hashcode method based on the name of the parameter. */
+    public int hashCode() {
+        return this.name.hashCode();
+    }
+
     /**
      * Uses the original name as the string representation of the class. This 
is probably
      * the most useful thing to see in log messages, which is the only place 
toString will


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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to