You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by pa...@apache.org on 2002/02/12 04:49:38 UTC

cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile BaseProfileLocator.java

paulsp      02/02/11 19:49:38

  Modified:    src/java/org/apache/jetspeed/om/profile
                        BaseProfileLocator.java
  Log:
  o Changed assert() to assertNotNull() since assert is a JDK 1.4 keyword.
    Thanks to Mark Nutter
  
  Revision  Changes    Path
  1.6       +10 -10    jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/BaseProfileLocator.java
  
  Index: BaseProfileLocator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/BaseProfileLocator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BaseProfileLocator.java	6 Dec 2001 05:07:15 -0000	1.5
  +++ BaseProfileLocator.java	12 Feb 2002 03:49:38 -0000	1.6
  @@ -73,7 +73,7 @@
    *
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    * @author <a href="mailto:adambalk@cisco.com">Atul Dambalkar</a>
  - * @version $Id: BaseProfileLocator.java,v 1.5 2001/12/06 05:07:15 taylor Exp $
  + * @version $Id: BaseProfileLocator.java,v 1.6 2002/02/12 03:49:38 paulsp Exp $
   */
   
   public class BaseProfileLocator implements ProfileLocator, Cloneable
  @@ -351,7 +351,7 @@
               return false;
           }
           // check if both are non-nulls
  -        if (assert(this.user) && assert(user))
  +        if (assertNotNull(this.user) && assertNotNull(user))
           {
               return stringEquals(this.user.getUserName(), user.getUserName());
           }
  @@ -371,7 +371,7 @@
               return false;
           }
           // check if both are non-nulls
  -        if (assert(this.group) && assert(group))
  +        if (assertNotNull(this.group) && assertNotNull(group))
           {
               return stringEquals( this.group.getName(), group.getName());
           }
  @@ -391,7 +391,7 @@
               return false;
           }
           // check if both are non-nulls
  -        if (assert(this.role) && assert(role))
  +        if (assertNotNull(this.role) && assertNotNull(role))
           {
               return stringEquals(this.role.getName(), role.getName());
           }
  @@ -436,7 +436,7 @@
       }
   
       /**
  -     * Assert the two String objects and then check the equality.
  +     * AssertNotNull the two String objects and then check the equality.
        */
       private boolean stringEquals(String str1, String str2)
       {
  @@ -444,7 +444,7 @@
           {
               return false;
           }
  -        if (assert(str1) && assert(str2))
  +        if (assertNotNull(str1) && assertNotNull(str2))
           {
               return str1.equals(str2);
           }
  @@ -453,9 +453,9 @@
       }
   
       /**
  -     * Assert the given object.
  +     * AssertNotNull the given object.
        */
  -    private boolean assert(Object object)
  +    private boolean assertNotNull(Object object)
       {
           return object != null;
       }
  @@ -465,7 +465,7 @@
        */
       private boolean exclusiveOr(Object obj1, Object obj2)
       {
  -        return (assert(obj1) && !assert(obj2))
  -                || (!assert(obj1) && assert(obj2));
  +        return (assertNotNull(obj1) && !assertNotNull(obj2))
  +                || (!assertNotNull(obj1) && assertNotNull(obj2));
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>