|
|
@ -176,33 +176,32 @@ public final class TypedRemapper extends Remapper { |
|
|
|
return mapping; |
|
|
|
return mapping; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static Map<MemberRef, String> createMethodMapping(ClassPath classPath, DisjointSet<MemberRef> disjointSet) { |
|
|
|
public static boolean isMethodImmutable(ClassPath classPath, DisjointSet.Partition<MemberRef> partition) { |
|
|
|
var mapping = new HashMap<MemberRef, String>(); |
|
|
|
|
|
|
|
var id = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (var partition : disjointSet) { |
|
|
|
|
|
|
|
boolean skip = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (var method : partition) { |
|
|
|
for (var method : partition) { |
|
|
|
var clazz = classPath.get(method.getOwner()); |
|
|
|
var clazz = classPath.get(method.getOwner()); |
|
|
|
|
|
|
|
|
|
|
|
if (EXCLUDED_METHODS.contains(method.getName())) { |
|
|
|
if (EXCLUDED_METHODS.contains(method.getName())) { |
|
|
|
skip = true; |
|
|
|
return true; |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (clazz.isDependency()) { |
|
|
|
if (clazz.isDependency()) { |
|
|
|
skip = true; |
|
|
|
return true; |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (clazz.isNative(new MemberDesc(method.getName(), method.getDesc()))) { |
|
|
|
if (clazz.isNative(new MemberDesc(method.getName(), method.getDesc()))) { |
|
|
|
skip = true; |
|
|
|
return true; |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (skip) { |
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static Map<MemberRef, String> createMethodMapping(ClassPath classPath, DisjointSet<MemberRef> disjointSet) { |
|
|
|
|
|
|
|
var mapping = new HashMap<MemberRef, String>(); |
|
|
|
|
|
|
|
var id = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (var partition : disjointSet) { |
|
|
|
|
|
|
|
if (isMethodImmutable(classPath, partition)) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|