RFR: 8314684: Add overview docs to loaderConstraints.cpp

Calvin Cheung ccheung at openjdk.org
Mon Aug 21 22:14:26 UTC 2023


On Mon, 21 Aug 2023 21:15:19 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> I added some documentation to make it easier to understand loaderConstraints.cpp. Please review and check if my description is actually correct. Thanks!

Looks good. Just noticed some typos.

src/hotspot/share/classfile/loaderConstraints.cpp line 60:

> 58: //
> 59: // if _klass_<m> is non-null, when a loader loader_<m><n> tries to resolve the name N to a class K,
> 60: // where _klass_<m> != K, a LinkageError is thrown, and the resolution fails;

Suggestion: '.' instead of ';'

src/hotspot/share/classfile/loaderConstraints.cpp line 64:

> 62: // Management of LoaderConstraints
> 63: //
> 64: // When the SyswtemDictionary decides that loader_x and loader_y must resolve the name N to the same class:

Typo: SyswtemDictionary should be SystemDictionary

src/hotspot/share/classfile/loaderConstraints.cpp line 77:

> 75: //
> 76: // Otherwise if LoaderConstraint_x exists but LoaderConstraint_y doesn't exist, add loader_y to LoaderConstraint_x;
> 77: // (and vice versa);

Suggestion: s/and/or
Also, I think the parentheses could be removed.

-------------

Marked as reviewed by ccheung (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15372#pullrequestreview-1587977506
PR Review Comment: https://git.openjdk.org/jdk/pull/15372#discussion_r1300697546
PR Review Comment: https://git.openjdk.org/jdk/pull/15372#discussion_r1300695541
PR Review Comment: https://git.openjdk.org/jdk/pull/15372#discussion_r1300702102


More information about the hotspot-runtime-dev mailing list