tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r550293 - /tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java
Date Sun, 24 Jun 2007 21:58:37 GMT
Author: markt
Date: Sun Jun 24 14:58:36 2007
New Revision: 550293

URL: http://svn.apache.org/viewvc?view=rev&rev=550293
Log:
Tabs -> 8 spaces
Fix compiler warnings

Modified:
    tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java

Modified: tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java?view=diff&rev=550293&r1=550292&r2=550293
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java (original)
+++ tomcat/tc6.0.x/trunk/webapps/examples/WEB-INF/classes/sessions/DummyCart.java Sun Jun
24 14:58:36 2007
@@ -20,50 +20,50 @@
 import java.util.Vector;
 
 public class DummyCart {
-    Vector v = new Vector();
+    Vector<String> v = new Vector<String>();
     String submit = null;
     String item = null;
     
     private void addItem(String name) {
-	v.addElement(name);
+        v.addElement(name);
     }
 
     private void removeItem(String name) {
-	v.removeElement(name);
+        v.removeElement(name);
     }
 
     public void setItem(String name) {
-	item = name;
+        item = name;
     }
     
     public void setSubmit(String s) {
-	submit = s;
+        submit = s;
     }
 
     public String[] getItems() {
-	String[] s = new String[v.size()];
-	v.copyInto(s);
-	return s;
+        String[] s = new String[v.size()];
+        v.copyInto(s);
+        return s;
     }
     
     public void processRequest(HttpServletRequest request) {
-	// null value for submit - user hit enter instead of clicking on 
-	// "add" or "remove"
-	if (submit == null) 
-	    addItem(item);
+        // null value for submit - user hit enter instead of clicking on 
+        // "add" or "remove"
+        if (submit == null) 
+            addItem(item);
 
-	if (submit.equals("add"))
-	    addItem(item);
-	else if (submit.equals("remove")) 
-	    removeItem(item);
-	
-	// reset at the end of the request
-	reset();
+        if (submit.equals("add"))
+            addItem(item);
+        else if (submit.equals("remove")) 
+            removeItem(item);
+        
+        // reset at the end of the request
+        reset();
     }
 
     // reset
     private void reset() {
-	submit = null;
-	item = null;
+        submit = null;
+        item = null;
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message