X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=pce%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fpce%2FPceSendingPceRPCs.java;h=a897b86f96d26df4f12d44a86e7421934a9b31d3;hb=922e31d0c09ed2f189362381cd19e6c5dc69a949;hp=843aebfab947dfbcf181f15188121d21c1bfc0be;hpb=1666b0e4a2b13f2a2cef13475668edd62fa6c173;p=transportpce.git diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/PceSendingPceRPCs.java b/pce/src/main/java/org/opendaylight/transportpce/pce/PceSendingPceRPCs.java index 843aebfab..a897b86f9 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/PceSendingPceRPCs.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/PceSendingPceRPCs.java @@ -103,7 +103,7 @@ public class PceSendingPceRPCs { // TODO fix. This is quick workaround for algorithm problem if ((rc.getLocalCause() == LocalCause.TOO_HIGH_LATENCY) && (pceHardConstraints.getPceMetrics() == PceMetric.HopCount) - && (pceHardConstraints.getMaxLatency() != (long) -1)) { + && (pceHardConstraints.getMaxLatency() != -1)) { pceHardConstraints.setPceMetrics(PceMetric.PropagationDelay); graph = patchRerunGraph(graph, pceHardConstraints, pceSoftConstraints); @@ -129,12 +129,12 @@ public class PceSendingPceRPCs { LOG.info("setPathDescription ..."); AToZDirection atoz = rc.getAtoZDirection(); ZToADirection ztoa = rc.getZtoADirection(); - if (atoz == null || atoz.getAToZ() == null) { + if ((atoz == null) || (atoz.getAToZ() == null)) { rc.setRC("400"); LOG.error("In pathComputation empty atoz path after description: result = {}", rc.toString()); return; } - if (ztoa == null || ztoa.getZToA() == null) { + if ((ztoa == null) || (ztoa.getZToA() == null)) { rc.setRC("400"); LOG.error("In pathComputation empty ztoa path after description: result = {}", rc.toString()); return; @@ -145,11 +145,10 @@ public class PceSendingPceRPCs { LOG.info("In pathComputation Graph is Found"); } - private PceGraph patchRerunGraph(PceGraph graph, PceConstraints pceHardConstraints, - PceConstraints pceSoftConstraints) { + private PceGraph patchRerunGraph(PceGraph graph, PceConstraints pceHardCons, PceConstraints pceSoftCons) { LOG.info("In pathComputation patchRerunGraph : rerun Graph with metric = PROPAGATION-DELAY "); - graph.setConstrains(pceHardConstraints, pceSoftConstraints); + graph.setConstrains(pceHardCons, pceSoftCons); graph.calcPath(); return graph;