added MPE checks in the mergeOAFDataInfo method
This commit is contained in:
parent
b073935a64
commit
ffa6bbf392
|
@ -70,9 +70,14 @@ public abstract class Oaf implements Serializable {
|
|||
}
|
||||
|
||||
public void mergeOAFDataInfo(Oaf o) {
|
||||
|
||||
if (o.getDataInfo() != null && (compareTrust(this, o) < 0 || this.getDataInfo().getInvisible()))
|
||||
dataInfo = o.getDataInfo();
|
||||
Optional.ofNullable(o)
|
||||
.ifPresent(other -> Optional.ofNullable(other.getDataInfo())
|
||||
.ifPresent(otherDataInfo -> Optional.ofNullable(this.getDataInfo())
|
||||
.ifPresent(thisDataInfo -> {
|
||||
if (compareTrust(this, other) < 0 || thisDataInfo.getInvisible()) {
|
||||
setDataInfo(otherDataInfo);
|
||||
}
|
||||
})));
|
||||
}
|
||||
|
||||
protected String extractTrust(Oaf e) {
|
||||
|
|
Loading…
Reference in New Issue