Move variable definition close to line using the variable
Change-Id: Icf91b863af766ec4d8869208a64bfe68805c02d0
Showing
1 changed file
with
1 additions
and
3 deletions
| ... | @@ -196,7 +196,6 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu | ... | @@ -196,7 +196,6 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu |
| 196 | // Check if both devices support multiplexing (usage of TributarySlots) | 196 | // Check if both devices support multiplexing (usage of TributarySlots) |
| 197 | boolean multiplexingSupported = isMultiplexingSupported(intent); | 197 | boolean multiplexingSupported = isMultiplexingSupported(intent); |
| 198 | 198 | ||
| 199 | - LinkedList<Intent> intents = new LinkedList<>(); | ||
| 200 | // slots are used only for devices supporting multiplexing | 199 | // slots are used only for devices supporting multiplexing |
| 201 | Set<TributarySlot> slots = Collections.emptySet(); | 200 | Set<TributarySlot> slots = Collections.emptySet(); |
| 202 | 201 | ||
| ... | @@ -261,9 +260,8 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu | ... | @@ -261,9 +260,8 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu |
| 261 | 260 | ||
| 262 | // Save circuit to connectivity intent mapping | 261 | // Save circuit to connectivity intent mapping |
| 263 | intentSetMultimap.allocateMapping(connIntent.id(), intent.id()); | 262 | intentSetMultimap.allocateMapping(connIntent.id(), intent.id()); |
| 264 | - intents.add(circuitIntent); | ||
| 265 | 263 | ||
| 266 | - return intents; | 264 | + return ImmutableList.of(circuitIntent); |
| 267 | } | 265 | } |
| 268 | 266 | ||
| 269 | /** | 267 | /** | ... | ... |
-
Please register or login to post a comment