tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r550290 - /tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/WEB-INF/classes/sessions/DummyCart.java
Date Sun, 24 Jun 2007 21:49:11 GMT
Author: markt
Date: Sun Jun 24 14:49:10 2007
New Revision: 550290

URL: http://svn.apache.org/viewvc?view=rev&rev=550290
Log:
Tabs -> 8 spaces
Remove unused import

Modified:
    tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/WEB-INF/classes/sessions/DummyCart.java

Modified: tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/WEB-INF/classes/sessions/DummyCart.java
URL: http://svn.apache.org/viewvc/tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/WEB-INF/classes/sessions/DummyCart.java?view=diff&rev=550290&r1=550289&r2=550290
==============================================================================
--- tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/WEB-INF/classes/sessions/DummyCart.java
(original)
+++ tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/jsr152/examples/WEB-INF/classes/sessions/DummyCart.java
Sun Jun 24 14:49:10 2007
@@ -18,7 +18,6 @@
 
 import javax.servlet.http.*;
 import java.util.Vector;
-import java.util.Enumeration;
 
 public class DummyCart {
     Vector v = new Vector();
@@ -26,45 +25,45 @@
     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);
-
-	if (submit.equals("add"))
-	    addItem(item);
-	else if (submit.equals("remove")) 
-	    removeItem(item);
-	
-	// reset at the end of the request
-	reset();
+        // 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();
     }
 
     // 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