【fix sonar】SwitchProperty文件
This commit is contained in:
+3
-3
@@ -1,5 +1,6 @@
|
||||
package com.jero.common.util.jsonschema.validate;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.util.jsonschema.CommonProperty;
|
||||
@@ -27,15 +28,14 @@ public class SwitchProperty extends CommonProperty {
|
||||
this.title = title;
|
||||
this.extendStr = extendStr;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPropertyJson() {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("key",getKey());
|
||||
JSONObject prop = getCommonJson();
|
||||
JSONArray array = new JSONArray();
|
||||
if(extendStr!=null) {
|
||||
array = JSONArray.parseArray(extendStr);
|
||||
JSONArray array = JSON.parseArray(extendStr);
|
||||
prop.put("extendOption",array);
|
||||
}
|
||||
map.put("prop",prop);
|
||||
|
||||
Reference in New Issue
Block a user