You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/08/10 18:18:54 UTC

svn commit: r430421 - /lenya/trunk/src/java/org/apache/lenya/util/Assert.java

Author: andreas
Date: Thu Aug 10 09:18:52 2006
New Revision: 430421

URL: http://svn.apache.org/viewvc?rev=430421&view=rev
Log:
Added method Assert.isTrue()

Modified:
    lenya/trunk/src/java/org/apache/lenya/util/Assert.java

Modified: lenya/trunk/src/java/org/apache/lenya/util/Assert.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/util/Assert.java?rev=430421&r1=430420&r2=430421&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/util/Assert.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/util/Assert.java Thu Aug 10 09:18:52 2006
@@ -41,4 +41,14 @@
         notNull("undefined", object);
     }
 
+    /**
+     * @param expression The expression to check.
+     * @param value The value.
+     * @throws RuntimeException if the value is not true.
+     */
+    public static final void isTrue(String expression, boolean value) {
+        if (!value) {
+            throw new RuntimeException("The expression [" + expression + "] is not true!");
+        }
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org