summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
0e4f5df)
JIRA: TRNSPRTPCE:758
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I49fe0a517fd7c57616ddd32697cd4ab8fd931085
private Integer nrgContainsClientAndNetwork(List<NodeRuleGroup> nrgList, Uuid clientNepUuid, Uuid networkNepUuid) {
// 1 NRG should at least contain the NEP of interest in the NEP List
private Integer nrgContainsClientAndNetwork(List<NodeRuleGroup> nrgList, Uuid clientNepUuid, Uuid networkNepUuid) {
// 1 NRG should at least contain the NEP of interest in the NEP List
- Boolean foundClient = false;
- Boolean foundNetwork = false;
Integer indexNrg = 0;
for (NodeRuleGroup nrg : nrgList) {
Integer indexNrg = 0;
for (NodeRuleGroup nrg : nrgList) {
+ Boolean foundClient = false;
+ Boolean foundNetwork = false;
for (NodeEdgePoint nep : nrg.nonnullNodeEdgePoint().values()) {
for (NodeEdgePoint nep : nrg.nonnullNodeEdgePoint().values()) {
- if (nep.getNodeEdgePointUuid().equals(clientNepUuid)) {
- foundClient = true;
- } else if (nep.getNodeEdgePointUuid().equals(networkNepUuid)) {
- foundNetwork = true;
- }
+ foundClient = foundClient || nep.getNodeEdgePointUuid().equals(clientNepUuid);
+ foundNetwork = foundNetwork || nep.getNodeEdgePointUuid().equals(networkNepUuid);
}
if (foundClient && foundNetwork) {
}
if (foundClient && foundNetwork) {
- break;
- } else {
- foundClient = false;
- foundNetwork = false;
- if (foundClient && foundNetwork) {
- return indexNrg;
- }