Skip to content

Commit

Permalink
Fix L being dropped from @shadow's (#154)
Browse files Browse the repository at this point in the history
Fixes #134
  • Loading branch information
IThundxr authored Oct 26, 2024
1 parent c067634 commit ec76ae4
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -883,16 +883,6 @@ public static MemberInfo parse(final String input, final ISelectorContext contex
if (context != null) {
name = context.remap(name);
}

int lastDotPos = name.lastIndexOf('.');
int semiColonPos = name.indexOf(';');
if (lastDotPos > -1) {
owner = name.substring(0, lastDotPos).replace('.', '/');
name = name.substring(lastDotPos + 1);
} else if (semiColonPos > -1 && name.startsWith("L")) {
owner = name.substring(1, semiColonPos).replace('.', '/');
name = name.substring(semiColonPos + 1);
}

int parenPos = name.indexOf('(');
int colonPos = name.indexOf(':');
Expand All @@ -904,6 +894,16 @@ public static MemberInfo parse(final String input, final ISelectorContext contex
name = name.substring(0, colonPos);
}

int lastDotPos = name.lastIndexOf('.');
int semiColonPos = name.indexOf(';');
if (lastDotPos > -1) {
owner = name.substring(0, lastDotPos).replace('.', '/');
name = name.substring(lastDotPos + 1);
} else if (semiColonPos > -1 && name.startsWith("L")) {
owner = name.substring(1, semiColonPos).replace('.', '/');
name = name.substring(semiColonPos + 1);
}

if ((name.indexOf('/') > -1 || name.indexOf('.') > -1) && owner == null) {
owner = name;
name = "";
Expand Down

0 comments on commit ec76ae4

Please sign in to comment.