Improve non-null assertion messages

This commit is contained in:
Alexander Udalov
2014-06-27 17:34:52 +04:00
parent d4c792d0ee
commit 254a95ba1a
@@ -49,7 +49,7 @@ public class Intrinsics {
public static void checkFieldIsNotNull(Object value, String className, String fieldName) {
if (value == null) {
IllegalStateException exception =
new IllegalStateException("Field specified as non-null contains null: " + className + "." + fieldName);
new IllegalStateException("Field specified as non-null is null: " + className + "." + fieldName);
throw sanitizeStackTrace(exception);
}
}
@@ -64,7 +64,7 @@ public class Intrinsics {
String methodName = caller.getMethodName();
IllegalArgumentException exception =
new IllegalArgumentException("Parameter specified as non-null contains null: " +
new IllegalArgumentException("Parameter specified as non-null is null: " +
"method " + className + "." + methodName +
", parameter " + paramName);
throw sanitizeStackTrace(exception);