xjar icon indicating copy to clipboard operation
xjar copied to clipboard

加密后反射异常

Open cyw3 opened this issue 5 years ago • 2 comments

这边有个jar包使用了反射,加密之后,getTypesAnnotatedWith()或者getSubTypesOf()均返回[]空Set。

而未加密前是能够正常返回对应的Set,不为空Set。

cyw3 avatar Nov 10 '20 02:11 cyw3

同问,这个问题现在有遇到并且已经解决的吗?

cxx8611629 avatar Jan 26 '21 07:01 cxx8611629

Xjar 是通过扩展ClassLoader 来实现的,使用reflections 框架拿不到值,可以使用ClassLoader扫描的方式来处理,参考:https://xiuxiuing.blog.csdn.net/article/details/118800482

xiuxiuing avatar Jul 16 '21 08:07 xiuxiuing