Withdrawn: 8271525: ResourceHashtableBase::iterate() should not declared as const
Ioi Lam
iklam at openjdk.java.net
Mon Aug 9 15:53:38 UTC 2021
On Fri, 30 Jul 2021 04:16:59 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> `ResourceHashtableBase::iterate()` is declared `const`, but it can actually change the contents of the table. The same is true for `ResourceHashtableBase::get()`, which returns a non-`const` pointer to the value, allowing the caller to modify it.
>
> We should declare these two functions as non-`const`. This will also remove a lot of ugly `const_cast<>` code.
>
> The `iterate()` API is tightened such that the `do_entry()` function can modify the `value` but not the `key`.
This pull request has been closed without being integrated.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4942
More information about the hotspot-dev
mailing list