You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2006/02/10 19:05:11 UTC
svn commit: r376776 - in
/struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise:
Coord.java DynaSetAction.java HtmlSettersAction.java TestBean.java
Author: husted
Date: Fri Feb 10 10:05:08 2006
New Revision: 376776
URL: http://svn.apache.org/viewcvs?rev=376776&view=rev
Log:
Checkstyle Roundup
* EL package reformatted with latest Jalopy settings. Stylistic changes only.
Modified:
struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/Coord.java
struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/DynaSetAction.java
struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/HtmlSettersAction.java
struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/TestBean.java
Modified: struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/Coord.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/Coord.java?rev=376776&r1=376775&r2=376776&view=diff
==============================================================================
--- struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/Coord.java (original)
+++ struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/Coord.java Fri Feb 10 10:05:08 2006
@@ -21,25 +21,35 @@
/**
* Simple bean to use for testing indexed tags.
*/
-public class Coord implements java.io.Serializable
-{
- private int x;
- private int y;
-
- public Coord() {}
-
- public Coord(int x, int y)
- {
+public class Coord implements java.io.Serializable {
+ private int x;
+ private int y;
+
+ public Coord() {
+ }
+
+ public Coord(int x, int y) {
this.x = x;
this.y = y;
}
-
- public int getX() { return (x); }
- public int getY() { return (y); }
- public void setX(int x) { this.x = x; }
- public void setY(int y) { this.y = y; }
+ public int getX() {
+ return (x);
+ }
- public String toString()
- { return ("Coord[" + "x=" + x + ";y=" + y + "]"); }
+ public int getY() {
+ return (y);
+ }
+
+ public void setX(int x) {
+ this.x = x;
+ }
+
+ public void setY(int y) {
+ this.y = y;
+ }
+
+ public String toString() {
+ return ("Coord[" + "x=" + x + ";y=" + y + "]");
+ }
}
Modified: struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/DynaSetAction.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/DynaSetAction.java?rev=376776&r1=376775&r2=376776&view=diff
==============================================================================
--- struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/DynaSetAction.java (original)
+++ struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/DynaSetAction.java Fri Feb 10 10:05:08 2006
@@ -18,21 +18,21 @@
package org.apache.struts.webapp.exercise;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.DynaActionForm;
-public class DynaSetAction extends Action
-{
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class DynaSetAction extends Action {
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
- throws Exception {
+ throws Exception {
DynaActionForm dynaActionForm = (DynaActionForm) form;
Modified: struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/HtmlSettersAction.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/HtmlSettersAction.java?rev=376776&r1=376775&r2=376776&view=diff
==============================================================================
--- struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/HtmlSettersAction.java (original)
+++ struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/HtmlSettersAction.java Fri Feb 10 10:05:08 2006
@@ -20,48 +20,49 @@
package org.apache.struts.webapp.exercise;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
/**
* Do-nothing action that accepts the changes made automatically in our form
- * bean, and then returns control to the input form (if "Save" was pressed)
- * or the main menu (if "Cancel" was pressed).
+ * bean, and then returns control to the input form (if "Save" was pressed) or
+ * the main menu (if "Cancel" was pressed).
*
* @author Craig R. McClanahan
- * @version $Rev$ $Date$
+ * @version $Rev$ $Date: 2004-12-08 00:11:35 -0500 (Wed, 08 Dec 2004)
+ * $
*/
public class HtmlSettersAction extends Action {
/**
- * Forward to the input form if "Save" was pressed or the main menu
- * if "Cancel" was pressed.
+ * Forward to the input form if "Save" was pressed or the main menu if
+ * "Cancel" was pressed.
*
- * @param mapping The ActionMapping used to select this instance
+ * @param mapping The ActionMapping used to select this instance
* @param actionForm The optional ActionForm bean for this request
- * @param request The servlet request we are processing
- * @param response The servlet response we are creating
- *
- * @exception Exception if business logic throws an exception
+ * @param request The servlet request we are processing
+ * @param response The servlet response we are creating
+ * @throws Exception if business logic throws an exception
*/
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
- throws Exception {
+ throws Exception {
- if (isCancelled(request))
+ if (isCancelled(request)) {
return (mapping.findForward("index"));
- else
+ } else {
return (mapping.findForward("input"));
+ }
}
Modified: struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/TestBean.java
URL: http://svn.apache.org/viewcvs/struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/TestBean.java?rev=376776&r1=376775&r2=376776&view=diff
==============================================================================
--- struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/TestBean.java (original)
+++ struts/el/trunk/src/exercise-taglib/org/apache/struts/webapp/exercise/TestBean.java Fri Feb 10 10:05:08 2006
@@ -20,31 +20,32 @@
package org.apache.struts.webapp.exercise;
-import java.util.Collection;
-import java.util.Vector;
-import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.util.LabelValueBean;
+import javax.servlet.http.HttpServletRequest;
+import java.util.Collection;
+import java.util.Vector;
+
/**
* General purpose test bean for Struts custom tag tests.
*
* @author Craig R. McClanahan
* @author Martin F N Cooper
- * @version $Rev$ $Date$
+ * @version $Rev$ $Date: 2004-10-16 13:04:52 -0400 (Sat, 16 Oct 2004)
+ * $
*/
public class TestBean extends ActionForm {
-
// ------------------------------------------------------------- Properties
/**
- * A collection property where the elements of the collection are
- * of type <code>LabelValueBean</code>.
+ * A collection property where the elements of the collection are of type
+ * <code>LabelValueBean</code>.
*/
private Collection beanCollection = null;
@@ -78,7 +79,7 @@
* A multiple-String SELECT element using a bean collection.
*/
private String[] beanCollectionSelect = { "Value 1", "Value 3",
- "Value 5" };
+ "Value 5" };
public String[] getBeanCollectionSelect() {
return (this.beanCollectionSelect);
@@ -107,7 +108,7 @@
* A multiple-String SELECT element using a collection.
*/
private String[] collectionSelect = { "Value 2", "Value 4",
- "Value 6" };
+ "Value 6" };
public String[] getCollectionSelect() {
return (this.collectionSelect);
@@ -226,7 +227,7 @@
* A multiple-String SELECT element.
*/
private String[] multipleSelect = { "Multiple 3", "Multiple 5",
- "Multiple 7" };
+ "Multiple 7" };
public String[] getMultipleSelect() {
return (this.multipleSelect);
@@ -243,8 +244,9 @@
private TestBean nested = null;
public TestBean getNested() {
- if (nested == null)
+ if (nested == null) {
nested = new TestBean();
+ }
return (nested);
}
@@ -295,7 +297,7 @@
* String arrays that are accessed as an array as well as indexed.
*/
private String stringArray[] =
- { "String 0", "String 1", "String 2", "String 3", "String 4" };
+ { "String 0", "String 1", "String 2", "String 3", "String 4" };
public String[] getStringArray() {
return (this.stringArray);
@@ -306,7 +308,7 @@
}
private String stringIndexed[] =
- { "String 0", "String 1", "String 2", "String 3", "String 4" };
+ { "String 0", "String 1", "String 2", "String 3", "String 4" };
public String getStringIndexed(int index) {
return (stringIndexed[index]);
@@ -316,14 +318,13 @@
stringIndexed[index] = value;
}
- private String indexedStrings[] =
- { "alpha", "beta", "gamma", "delta", "epsilon" };
+ private String indexedStrings[] =
+ { "alpha", "beta", "gamma", "delta", "epsilon" };
- public String[] getIndexedStrings()
- {
+ public String[] getIndexedStrings() {
return (indexedStrings);
}
-
+
private String stringMultibox[] = new String[0];
public String[] getStringMultibox() {
@@ -363,33 +364,47 @@
/**
* A list of coordinate objects.
*/
- private Coord[] coords =
- { new Coord(0, 0), new Coord(0, 1), new Coord(1, 1), new Coord(2, 0),
- new Coord(2, 1)
- };
-
- public Coord[] getCoords() { return (coords); }
-
- public Coord getCoord(int index) { return (coords[index]); }
+ private Coord[] coords =
+ { new Coord(0, 0), new Coord(0, 1), new Coord(1, 1),
+ new Coord(2, 0),
+ new Coord(2, 1)
+ };
+
+ public Coord[] getCoords() {
+ return (coords);
+ }
+
+ public Coord getCoord(int index) {
+ return (coords[index]);
+ }
- public void setCoord(int index, Coord coord) { coords[index] = coord; }
+ public void setCoord(int index, Coord coord) {
+ coords[index] = coord;
+ }
/**
* A list of images.
*/
- public String images[] = {"T1.gif", "T2.gif"};
+ public String images[] = { "T1.gif", "T2.gif" };
- public String[] getImages() { return (images); }
+ public String[] getImages() {
+ return (images);
+ }
- private Coord[] imageCoords = { new Coord(0, 0), new Coord(0, 0) };
+ private Coord[] imageCoords = { new Coord(0, 0), new Coord(0, 0) };
- public Coord[] getImageCoords() { return (imageCoords); }
+ public Coord[] getImageCoords() {
+ return (imageCoords);
+ }
- public Coord getImageCoord(int index) { return (imageCoords[index]); }
+ public Coord getImageCoord(int index) {
+ return (imageCoords[index]);
+ }
+
+ public void setImageCoord(int index, Coord coord) {
+ imageCoords[index] = coord;
+ }
- public void setImageCoord(int index, Coord coord)
- { imageCoords[index] = coord; }
-
/**
* A property that allows a null value but is still used in a SELECT.
*/
@@ -403,7 +418,6 @@
this.withNulls = withNulls;
}
-
// --------------------------------------------------------- Public Methods
@@ -417,8 +431,9 @@
intMultibox = new int[0];
multipleSelect = new String[0];
stringMultibox = new String[0];
- if (nested != null)
+ if (nested != null) {
nested.reset(mapping, request);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org