Anonymous avatar Anonymous committed 2a150ee

* removed m_ from class files
* changed project files to use the correct formatting conventions
* fixed a small client-side validation bug

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@325 e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (8)

   </component>
   <component name="CodeStyleSettingsManager">
     <option name="PER_PROJECT_SETTINGS">
-      <value>
-        <option name="JAVA_INDENT_OPTIONS">
-          <value>
-            <option name="INDENT_SIZE" value="4" />
-            <option name="CONTINUATION_INDENT_SIZE" value="4" />
-            <option name="TAB_SIZE" value="4" />
-            <option name="USE_TAB_CHARACTER" value="false" />
-            <option name="SMART_TABS" value="false" />
-          </value>
-        </option>
-        <option name="JSP_INDENT_OPTIONS">
-          <value>
-            <option name="INDENT_SIZE" value="2" />
-            <option name="CONTINUATION_INDENT_SIZE" value="4" />
-            <option name="TAB_SIZE" value="2" />
-            <option name="USE_TAB_CHARACTER" value="false" />
-            <option name="SMART_TABS" value="false" />
-          </value>
-        </option>
-        <option name="XML_INDENT_OPTIONS">
-          <value>
-            <option name="INDENT_SIZE" value="2" />
-            <option name="CONTINUATION_INDENT_SIZE" value="4" />
-            <option name="TAB_SIZE" value="2" />
-            <option name="USE_TAB_CHARACTER" value="false" />
-            <option name="SMART_TABS" value="false" />
-          </value>
-        </option>
-        <option name="OTHER_INDENT_OPTIONS">
-          <value>
-            <option name="INDENT_SIZE" value="2" />
-            <option name="CONTINUATION_INDENT_SIZE" value="4" />
-            <option name="TAB_SIZE" value="2" />
-            <option name="USE_TAB_CHARACTER" value="false" />
-            <option name="SMART_TABS" value="false" />
-          </value>
-        </option>
-        <option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
-        <option name="BLANK_LINES_AFTER_IMPORTS" value="2" />
-        <option name="SPACE_AFTER_TYPE_CAST" value="false" />
-        <option name="FIELD_NAME_PREFIX" value="m_" />
-        <option name="STATIC_FIELD_NAME_PREFIX" value="s_" />
-        <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="8" />
-        <option name="IMPORT_LAYOUT_TABLE">
-          <value>
-            <package name="java" withSubpackages="true" />
-            <package name="javax" withSubpackages="true" />
-            <package name="gnu.trove" withSubpackages="true" />
-            <package name="org.apache" withSubpackages="true" />
-            <package name="net.sf.hibernate" withSubpackages="true" />
-            <package name="" withSubpackages="true" />
-          </value>
-        </option>
-      </value>
+      <value />
     </option>
     <option name="USE_PER_PROJECT_SETTINGS" value="true" />
   </component>

