8335637: Add explicit non-null return value expectations to Object.toString()

Reviewed-by: jpai
Backport-of: 66db71563c3ebd715a1192a9b399b618d7bdb8d0
This commit is contained in:
Joe Darcy 2024-07-11 03:06:38 +00:00
parent 5b9ecb1786
commit 4aab58be4a

View File

@ -237,6 +237,10 @@ public class Object {
/**
* {@return a string representation of the object}
*
* Satisfying this method's contract implies a non-{@code null}
* result must be returned.
*
* @apiNote
* In general, the
* {@code toString} method returns a string that