portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/util ArgUtil.java
Date Fri, 02 Jul 2004 13:25:02 GMT
weaver      2004/07/02 06:25:02

  Modified:    commons/src/java/org/apache/jetspeed/util ArgUtil.java
  Log:
  Added addtional assertNotNull method
  
  Revision  Changes    Path
  1.3       +19 -1     jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/util/ArgUtil.java
  
  Index: ArgUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/util/ArgUtil.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ArgUtil.java	8 Mar 2004 00:39:32 -0000	1.2
  +++ ArgUtil.java	2 Jul 2004 13:25:02 -0000	1.3
  @@ -61,4 +61,22 @@
               }
           }
       }
  +    
  +    /**
  +     * 
  +     * <p>
  +     * notNull
  +     * </p>
  +     *
  +     * @param nonNullObject
  +     * @param thisObject
  +     * @throws IllegalArgumentException
  +     */
  +    public static void assertNotNull(Class nonNullClass, Object nonNullObject, Object thisObject)
throws IllegalArgumentException
  +    {
  +        if(nonNullObject == null)
  +        {
  +            throw new IllegalArgumentException(thisObject.getClass().getName()+" requires
a non-null "+nonNullClass.getName()+" as an argument.");
  +        }
  +    }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message