Browse Source
Merge in DESIGN/design from ~HENRY.WANG/design:release/11.0 to release/11.0 * commit '3d43b762187584ad75dc642ec460226d57fbf65f': KERNEL-11531 修改下设计,ColoneCollector中触发clone() KERNEL-11531 数据链接越权漏洞调用com.fr.invoke.ClassHelper中遍历搜索对象存在空间时间效率问题导致宕机newui
Henry.Wang
2 years ago
2 changed files with 65 additions and 52 deletions
@ -0,0 +1,37 @@
|
||||
package com.fr.design.mainframe.authority; |
||||
|
||||
import com.fr.base.CloneCollector; |
||||
import com.fr.base.Formula; |
||||
import com.fr.data.impl.NameDatabaseConnection; |
||||
import com.fr.data.impl.NameTableData; |
||||
import com.fr.report.cell.cellattr.core.group.DSColumn; |
||||
import com.fr.stable.FCloneable; |
||||
|
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
public class AuthorityTargetObjectCollector extends CloneCollector { |
||||
List<Object> targetObject = new ArrayList<>(); |
||||
|
||||
public AuthorityTargetObjectCollector(FCloneable rootObject) { |
||||
super(rootObject); |
||||
} |
||||
|
||||
@Override |
||||
public void collect(Object object) { |
||||
if (object instanceof DSColumn || object instanceof Formula |
||||
|| object instanceof NameDatabaseConnection || object instanceof NameTableData) { |
||||
targetObject.add(object); |
||||
} |
||||
} |
||||
|
||||
public List<Object> collectTargetObject() { |
||||
CloneCollector.setCollector(this); |
||||
this.targetObject = new ArrayList<>(); |
||||
this.collect(); |
||||
CloneCollector.clearCollector(); |
||||
return targetObject; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue