[External] : Re: JEP 411, removal of finalizers, a path forward.

Peter Firmstone peter.firmstone at zeus.net.au
Tue Aug 3 08:39:39 UTC 2021

On 3/08/2021 6:31 pm, Ron Pressler wrote:
>> On 3 Aug 2021, at 02:30, Peter Firmstone <peter.firmstone at zeus.net.au> wrote:
>> I am still hopeful that OpenJDK might create some hooks for us and keep the AccessController, AccessControlContext and Subject.doAs methods to make supporting all Java versions easier.
> When I mentioned “hooks” I was referring to something along the lines of a callback when a file is
> accessed.

Can you elaborate?   A Runnable, similar to registering a shutdown hook?

>> Just curious, when using Agents, what are the recommendations for line numbers in code, for exceptions etc, how are these affected when instrumenting?
> When you transform a class, you basically replace its content with new content, so the short answer is
> that what happens to line numbers is whatever you want. If you’re using ASM for your transformation and
> ignore line numbers, which ASM represents as a kind of no-op instructions, then what would usually happen
> is that if original instruction X is mapped to line N and when transforming the stream you replace X with
> YXZ, then all of YXZ will remain mapped to line N.

Ok, Currently my experience with ASM is finding dependencies, and 
unpacking the pack200 format. I hadn't stopped to consider what it might 
do to line numbers.



More information about the jdk-dev mailing list