mirror of
https://github.com/skylot/jadx.git
synced 2024-10-07 01:53:34 +00:00
fix: don't add same 'loaded from:' comment for inner classes
This commit is contained in:
parent
109dea0857
commit
e6fde48b69
@ -135,10 +135,15 @@ public class CodeGenUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void addInputFileInfo(ICodeWriter code, ClassNode node) {
|
||||
if (node.getClsData() != null && node.checkCommentsLevel(CommentsLevel.INFO)) {
|
||||
String inputFileName = node.getClsData().getInputFileName();
|
||||
public static void addInputFileInfo(ICodeWriter code, ClassNode cls) {
|
||||
if (cls.checkCommentsLevel(CommentsLevel.INFO) && cls.getClsData() != null) {
|
||||
String inputFileName = cls.getClsData().getInputFileName();
|
||||
if (inputFileName != null) {
|
||||
ClassNode declCls = cls.getDeclaringClass();
|
||||
if (declCls != null && inputFileName.equals(declCls.getClsData().getInputFileName())) {
|
||||
// don't add same comment for inner classes
|
||||
return;
|
||||
}
|
||||
code.startLine("/* loaded from: ").add(inputFileName).add(" */");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user