src/java/com/opensymphony/xwork/validator/validators/RequiredStringValidator.java

 public class RequiredStringValidator extends FieldValidatorSupport {
     //~ Instance fields ////////////////////////////////////////////////////////
 
-    private boolean m_doTrim = true;
+    private boolean doTrim = true;
 
     //~ Methods ////////////////////////////////////////////////////////////////
 
     public void setTrim(boolean trim) {
-        m_doTrim = trim;
+        doTrim = trim;
     }
 
     public boolean getTrim() {
-        return m_doTrim;
+        return doTrim;
     }
 
     public void validate(Object object) throws ValidationException {
         } else {
             String s = (String) value;
 
-            if (m_doTrim) {
+            if (doTrim) {
                 s = s.trim();
             }
 

src/java/com/opensymphony/xwork/validator/validators/ValidatorSupport.java

 import com.opensymphony.xwork.validator.ValidationException;
 import com.opensymphony.xwork.validator.Validator;
 import com.opensymphony.xwork.validator.ValidatorContext;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
     protected String defaultMessage = "";
     protected String messageKey = null;
     private ValidatorContext validatorContext;
-    private boolean m_shortCircuit;
+    private boolean shortCircuit;
 
     //~ Methods ////////////////////////////////////////////////////////////////
 
     }
 
     public void setShortCircuit(boolean shortcircuit) {
-        m_shortCircuit = shortcircuit;
+        shortCircuit = shortcircuit;
     }
 
     public boolean isShortCircuit() {
-        return m_shortCircuit;
+        return shortCircuit;
     }
 
     public void setValidatorContext(ValidatorContext validatorContext) {

src/test/com/opensymphony/xwork/test/Equidae.java

 public class Equidae {
     //~ Instance fields ////////////////////////////////////////////////////////
 
-    private String m_cow;
-    private String m_donkey;
-    private String m_horse;
+    private String cow;
+    private String donkey;
+    private String horse;
 
     //~ Methods ////////////////////////////////////////////////////////////////
 
     public void setCow(String cow) {
-        m_cow = cow;
+        this.cow = cow;
     }
 
     public String getCow() {
-        return m_cow;
+        return cow;
     }
 
     public void setDonkey(String donkey) {
-        m_donkey = donkey;
+        this.donkey = donkey;
     }
 
     public String getDonkey() {
-        return m_donkey;
+        return donkey;
     }
 
     public void setHorse(String horse) {
-        m_horse = horse;
+        this.horse = horse;
     }
 
     public String getHorse() {
-        return m_horse;
+        return horse;
     }
 }

src/test/com/opensymphony/xwork/test/SimpleAction3.java

 public class SimpleAction3 extends SimpleAction implements DataAware {
     //~ Instance fields ////////////////////////////////////////////////////////
 
-    private Bar m_bar;
-    private String m_data;
+    private Bar bar;
+    private String data;
 
     //~ Methods ////////////////////////////////////////////////////////////////
 
     public void setBarObj(Bar b) {
-        m_bar = b;
+        bar = b;
     }
 
     public Bar getBarObj() {
-        return m_bar;
+        return bar;
     }
 
     public void setData(String data) {
-        m_data = data;
+        this.data = data;
     }
 
     public String getData() {
-        return m_data;
+        return data;
     }
 }

src/test/com/opensymphony/xwork/test/TestBean2.java

 public class TestBean2 extends TestBean implements DataAware {
     //~ Instance fields ////////////////////////////////////////////////////////
 
-    private Bar m_bar;
-    private String m_data;
+    private Bar bar;
+    private String data;
 
     //~ Methods ////////////////////////////////////////////////////////////////
 
     public void setBarObj(Bar b) {
-        m_bar = b;
+        bar = b;
     }
 
     public Bar getBarObj() {
-        return m_bar;
+        return bar;
     }
 
     public void setData(String data) {
-        m_data = data;
+        this.data = data;
     }
 
     public String getData() {
-        return m_data;
+        return data;
     }
 }

src/test/com/opensymphony/xwork/test/User.java

 public class User implements UserMarker {
     //~ Instance fields ////////////////////////////////////////////////////////
 
-    private Collection m_collection;
-    private List m_list;
-    private Map m_map;
-    private String m_email;
-    private String m_email2;
-    private String m_name;
+    private Collection collection;
+    private List list;
+    private Map map;
+    private String email;
+    private String email2;
+    private String name;
 
     //~ Methods ////////////////////////////////////////////////////////////////
 
     public void setCollection(Collection collection) {
-        m_collection = collection;
+        this.collection = collection;
     }
 
     public Collection getCollection() {
-        return m_collection;
+        return collection;
     }
 
     public void setEmail(String email) {
-        m_email = email;
+        this.email = email;
     }
 
     public String getEmail() {
-        return m_email;
+        return email;
     }
 
     public void setEmail2(String email) {
-        m_email2 = email;
+        email2 = email;
     }
 
     public String getEmail2() {
-        return m_email2;
+        return email2;
     }
 
     public void setList(List l) {
-        m_list = l;
+        list = l;
     }
 
     public List getList() {
-        return m_list;
+        return list;
     }
 
     public void setMap(Map m) {
-        m_map = m;
+        map = m;
     }
 
     public Map getMap() {
-        return m_map;
+        return map;
     }
 
     public void setName(String name) {
-        m_name = name;
+        this.name = name;
     }
 
     public String getName() {
-        return m_name;
+        return name;
     }
 }

src/test/com/opensymphony/xwork/validator/GenericValidatorContext.java

  */
 package com.opensymphony.xwork.validator;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 
 /**
 public class GenericValidatorContext extends DelegatingValidatorContext {
     //~ Instance fields ////////////////////////////////////////////////////////
 
-    private Collection m_actionErrors;
-    private Collection m_actionMessages;
-    private Map m_fieldErrors;
+    private Collection actionErrors;
+    private Collection actionMessages;
+    private Map fieldErrors;
 
     //~ Constructors ///////////////////////////////////////////////////////////
 
     //~ Methods ////////////////////////////////////////////////////////////////
 
     public synchronized void setActionErrors(Collection errorMessages) {
-        this.m_actionErrors = errorMessages;
+        this.actionErrors = errorMessages;
     }
 
     public synchronized Collection getActionErrors() {
     }
 
     public synchronized void setActionMessages(Collection messages) {
-        this.m_actionMessages = messages;
+        this.actionMessages = messages;
     }
 
     public synchronized Collection getActionMessages() {
     }
 
     public synchronized void setFieldErrors(Map errorMap) {
-        this.m_fieldErrors = errorMap;
+        this.fieldErrors = errorMap;
     }
 
     /**
     }
 
     public synchronized boolean hasActionErrors() {
-        return (m_actionErrors != null) && !m_actionErrors.isEmpty();
+        return (actionErrors != null) && !actionErrors.isEmpty();
     }
 
     /**
     }
 
     public synchronized boolean hasFieldErrors() {
-        return (m_fieldErrors != null) && !m_fieldErrors.isEmpty();
+        return (fieldErrors != null) && !fieldErrors.isEmpty();
     }
 
     private Collection internalGetActionErrors() {
-        if (m_actionErrors == null) {
-            m_actionErrors = new ArrayList();
+        if (actionErrors == null) {
+            actionErrors = new ArrayList();
         }
 
-        return m_actionErrors;
+        return actionErrors;
     }
 
     private Collection internalGetActionMessages() {
-        if (m_actionMessages == null) {
-            m_actionMessages = new ArrayList();
+        if (actionMessages == null) {
+            actionMessages = new ArrayList();
         }
 
-        return m_actionMessages;
+        return actionMessages;
     }
 
     private Map internalGetFieldErrors() {
-        if (m_fieldErrors == null) {
-            m_fieldErrors = new HashMap();
+        if (fieldErrors == null) {
+            fieldErrors = new HashMap();
         }
 
-        return m_fieldErrors;
+        return fieldErrors;
     }
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.