Commit ff3adc93 by ys

bug修复

parent eae6585f
......@@ -2,6 +2,7 @@ package com.tbyf.util;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.deploy.util.StringUtils;
import okhttp3.FormBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
......@@ -98,8 +99,17 @@ public class XxlJobAdminClient {
ResponseBody responseBody = response.body();
if (responseBody != null) {
Result result = objectMapper.readValue(responseBody.string(), Result.class);
String jobId = (String) result.getContent();
list.add(Integer.parseInt(jobId));
String jobIdStr = (String) result.getContent();
if (jobIdStr == null) {
list.add(null);
} else {
try {
int jobId = Integer.parseInt(jobIdStr);
list.add(jobId);
} catch (NumberFormatException e) {
list.add(null);
}
}
}
}).get(0);
} catch (Exception e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment