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 we...@apache.org on 2004/07/02 15:25:02 UTC

cvs commit: jakarta-jetspeed-2/commons/src/java/org/apache/jetspeed/util ArgUtil.java

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