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 Tue, 20 Jul 2004 20:32:08 GMT
weaver      2004/07/20 13:32:08

  Modified:    commons/src/java/org/apache/jetspeed/util ArgUtil.java
  Log:
  added utility method for checking properties
  
  Revision  Changes    Path
  1.5       +9 -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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ArgUtil.java	20 Jul 2004 18:48:34 -0000	1.4
  +++ ArgUtil.java	20 Jul 2004 20:32:07 -0000	1.5
  @@ -87,4 +87,12 @@
               throw new IllegalArgumentException(thisObject.getClass().getName()+"."+methodName+"
requires a non-null "+nonNullClass.getName()+" as an argument.");
           }
       }
  +    
  +    public static final void assertPropertyNotNull(Object nonNullObject, Object thisObject,
String methodName, String property) throws IllegalArgumentException
  +    {
  +        if(nonNullObject == null)
  +        {
  +            throw new IllegalStateException(thisObject.getClass().getName()+"."+methodName+"
cannot be invoked until the property "+property+" has been set.");
  +        }
  +    }
   }
  
  
  

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