Avoid FormBinder.getCurrentRows
It is potentially unsafe. FEA: ItEr75S23FixAllocationModel
This commit is contained in:
parent
0053c5e5d2
commit
cfc7c01a1e
3 changed files with 16 additions and 13 deletions
|
|
@ -760,4 +760,9 @@ public abstract class AllocationRow {
|
|||
});
|
||||
}
|
||||
|
||||
public boolean isNotFlat() {
|
||||
return getOrigin() != null
|
||||
&& getOrigin().getAssignmentFunction() != null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -906,4 +906,14 @@ public class FormBinder {
|
|||
this.behaviour = behaviour;
|
||||
}
|
||||
|
||||
public boolean isAnyNotFlat() {
|
||||
for (AllocationRow allocationRow : allocationRowsHandler
|
||||
.getCurrentRows()) {
|
||||
if (allocationRow.isNotFlat()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -720,19 +720,7 @@ public class ResourceAllocationController extends GenericForwardComposer {
|
|||
}
|
||||
|
||||
public boolean isAnyNotFlat() {
|
||||
if (formBinder == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
List<AllocationRow> currentRows = formBinder.getCurrentRows();
|
||||
for (AllocationRow allocationRow : currentRows) {
|
||||
if ((allocationRow.getOrigin() != null)
|
||||
&& (allocationRow.getOrigin().getAssignmentFunction() != null)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return formBinder != null && formBinder.isAnyNotFlat();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue