Sho SHIMIZU

Move variable declarations out of the loop

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