On Tue, 19 Dec 2023 17:13:58 GMT, Erik Gahlin <egah...@openjdk.org> wrote:
>> The intent is that they are stable and for programmatic usage, whereas the >> message is more for human consumption. The codes are used in the test, for >> example, and are declared as public static in the event classes. >> >> Alternatively, one could parse the message, but that's less robust in face >> of changes, I think. > > Users (not OpenJDK developers) don't know what the error code means. I think > it's better to not have them. This is how other events work. If you want to > guard against changes, I would export the package to the test. What about fixed `String`s rather than `int`s for the kind of error? Something like `"SUID_INEFFECTIVE_ON_ENUM"`, and so on? It would be nice to be able to use enums, but AFAIK that's not supported in JFR. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17129#discussion_r1431744479