-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
3.1.2版本 jad命令在jdk低于1.8的环境下异常 #851
Comments
3.1.2版本里升级了cfr,然后在反编译时用 CfrDriver driver = new CfrDriver.Builder().withOptions(options).withOutputSink(mySink).build();
driver.analyse(Collections.singletonList(classFilePath)); 但cfr里调用了 根本原因是 jdk 6/7 和 jdk8的 Collections.sort 的实现不同导致的。 jdk7下面的实现是: public static <T extends Comparable<? super T>> void sort(List<T> list) {
Object[] a = list.toArray();
Arrays.sort(a);
ListIterator<T> i = list.listIterator();
for (int j=0; j<a.length; j++) {
i.next();
i.set((T)a[j]);
}
} 这里的 在jdk8里的实现是: public static <T extends Comparable<? super T>> void sort(List<T> list) {
list.sort(null);
} 实际上 public static <T> List<T> singletonList(T o) {
return new SingletonList<>(o);
} 它的 sort函数是空的,所以在jdk8下面可以正常工作: /**
* @serial include
*/
private static class SingletonList<E>
extends AbstractList<E>
implements RandomAccess, Serializable {
@Override
public void sort(Comparator<? super E> c) {
} |
遇到同样的问题,重新下载新的jar包,现在已经解决了 |
环境信息
arthas-boot.jar
或者as.sh
的版本: 3.1.2arthas-boot
的版本: 1.7.0_80重现问题的步骤
期望的结果
What do you expected from the above steps?
实际运行的结果
实际运行结果,最好有详细的日志,异常栈。尽量贴文本。
The text was updated successfully, but these errors were encountered: