commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons-sandbox/lang/src/java/org/apache/commons/lang Objects.java
Date Thu, 04 Jul 2002 20:33:49 GMT
scolebourne    2002/07/04 13:33:49

  Modified:    lang/src/java/org/apache/commons/lang Objects.java
  Log:
  Checkstyle to fit with rest of package
  
  Revision  Changes    Path
  1.6       +9 -17     jakarta-commons-sandbox/lang/src/java/org/apache/commons/lang/Objects.java
  
  Index: Objects.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/java/org/apache/commons/lang/Objects.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Objects.java	30 Jun 2002 23:08:48 -0000	1.5
  +++ Objects.java	4 Jul 2002 20:33:49 -0000	1.6
  @@ -54,8 +54,6 @@
    * <http://www.apache.org/>.
    */
   
  -
  -
   /**
    * Common <code>Object</code> manipulation routines.
    *
  @@ -65,8 +63,8 @@
    * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
    * @version $Id$
    */
  -public class Objects
  -{
  +public class Objects {
  +    
       /**
        * Returns a default value if the object passed is null.
        *
  @@ -74,8 +72,7 @@
        * @param defaultValue  the default value to return.
        * @return object if it is not null, defaultValue otherwise.
        */
  -    public static Object defaultIfNull(Object object, Object defaultValue)
  -    {
  +    public static Object defaultIfNull(Object object, Object defaultValue) {
           return (object != null ? object : defaultValue);
       }
   
  @@ -87,20 +84,15 @@
        * @param object2  the second object.
        * @return True if the values of both objects are the same.
        */
  -    public static boolean equals(Object object1, Object object2)
  -    {
  -        if (object1 == null)
  -        {
  +    public static boolean equals(Object object1, Object object2) {
  +        if (object1 == null) {
               return (object2 == null);
  -        }
  -        else if (object2 == null)
  -        {
  +        } else if (object2 == null) {
               // object1 is not null
               return false;
  -        }
  -        else
  -        {
  +        } else {
               return object1.equals(object2);
           }
       }
  +    
   }
  
  
  

--
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