vmassol     01/08/19 09:38:41

  Modified:    cactus/src/framework/share/org/apache/commons/cactus/util
                        AssertUtils.java ChainedRuntimeException.java
                        ClientCookie.java
  Log:
  align with coding conventions
  
  Revision  Changes    Path
  1.5       +17 -8     
jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/AssertUtils.java
  
  Index: AssertUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/AssertUtils.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AssertUtils.java  2001/08/14 12:27:06     1.4
  +++ AssertUtils.java  2001/08/19 16:38:41     1.5
  @@ -61,7 +61,9 @@
    * Cactus utility classes to help assert returned results from server side
    * code.
    *
  - * @version @version@
  + * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
  + *
  + * @version $Id: AssertUtils.java,v 1.5 2001/08/19 16:38:41 vmassol Exp $
    * @deprecated As of Cactus 1.2, replaced by WebResponse
    * @see org.apache.commons.cactus.WebResponse
    */
  @@ -72,10 +74,12 @@
        *                      redirector.
        * @return the servlet output stream bytes as a string.
        */
  -    public static String getResponseAsString(HttpURLConnection theConnection) 
throws IOException
  +    public static String getResponseAsString(HttpURLConnection theConnection)
  +        throws IOException
       {
           StringBuffer sb = new StringBuffer();
  -        BufferedReader input = new BufferedReader(new 
InputStreamReader(theConnection.getInputStream()));
  +        BufferedReader input = new BufferedReader(
  +            new InputStreamReader(theConnection.getInputStream()));
           char[] buffer = new char[2048];
           int nb;
           while (-1 != (nb = input.read(buffer, 0, 2048))) {
  @@ -92,9 +96,11 @@
        * @return the servlet output stream bytes as an array of string (each
        *         string is a separate line from the output stream).
        */
  -    public static String[] getResponseAsStringArray(HttpURLConnection 
theConnection) throws IOException
  +    public static String[] getResponseAsStringArray(
  +        HttpURLConnection theConnection) throws IOException
       {
  -        BufferedReader input = new BufferedReader(new 
InputStreamReader(theConnection.getInputStream()));
  +        BufferedReader input = new BufferedReader(
  +            new InputStreamReader(theConnection.getInputStream()));
           Vector lines = new Vector();
           String str;
           while (null != (str = input.readLine())) {
  @@ -153,7 +159,8 @@
                   // Check if the cookie name already exist in the hashtable.
                   // If so, then add it to the vector of cookies for that name.
   
  -                String name = ((ClientCookie)clientCookies.elementAt(0)).getName();
  +                String name =
  +                    ((ClientCookie)clientCookies.elementAt(0)).getName();
   
                   if (cookies.containsKey(name)) {
                       Vector cookieValues = (Vector)cookies.get(name);
  @@ -209,7 +216,8 @@
   
               int pos = param.indexOf("=");
               if (pos < 0) {
  -                System.err.println("Bad 'Set-Cookie' syntax, missing '=' [" + param 
+ "]");
  +                System.err.println("Bad 'Set-Cookie' syntax, missing '=' [" +
  +                    param + "]");
                   continue;
               }
   
  @@ -247,7 +255,8 @@
                   } else if (left.equalsIgnoreCase("version")) {
                       version = Float.parseFloat(right);
                   } else {
  -                    System.err.println("Bad 'Set-Cookie' syntax, bad name [" + 
param + "]");
  +                    System.err.println("Bad 'Set-Cookie' syntax, bad name [" +
  +                        param + "]");
                       continue;
                   }
   
  
  
  
  1.2       +10 -8     
jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/ChainedRuntimeException.java
  
  Index: ChainedRuntimeException.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/ChainedRuntimeException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ChainedRuntimeException.java      2001/08/11 13:33:07     1.1
  +++ ChainedRuntimeException.java      2001/08/19 16:38:41     1.2
  @@ -60,14 +60,16 @@
    * exception but it will be caught by JUnit so the application will not stop.
    * The test will be reported as failed. It implements chaining.
    *
  - * @version @version@
  + * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
  + *
  + * @version $Id: ChainedRuntimeException.java,v 1.2 2001/08/19 16:38:41 vmassol Exp 
$
    */
   public class ChainedRuntimeException extends RuntimeException
   {
       /**
        * Original exception which caused this exception.
        */
  -    protected Throwable m_OriginalException;
  +    protected Throwable originalException;
   
       /**
        * Create a <code>TestException</code> and set the exception error
  @@ -89,7 +91,7 @@
       public ChainedRuntimeException(String theMessage, Throwable theException)
       {
           super(theMessage);
  -        m_OriginalException = theException;
  +        this.originalException = theException;
       }
   
       /**
  @@ -102,7 +104,7 @@
       public ChainedRuntimeException(Throwable theException)
       {
           super(theException.getMessage());
  -        m_OriginalException = theException;
  +        this.originalException = theException;
       }
   
       /**
  @@ -121,8 +123,8 @@
       public void printStackTrace(PrintStream thePs)
       {
           super.printStackTrace(thePs);
  -        if (m_OriginalException != null) {
  -            m_OriginalException.printStackTrace(thePs);
  +        if (this.originalException != null) {
  +            this.originalException.printStackTrace(thePs);
           }
       }
   
  @@ -134,8 +136,8 @@
       public void printStackTrace(PrintWriter thePw)
       {
           super.printStackTrace(thePw);
  -        if (m_OriginalException != null) {
  -            m_OriginalException.printStackTrace(thePw);
  +        if (this.originalException != null) {
  +            this.originalException.printStackTrace(thePw);
           }
       }
   
  
  
  
  1.2       +26 -23    
jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/ClientCookie.java
  
  Index: ClientCookie.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/ClientCookie.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ClientCookie.java 2001/04/09 11:52:38     1.1
  +++ ClientCookie.java 2001/08/19 16:38:41     1.2
  @@ -57,44 +57,46 @@
    * Contains cookie information for cookies returned from the server to the
    * client.
    *
  - * @version @version@
  + * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
  + *
  + * @version $Id: ClientCookie.java,v 1.2 2001/08/19 16:38:41 vmassol Exp $
    */
   public class ClientCookie
   {
       /**
        * The cookie's name.
        */
  -    private String m_Name;
  +    private String name;
   
       /**
        * The cookie's value.
        */
  -    private String m_Value;
  +    private String value;
   
       /**
        * The cookie's comment.
        */
  -    private String m_Comment;
  +    private String comment;
   
       /**
        * The cookie's domain.
        */
  -    private String m_Domain;
  +    private String domain;
   
       /**
        * The cookie's max age.
        */
  -    private long m_MaxAge;
  +    private long maxAge;
   
       /**
        * The cookie's path.
        */
  -    private String m_Path;
  +    private String path;
   
       /**
        * Specify if the cookie is a secure cookie
        */
  -    private boolean m_IsSecure;
  +    private boolean isSecure;
   
       /**
        * The cookie's spec. version
  @@ -114,15 +116,16 @@
        * @param theVersion the cookie's version
        */
       public ClientCookie(String theName, String theValue, String theComment,
  -        String theDomain, long theMaxAge, String thePath, boolean isSecure, float 
theVersion)
  +        String theDomain, long theMaxAge, String thePath, boolean isSecure,
  +        float theVersion)
       {
  -        m_Comment = theComment;
  -        m_Domain = theDomain;
  -        m_IsSecure = isSecure;
  -        m_MaxAge = theMaxAge;
  -        m_Name = theName;
  -        m_Path = thePath;
  -        m_Value = theValue;
  +        this.comment = theComment;
  +        this.domain = theDomain;
  +        this.isSecure = isSecure;
  +        this.maxAge = theMaxAge;
  +        this.name = theName;
  +        this.path = thePath;
  +        this.value = theValue;
           m_Version = theVersion;
       }
   
  @@ -131,7 +134,7 @@
        */
       public String getName()
       {
  -        return m_Name;
  +        return this.name;
       }
   
       /**
  @@ -139,7 +142,7 @@
        */
       public String getValue()
       {
  -        return m_Value;
  +        return this.value;
       }
   
       /**
  @@ -147,7 +150,7 @@
        */
       public String getComment()
       {
  -        return m_Comment;
  +        return this.comment;
       }
   
       /**
  @@ -155,7 +158,7 @@
        */
       public String getDomain()
       {
  -        return m_Domain;
  +        return this.domain;
       }
   
       /**
  @@ -163,7 +166,7 @@
        */
       public long getMaxAge()
       {
  -        return m_MaxAge;
  +        return this.maxAge;
       }
   
       /**
  @@ -171,7 +174,7 @@
        */
       public String getPath()
       {
  -        return m_Path;
  +        return this.path;
       }
   
       /**
  @@ -179,7 +182,7 @@
        */
       public boolean isSecure()
       {
  -        return m_IsSecure;
  +        return this.isSecure;
       }
   
       /**
  
  
  

Reply via email to