"assert" is now a keyword, so remove this method.

This commit is contained in:
nicolson%netscape.com 2002-09-05 01:06:26 +00:00
Родитель 36c3ffa2a5
Коммит 59d44fd995
1 изменённых файлов: 1 добавлений и 31 удалений

Просмотреть файл

@ -41,39 +41,9 @@ import org.mozilla.jss.util.*;
*
* @see org.mozilla.jss.util.Debug
* @see org.mozilla.jss.util.AssertionException
* @version $Revision: 1.3 $ $Date: 2002-04-19 22:42:05 $
* @version $Revision: 1.4 $ $Date: 2002-09-05 01:06:26 $
*/
public class Assert {
/**
* Assert that a condition is true. If it is not true, abort by
* throwing an AssertionException.
*
* @param cond The condition that is being tested.
* @deprecated "assert" is a keyword under JDK 1.4. Use "_assert"
* instead.
*/
public static void assert(boolean cond) {
if(Debug.DEBUG && !cond) {
throw new org.mozilla.jss.util.AssertionException(
"assertion failure!");
}
}
/**
* Assert that a condition is true. If it is not true, abort by throwing
* an AssertionException.
*
* @param cond The condition that is being tested.
* @param msg A message describing what is wrong if the condition is false.
* @deprecated "assert" is a keyword under JDK 1.4. Use "_assert"
* instead.
*/
public static void assert(boolean cond, String msg) {
if(Debug.DEBUG && !cond) {
throw new org.mozilla.jss.util.AssertionException(msg);
}
}
/**
* Assert that a condition is true. If it is not true, abort by
* throwing an AssertionException.