|
|
@@ -16,6 +16,7 @@ import java.util.List;
|
|
|
/**
|
|
|
* @author wind
|
|
|
*/
|
|
|
+@SuppressWarnings("AlibabaUndefineMagicConstant")
|
|
|
@Service
|
|
|
public class DevcloudServiceImpl implements DevcloudService {
|
|
|
private final String devcloudUri = "https://devcloud-server.seec.seecoder.cn";
|
|
|
@@ -124,11 +125,14 @@ public class DevcloudServiceImpl implements DevcloudService {
|
|
|
} catch (Exception e) {
|
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
|
- assert result != null;
|
|
|
- if (result.containsKey("code") && result.getInteger("code") == 200) {
|
|
|
- return result.getJSONObject("data");
|
|
|
- } else {
|
|
|
- throw CustomErrorException.devcloudError(result.toString());
|
|
|
+ try {
|
|
|
+ if (result.containsKey("code") && result.getInteger("code") == 200) {
|
|
|
+ return result.getJSONObject("data");
|
|
|
+ } else {
|
|
|
+ throw CustomErrorException.devcloudError(result.toString());
|
|
|
+ }
|
|
|
+ } catch (NullPointerException e) {
|
|
|
+ throw CustomErrorException.devcloudError(null);
|
|
|
}
|
|
|
}
|
|
|
}
|