fix/improve name in some cases
All checks were successful
Publish to snapshot maven / build (push) Successful in 15s
All checks were successful
Publish to snapshot maven / build (push) Successful in 15s
This commit is contained in:
parent
2a3c244d0c
commit
7005d47d1e
|
@ -54,9 +54,7 @@ public class ParameterMethodRemapper extends MethodRemapper {
|
|||
}
|
||||
newName = nameCopy + ++count;
|
||||
}
|
||||
|
||||
usedLocalNames.add(newName);
|
||||
System.out.println("new name for: "+descriptor+" "+signature+" "+newName);
|
||||
return newName;
|
||||
}
|
||||
|
||||
|
@ -70,7 +68,13 @@ public class ParameterMethodRemapper extends MethodRemapper {
|
|||
case 'F' -> "f";
|
||||
case 'J' -> "l";
|
||||
case 'Z' -> "bl";
|
||||
case '[' -> Type.getType(descriptor).getElementType().getClassName() + "s";
|
||||
case '[' -> {
|
||||
Type type = Type.getType(descriptor).getElementType();
|
||||
if (type.getSort() == Type.OBJECT) {
|
||||
yield convertDescriptor(type.getInternalName()) + "s";
|
||||
}
|
||||
yield type.getClassName() + "s";
|
||||
}
|
||||
default -> {
|
||||
String name = cleanType(descriptor);
|
||||
name = Character.toLowerCase(name.charAt(0)) + name.substring(1);
|
||||
|
@ -93,7 +97,7 @@ public class ParameterMethodRemapper extends MethodRemapper {
|
|||
cleaned = cleaned.substring(cleaned.lastIndexOf('$') + 1);
|
||||
}
|
||||
|
||||
cleaned = cleaned.replaceAll("\\[]", "").replace(";", "");
|
||||
cleaned = cleaned.replaceAll("\\[]", "").replaceAll("(.*)\\d.*", "$1").replace(";", "");
|
||||
|
||||
return cleaned;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue