зеркало из https://github.com/mozilla/pjs.git
"assert" is now a keyword, so remove this method.
This commit is contained in:
Родитель
36c3ffa2a5
Коммит
59d44fd995
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче