You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
该方法多个线程调用后,会出现空指针异常。
下面是测试用例:
public class Demo {
public static void main(String[] args) {
for (int i=0 ; i<1000; i++){
test1();
}
}
public static void test1(){
Thread thread = new Thread(new Runnable() { @OverRide
public void run() {
MchBaseResult baseResult = new MchBaseResult();
baseResult.setReturn_code("SUCCESS");
baseResult.setReturn_msg("OK");
String s = XMLConverUtil.convertToXML(baseResult);
System.out.println(s);
}
});
thread.start();
}
}
The text was updated successfully, but these errors were encountered:
kayuu0810
changed the title
weixin.popular.util.XMLConverUtil#convertToXML
weixin.popular.util.XMLConverUtil#convertToXML 或 weixin.popular.util.XMLConverUtil#convertToObject(java.lang.Class<T>, java.lang.String)
Aug 27, 2018
该方法多个线程调用后,会出现空指针异常。
下面是测试用例:
public class Demo {
public static void main(String[] args) {
for (int i=0 ; i<1000; i++){
test1();
}
}
public static void test1(){
Thread thread = new Thread(new Runnable() {
@OverRide
public void run() {
MchBaseResult baseResult = new MchBaseResult();
baseResult.setReturn_code("SUCCESS");
baseResult.setReturn_msg("OK");
String s = XMLConverUtil.convertToXML(baseResult);
System.out.println(s);
}
});
thread.start();
}
}
The text was updated successfully, but these errors were encountered: