RFR: 4668290: unclear spec for Polygon.bounds field
SWinxy
duke at openjdk.org
Mon Sep 26 02:33:25 UTC 2022
New documentation replaces the `This value can be null.`:
When created, {@link #invalidate() invalidated}, or {@link #reset() reset},
this becomes {@code null}. To get out of the null state,
{@link #getBounds()} called with {@link #npoints} being greater than
{@code 0} will transfer into a non-null {@link Rectangle}.
I think I've got the reason for why it can be `null` correct, but you never know.
In javax.swing.text.html.Map, I've replaced setting the field to null with the equivalent #invalidate(). This may mean we can make the field private in the future.
-------------
Commit messages:
- 4668290: unclear spec for Polygon.bounds field
Changes: https://git.openjdk.org/jdk/pull/10417/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10417&range=00
Issue: https://bugs.openjdk.org/browse/JDK-4668290
Stats: 7 lines in 2 files changed: 4 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/10417.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10417/head:pull/10417
PR: https://git.openjdk.org/jdk/pull/10417
More information about the client-libs-dev
mailing list