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