RFR: 8336103: Clean up confusing Method::is_initializer [v4]

Aleksey Shipilev shade at openjdk.org
Fri Sep 27 09:57:06 UTC 2024


> All around Hotspot, we have calls to `method->is_initializer()`. That method tests for both instance and static initializers. In many cases, the uses imply we actually want to test for constructor, not static initializer. Sometimes we filter explicitly for `!m->is_static()`, sometimes we don't.  At this point, I think the best way to prevent future accidents is to remove the confusing `is_initializer`.
> 
> The behavioral changes have been handled by already integrated PRs, see the links in JBS. The changes left here are not (supposed to be) changing the behavior.

Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:

  Fix

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

Changes: https://git.openjdk.org/jdk/pull/20120/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20120&range=03
  Stats: 24 lines in 7 files changed: 4 ins; 13 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/20120.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20120/head:pull/20120

PR: https://git.openjdk.org/jdk/pull/20120


More information about the hotspot-dev mailing list