diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java b/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
index c1f2b640..ba0b21c0 100644
--- a/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
+++ b/xxl-job-core/src/main/java/com/xxl/job/core/thread/JobThread.java
@@ -155,7 +155,10 @@ public class JobThread extends Thread{
if (executeResult == null) {
executeResult = IJobHandler.FAIL;
} else {
- executeResult.setMsg((executeResult!=null&&executeResult.getMsg().length()>50000)?executeResult.getMsg().substring(0, 50000).concat("..."):executeResult.getMsg());
+ executeResult.setMsg(
+ (executeResult!=null&&executeResult.getMsg()!=null&&executeResult.getMsg().length()>50000)
+ ?executeResult.getMsg().substring(0, 50000).concat("...")
+ :executeResult.getMsg());
executeResult.setContent(null); // limit obj size
}
XxlJobLogger.log("
----------- xxl-job job execute end(finish) -----------
----------- ReturnT:" + executeResult);