commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sul...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient UsernamePasswordCredentials.java
Date Thu, 05 Sep 2002 19:21:48 GMT
sullis      2002/09/05 12:21:48

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        UsernamePasswordCredentials.java
  Log:
  enhanced javadocs
  implemented toString() method
  
  Revision  Changes    Path
  1.6       +49 -4     jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/UsernamePasswordCredentials.java
  
  Index: UsernamePasswordCredentials.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/UsernamePasswordCredentials.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- UsernamePasswordCredentials.java	28 Jul 2002 18:08:57 -0000	1.5
  +++ UsernamePasswordCredentials.java	5 Sep 2002 19:21:47 -0000	1.6
  @@ -66,7 +66,10 @@
    * <p>Username and password {@link Credentials}.</p>
    *
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  + * @author Sean C. Sullivan
  + * 
    * @version $Revision$ $Date$
  + * 
    */
   public class UsernamePasswordCredentials implements Credentials {
   
  @@ -107,6 +110,9 @@
        * User name property setter.
        *
        * @param userName
  +     * 
  +     * @see #getUserName()
  +     * 
        */
       public void setUserName(String userName) {
           this.userName = userName;
  @@ -116,6 +122,9 @@
        * User name property getter.
        *
        * @return String userName
  +     * 
  +     * @see #setUserName(String)
  +     * 
        */
       public String getUserName() {
           return userName;
  @@ -125,6 +134,9 @@
        * Password property setter.
        *
        * @param password
  +     * 
  +     * @see #getPassword()
  +     * 
        */
       public void setPassword(String password) {
           this.password = password;
  @@ -134,9 +146,42 @@
        * Password property getter.
        *
        * @return String password
  +     * 
  +     * @see #setPassword(String)
  +     * 
        */
       public String getPassword() {
           return password;
  +    }
  +    
  +    public String toString()
  +    {
  +    	StringBuffer sbResult = new StringBuffer();
  +    	
  +    	if (null == this.userName)
  +    	{
  +    		sbResult.append("null");
  +    	}
  +    	else
  +    	{
  +    		sbResult.append(this.userName);
  +    	}
  +    	
  +    	sbResult.append(":");
  +    	
  +    	if (null == this.password)
  +    	{
  +    		sbResult.append("null");
  +    	}
  +    	else
  +    	{
  +    		sbResult.append(this.password);
  +    	}
  +    	
  +
  +    	String strResult = sbResult.toString();
  +    	
  +    	return strResult;
       }
   
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message