提交 6d57850d 编写于 作者: ibiz4j's avatar ibiz4j

修改fastjson 解析linkedHashSet的bug

上级 dc30d6b1
...@@ -269,7 +269,7 @@ public class DABuildExService extends DABuildServiceImpl { ...@@ -269,7 +269,7 @@ public class DABuildExService extends DABuildServiceImpl {
ruleIds.add(ruleItem.getRuleId()); ruleIds.add(ruleItem.getRuleId());
} }
if((!StringUtils.isEmpty(ruleItem.getCond()))&&ruleItem.getCond().startsWith("[")) if((!StringUtils.isEmpty(ruleItem.getCond()))&&ruleItem.getCond().startsWith("["))
fillpropertys.addAll(JSON.toJavaObject(JSON.parseArray(ruleItem.getCond()), LinkedHashSet.class)); fillpropertys.addAll(JSON.toJavaObject(JSON.parseArray(ruleItem.getCond()), List.class));
}); });
Assert.notEmpty(ruleIds,"构建数据失败:无有效规则"); Assert.notEmpty(ruleIds,"构建数据失败:无有效规则");
...@@ -328,5 +328,7 @@ public class DABuildExService extends DABuildServiceImpl { ...@@ -328,5 +328,7 @@ public class DABuildExService extends DABuildServiceImpl {
public boolean update(DABuild et) { public boolean update(DABuild et) {
return super.update(et); return super.update(et);
} }
} }
...@@ -215,7 +215,7 @@ public class RuleEngineExService extends RuleEngineServiceImpl { ...@@ -215,7 +215,7 @@ public class RuleEngineExService extends RuleEngineServiceImpl {
rules.add(path); rules.add(path);
} }
if((!StringUtils.isEmpty(ruleItem.getCond()))&&ruleItem.getCond().startsWith("[")) if((!StringUtils.isEmpty(ruleItem.getCond()))&&ruleItem.getCond().startsWith("["))
fillpropertys.addAll(JSON.toJavaObject(JSON.parseArray(ruleItem.getCond()),LinkedHashSet.class)); fillpropertys.addAll(JSON.toJavaObject(JSON.parseArray(ruleItem.getCond()),List.class));
}); });
dataModel.getAllProperty().forEach(prop->{ dataModel.getAllProperty().forEach(prop->{
if(fillpropertys.contains(prop.getPropertyName())) if(fillpropertys.contains(prop.getPropertyName()))
......
...@@ -474,7 +474,7 @@ public class RuleItemExService extends RuleItemServiceImpl { ...@@ -474,7 +474,7 @@ public class RuleItemExService extends RuleItemServiceImpl {
rules.add(path); rules.add(path);
} }
if((!StringUtils.isEmpty(et.getCond()))&&et.getCond().startsWith("[")) if((!StringUtils.isEmpty(et.getCond()))&&et.getCond().startsWith("["))
fillpropertys.addAll(JSON.toJavaObject(JSON.parseArray(et.getCond()),LinkedHashSet.class)); fillpropertys.addAll(JSON.toJavaObject(JSON.parseArray(et.getCond()),List.class));
dataModel.getAllProperty().forEach(prop->{ dataModel.getAllProperty().forEach(prop->{
if(fillpropertys.contains(prop.getPropertyName())) if(fillpropertys.contains(prop.getPropertyName()))
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册