RFR: JMC-7090: [JFR Writer] Make constant pool optional when registering a new type

Jaroslav Bachorik jbachorik at openjdk.java.net
Tue Jan 19 10:54:59 UTC 2021


On Mon, 18 Jan 2021 20:31:02 GMT, Alexander Kuznetsov <github.com+13893590+AlexVanGogen at openjdk.org> wrote:

>> JMC-7090: [JFR Writer] Make constant pool optional when registering a new type
>
> @jbachorik Thanks for this contribution! 
> One additional thought: wouldn’t it be simpler to just add something like `TypeStructureBuilder#withConstantPool()` instead of extending API with additional flag parameter?

I was thinking about using the builder - but the problem is that the builder is just for the type structure and you are allowed to use the same structure to actually register multiple types and each of them can have a different constant pool policy.

And that was the reason for using the flag instead.

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

PR: https://git.openjdk.java.net/jmc/pull/200


More information about the jmc-dev mailing list