Sho SHIMIZU

Move variable declarations out of the loop

Change-Id: I7d89e942e459e65838282f0c7dc9a1399c4af166
......@@ -120,15 +120,15 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical
// Calculate available light paths
Set<Path> paths = getOpticalPaths(intent);
// Static or dynamic lambda allocation
String staticLambda = srcPort.annotations().value(AnnotationKeys.STATIC_LAMBDA);
OchPort srcOchPort = (OchPort) srcPort;
OchPort dstOchPort = (OchPort) dstPort;
OchSignal ochSignal;
// Use first path that can be successfully reserved
for (Path path : paths) {
// Static or dynamic lambda allocation
String staticLambda = srcPort.annotations().value(AnnotationKeys.STATIC_LAMBDA);
OchPort srcOchPort = (OchPort) srcPort;
OchPort dstOchPort = (OchPort) dstPort;
OchSignal ochSignal;
// FIXME: need to actually reserve the lambda for static lambda's
if (staticLambda != null) {
ochSignal = new OchSignal(Frequency.ofHz(Long.parseLong(staticLambda)),
......