Signature Process in SignatureRemapper is Broken
Hi, ASM development team.
I found a bug of RemappingSignatureAdapter contained in Remapper.
The reproduction code of bug reports a fully unknown class name
'java/lang/Object$Hoge' as a source of type mapping. This is apparent.
After my debugging of code, I think that
a pair of new API of 'SignatureVisitor.visitTypeArguments()' and
'SignatureVisitor.visitTypeArguments()' must be added, and then some refactors
around "the case '<': " in 'SignatureReader#parseType()' are required to solve
this bug.
I want to confirm the direction of solution in this project
because my plan requires a big refactor and new set of API.
// public class Cls4_ArtAnother {
//
// public static class ClsX<T>{
// public class Hoge{
// }
// }
//
// public static class ClsY extends ClsX<Object>{
// public class Tako extends ClsX<Object>.Hoge{
// }
// }
//
// }
@Test
public void testBrokenSigProc(){
//Signature of Tako class
String clssig =
"Ltestpkg/Cls4_ArtAnother$ClsX<Ljava/lang/Object;>.Hoge;";
Remapper rm = new Remapper() {
@Override
public String mapType(String type) {
if ( type.equals( "java/lang/Object$Hoge" ) ) {
System.out.println(type);
}
return super.mapType(type);
}
};
rm.mapSignature(clssig, false);
}