Mercurial > projects > dwt2
diff org.eclipse.equinox.common/src/org/eclipse/core/runtime/Assert.d @ 86:12b890a6392a
Work on databinding
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 18 Apr 2009 13:58:35 +0200 |
parents | bc29606a740c |
children | bbe49769ec18 |
line wrap: on
line diff
--- a/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Assert.d Sat Apr 18 13:54:50 2009 +0200 +++ b/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Assert.d Sat Apr 18 13:58:35 2009 +0200 @@ -79,8 +79,11 @@ public static void isNotNull(Object object) { isNotNull(object, ""); //$NON-NLS-1$ } - public static void isNotNull(String object) { - isTrue(object.ptr !is null); //$NON-NLS-1$ + public static void isNotNull(String str) { + isTrue(str.ptr !is null); //$NON-NLS-1$ + } + public static void isNotNull(void* ptr) { + isTrue(ptr !is null); //$NON-NLS-1$ } /** Asserts that the given object is not <code>null</code>. If this @@ -94,6 +97,12 @@ if (object is null) throw new AssertionFailedException("null argument:" ~ message); //$NON-NLS-1$ } + public static void isNotNull(String str, String message) { + isTrue(str.ptr !is null, message ); //$NON-NLS-1$ + } + public static void isNotNull(void* ptr, String message) { + isTrue(ptr !is null, message ); //$NON-NLS-1$ + } /** Asserts that the given bool is <code>true</code>. If this * is not the case, some kind of unchecked exception is thrown.