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

Reviewed-by: jpai, alanb, smarks, prappo
This commit is contained in:
Joe Darcy 2024-07-10 16:36:39 +00:00
parent 7ab96c74e2
commit 66db71563c

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