-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
difficulty:mediumSome knowledge required.Some knowledge required.
Description
When compiling a record, the java compiler inserts bootstrap methods that handle equals/hashCode/toString. These bootstrap methods are passed a descriptor string identifying the record's components by name.
yGuard replaces that descriptor string for the bootstrap method invocation with a remapped descriptor string. The value of the old descriptor string is kept in the constant pool to prevent breaking string literals in code that have the same value as the descriptor, e.g. suppose
record MyRecord(int value) {
String getName() {
return "value";
}
}
However, for most cases the descriptor string will be unique and should be removed to ensure all traces of the original component names are gone. This requires counting the references to string literals in code blocks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
difficulty:mediumSome knowledge required.Some knowledge required.