Author: siren
Date: Tue May  2 11:22:48 2006
New Revision: 399000

URL: http://svn.apache.org/viewcvs?rev=399000&view=rev
Log:
Prevent parameters from appearing multiple times

Modified:
    
lucene/nutch/trunk/contrib/web2/src/main/java/org/apache/nutch/webapp/common/SearchForm.java

Modified: 
lucene/nutch/trunk/contrib/web2/src/main/java/org/apache/nutch/webapp/common/SearchForm.java
URL: 
http://svn.apache.org/viewcvs/lucene/nutch/trunk/contrib/web2/src/main/java/org/apache/nutch/webapp/common/SearchForm.java?rev=399000&r1=398999&r2=399000&view=diff
==============================================================================
--- 
lucene/nutch/trunk/contrib/web2/src/main/java/org/apache/nutch/webapp/common/SearchForm.java
 (original)
+++ 
lucene/nutch/trunk/contrib/web2/src/main/java/org/apache/nutch/webapp/common/SearchForm.java
 Tue May  2 11:22:48 2006
@@ -152,7 +152,8 @@
     } else {
       n_values.put(key, new KeyValue(key, value));
     }
-    active.add(n_values.get(key));
+    if(!active.contains(n_values.get(key)))
+      active.add(n_values.get(key));
   }
 
   /**
@@ -162,7 +163,7 @@
    * @return
    */
   public String getValue(String key) {
-    if (n_values.containsKey(key)) {
+    if (n_values.containsKey(key) && !active.contains(n_values.get(key))) {
       active.add(n_values.get(key));
       return (String) ((KeyValue) n_values.get(key)).getValue();
     } else




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nutch-cvs mailing list
Nutch-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nutch-cvs

Reply via email to