Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JAVA] JAR 包无法自动反编译导致编译警告 #1

Open
LztCode opened this issue Jun 27, 2024 · 6 comments
Open

[JAVA] JAR 包无法自动反编译导致编译警告 #1

LztCode opened this issue Jun 27, 2024 · 6 comments

Comments

@LztCode
Copy link

LztCode commented Jun 27, 2024

1、对Maven依赖的jar包,反编译出来的代码,ssa会报错,我推测可能是AOP切片的代码导致递归没有终止条件
这个项目里面
https://gitee.com/mingSoft/MCMS
ms-base、ms-basic、ms-mdiy这几个.jar包

@VillanCh
Copy link
Contributor

感谢师傅反馈,目前只编译项目源码是可以的,jar 包的部分目前还没有针对优化

image

@LztCode
Copy link
Author

LztCode commented Jun 27, 2024

是的,项目源码可以编译成功,但是缺失jar包那部分源码,代码分析效果不好,希望能够优化一下

@VillanCh
Copy link
Contributor

完整带 JAR 包的项目的优化,还在进行中,可以先按下面基础案例来走一下,看看结果

yak sf -p test --sf 'request.getParameter(* #-> ) --> '

可以执行这个,结果会有一个 dot 图,大致分析参数都在做什么,渲染后是

strict digraph {
    rankdir = "BT";
    n12 [label="t2569642: request=t2569642"]
    n17 [label="#2563169.getParameter"]
    n8 [label="request"]
    n14 [label="t2562679: generateFileName=#2562670.getParameter(t2562678)"]
    n25 [label="[phi]: contentUpdateTime"]
    n21 [label="t2563193: #2563190.setBeginTime(t2563183)"]
    n22 [label="t2563200: contentUpdateTime=#2563197.parse(t2563183)"]
    n31 [label="t2562678: \"position\""]
    n37 [label="t2563418: #2563415.generateBasic(t2563333,htmlDir,contentUpdateTime)"]
    n1 [label="t2562674: \"url\""]
    n2 [label="#2562670.getParameter"]
    n4 [label="t2562675: tmpFileName=#2562670.getParameter(t2562674)"]
    n6 [label="t2562800: #2562797.generate(t2562675,t2562679,htmlDir)"]
    n10 [label="[phi]: request"]
    n19 [label="t2563183: dateTime=#2563169.getParameter(t2563182)"]
    n34 [label="t2563182: \"dateTime\""]
    n8 -> n17 [label="step[2]: search getParameter", color="red", fontcolor="red", penwidth="3.0", label="step[2]: search getParameter"]
    n6 -> n4 [label=""]
    n10 -> n2 [label="step[2]: search getParameter", color="red", fontcolor="red", penwidth="3.0", label="step[2]: search getParameter"]
    n25 -> n22 [label=""]
    n2 -> n31 [label="step[3]: all-actual-args", color="red", fontcolor="red", penwidth="3.0", label="step[3]: all-actual-args"]
    n2 -> n1 [label="step[3]: all-actual-args", color="red", fontcolor="red", penwidth="3.0", label="step[3]: all-actual-args"]
    n4 -> n2 [label=""]
    n14 -> n2 [label=""]
    n17 -> n1 [label="step[3]: all-actual-args", color="red", fontcolor="red", penwidth="3.0"]
    n22 -> n19 [label=""]
    n12 -> n17 [label="step[2]: search getParameter", color="red", fontcolor="red", penwidth="3.0"]
    n17 -> n31 [label="step[3]: all-actual-args", color="red", fontcolor="red", penwidth="3.0"]
    n2 -> n34 [label="step[3]: all-actual-args", color="red", fontcolor="red", penwidth="3.0", label="step[3]: all-actual-args"]
    n8 -> n2 [label="step[2]: search getParameter", color="red", fontcolor="red", penwidth="3.0", label="step[2]: search getParameter"]
    n12 -> n2 [label="step[2]: search getParameter", color="red", fontcolor="red", penwidth="3.0", label="step[2]: search getParameter"]
    n17 -> n34 [label="step[3]: all-actual-args", color="red", fontcolor="red", penwidth="3.0"]
    n21 -> n19 [label=""]
    n25 -> n22 [label=""]
    n10 -> n17 [label="step[2]: search getParameter", color="red", fontcolor="red", penwidth="3.0"]
    n6 -> n14 [label=""]
    n19 -> n17 [label=""]
}

graphviz (1)

可以大致看到 generate html 那边可能会需要看一下,当然也可以用其他的小技巧去从注解开始

@VillanCh VillanCh changed the title 编译报错 [JAVA] JAR 包无法自动反编译导致编译警告 Jun 27, 2024
@VillanCh
Copy link
Contributor

可以使用最新的 1.3.4-beta5 版本可以

@LztCode
Copy link
Author

LztCode commented Jun 27, 2024

ok

@LztCode LztCode closed this as completed Jun 27, 2024
@VillanCh
Copy link
Contributor

VillanCh commented Jun 27, 2024

这个 issue 可以不关闭,pin 在顶上,在 jar 反编译做完之后应该会更新

@VillanCh VillanCh reopened this Jun 27, 2024
@VillanCh VillanCh pinned this issue Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants