RFR: 8360458: Rename Deferred<> to DeferredStatic<> and improve usage description

Joel Sikström jsikstro at openjdk.org
Wed Jun 25 07:33:28 UTC 2025


On Wed, 25 Jun 2025 00:36:44 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this change that renames Deferred<> to DeferredStatic<>, to
> better reflect the intended usage. (This involves renaming the source file.)
> This change also revises the documentation comment for the class to better
> describe the intended usage.
> 
> In addition, there are a number of cleanups:
> 
> (1) The include guard didn't get updated when the name was previously changed
> to Deferred. It's updated here to reflect the new name.
> 
> (2) There were problems with the include block that are fixed here.
> 
> (3) The changes from JDK-8359923 are backed out. They aren't useful with the
> intended usage model.
> 
> (4) A gtest is added to test the class's functionality.
> 
> Testing: mach5 tier1, including new gtest

Thank you for this Kim! As the author of JDK-8359923, which is backed out here, I think this patch makes the intended use case of (now) DeferredStatic very clear.

test/hotspot/gtest/utilities/test_deferredStatic.cpp line 31:

> 29: #include <type_traits>
> 30: 
> 31: #include "unittest.hpp"

I see you've discussed the order of this include in https://github.com/openjdk/jdk/pull/25927#discussion_r2164307139 already. I agree with David that we should document an agreed upon style. I don't have anything against this style.

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

Marked as reviewed by jsikstro (Committer).

PR Review: https://git.openjdk.org/jdk/pull/25964#pullrequestreview-2956971731
PR Review Comment: https://git.openjdk.org/jdk/pull/25964#discussion_r2165996528


More information about the hotspot-dev mailing list