debug 了解一下,你该去github 提 issues。研究一下代码
class XStreamTransformer {
static int num = 1 / 0;
}
public class Sample {
public static void main(String[] args) throws InterruptedException {
Sample sample = new Sample();
sample.getClassWithInitErrors();
}
private void getClassWithInitErrors() throws InterruptedException {
Thread.sleep(300);
try {
new XStreamTransformer();
} catch (Throwable t) {
t.printStackTrace();
}
Thread.sleep(300);
try {
new XStreamTransformer();
} catch (Throwable t) {
t.printStackTrace();
}
Thread.sleep(300);
try {
new XStreamTransformer();
} catch (Throwable t) {
t.printStackTrace();
}
}
}