mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
修复Optional.of异常问题
This commit is contained in:
@@ -154,9 +154,9 @@ public class DocManagerImpl implements DocManager {
|
|||||||
|
|
||||||
private String getResponseRef(JSONObject docInfo) {
|
private String getResponseRef(JSONObject docInfo) {
|
||||||
String ref = Optional.ofNullable(docInfo.getJSONObject("responses"))
|
String ref = Optional.ofNullable(docInfo.getJSONObject("responses"))
|
||||||
.flatMap(jsonObject -> Optional.of(jsonObject.getJSONObject("200")))
|
.flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("200")))
|
||||||
.flatMap(jsonObject -> Optional.of(jsonObject.getJSONObject("schema")))
|
.flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("schema")))
|
||||||
.flatMap(jsonObject -> Optional.of(jsonObject.getString("originalRef")))
|
.flatMap(jsonObject -> Optional.ofNullable(jsonObject.getString("originalRef")))
|
||||||
.orElse("");
|
.orElse("");
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user