You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use @Shadow on a field that starts with L with refmap remapping, the L will get dropped. This can be seen by depending on Create: Steam n' Rails in a development environment.
The issue is that MemberInfo.parse checks for semicolons before colons. LONG_CROSS key gets pulled out of the refmap (using Steam n' Rails as an example here) as LONG_CROSS:Lnet/minecraft/class_265;. So far so good. Then MemberInfo.parse sees that the value starts with an L and contains a semicolon. It decides that the owner is "ONG_CROSS:Lnet/minecraft/class_265" and the name is "". RemappingReferenceMapper then sees that the owner is non-null and the name is null. It then remaps the owner by itself, and converts the resulting MemberInfo to a string. This leaves us with a remapped name of ONG_CROSS:Lnet/minecraft/class_265. However, MemberInfo.parse (which is what invoked the remapping; AccessorInfo.inflectTarget -> TargetSelector.parseName -> TargetSelector.parse -> MemberInfo.parse) isn't done. It sees this remapped ONG_CROSS:Lnet/minecraft/class_265, finds no L or semicolon, splits it on :, leaving a descriptor of Lnet/minecraft/class_265 and a name of ONG_CROSS, drops the descriptor to get the name, leaving us with ONG_CROSS.
This can be fixed by moving the colon and left parenthesis checks before the semicolon check in MemberInfo.parse.
The text was updated successfully, but these errors were encountered:
If you use
@Shadow
on a field that starts withL
with refmap remapping, theL
will get dropped. This can be seen by depending on Create: Steam n' Rails in a development environment.The issue is that
MemberInfo.parse
checks for semicolons before colons.LONG_CROSS
key gets pulled out of the refmap (using Steam n' Rails as an example here) asLONG_CROSS:Lnet/minecraft/class_265;
. So far so good. ThenMemberInfo.parse
sees that the value starts with anL
and contains a semicolon. It decides that the owner is"ONG_CROSS:Lnet/minecraft/class_265"
and the name is""
.RemappingReferenceMapper
then sees that the owner is non-null and the name is null. It then remaps the owner by itself, and converts the resultingMemberInfo
to a string. This leaves us with a remapped name ofONG_CROSS:Lnet/minecraft/class_265
. However,MemberInfo.parse
(which is what invoked the remapping;AccessorInfo.inflectTarget -> TargetSelector.parseName -> TargetSelector.parse -> MemberInfo.parse
) isn't done. It sees this remappedONG_CROSS:Lnet/minecraft/class_265
, finds noL
or semicolon, splits it on:
, leaving a descriptor ofLnet/minecraft/class_265
and a name ofONG_CROSS
, drops the descriptor to get the name, leaving us withONG_CROSS
.This can be fixed by moving the colon and left parenthesis checks before the semicolon check in
MemberInfo.parse
.The text was updated successfully, but these errors were encountered: