Committed by
Yuta HIGUCHI
Remove explicit type parameters which can be inferred
Change-Id: I62cd4df252bab6208e1b1cd37f8f8757b0cfc17e
Showing
17 changed files
with
41 additions
and
43 deletions
... | @@ -95,7 +95,7 @@ public final class PortNumber { | ... | @@ -95,7 +95,7 @@ public final class PortNumber { |
95 | 95 | ||
96 | // lazily populated Logical port number to PortNumber | 96 | // lazily populated Logical port number to PortNumber |
97 | static final Supplier<Map<Long, Logical>> LOGICAL = Suppliers.memoize(() -> { | 97 | static final Supplier<Map<Long, Logical>> LOGICAL = Suppliers.memoize(() -> { |
98 | - Builder<Long, Logical> builder = ImmutableMap.<Long, Logical>builder(); | 98 | + Builder<Long, Logical> builder = ImmutableMap.builder(); |
99 | for (Logical lp : Logical.values()) { | 99 | for (Logical lp : Logical.values()) { |
100 | builder.put(lp.number(), lp); | 100 | builder.put(lp.number(), lp); |
101 | } | 101 | } | ... | ... |
... | @@ -52,7 +52,7 @@ public class DefaultHostDescription extends AbstractDescription | ... | @@ -52,7 +52,7 @@ public class DefaultHostDescription extends AbstractDescription |
52 | public DefaultHostDescription(MacAddress mac, VlanId vlan, | 52 | public DefaultHostDescription(MacAddress mac, VlanId vlan, |
53 | HostLocation location, | 53 | HostLocation location, |
54 | SparseAnnotations... annotations) { | 54 | SparseAnnotations... annotations) { |
55 | - this(mac, vlan, location, Collections.<IpAddress>emptySet(), | 55 | + this(mac, vlan, location, Collections.emptySet(), |
56 | annotations); | 56 | annotations); |
57 | } | 57 | } |
58 | 58 | ... | ... |
... | @@ -54,7 +54,7 @@ public class VersionedTest { | ... | @@ -54,7 +54,7 @@ public class VersionedTest { |
54 | */ | 54 | */ |
55 | @Test | 55 | @Test |
56 | public void testMap() { | 56 | public void testMap() { |
57 | - Versioned<String> tempObj = stats1.<String>map(VersionedTest::transform); | 57 | + Versioned<String> tempObj = stats1.map(VersionedTest::transform); |
58 | assertThat(tempObj.value(), is("1")); | 58 | assertThat(tempObj.value(), is("1")); |
59 | } | 59 | } |
60 | 60 | ... | ... |
... | @@ -42,7 +42,7 @@ public class SimpleApplicationIdStore implements ApplicationIdStore { | ... | @@ -42,7 +42,7 @@ public class SimpleApplicationIdStore implements ApplicationIdStore { |
42 | 42 | ||
43 | @Override | 43 | @Override |
44 | public Set<ApplicationId> getAppIds() { | 44 | public Set<ApplicationId> getAppIds() { |
45 | - return ImmutableSet.<ApplicationId>copyOf(appIds.values()); | 45 | + return ImmutableSet.copyOf(appIds.values()); |
46 | } | 46 | } |
47 | 47 | ||
48 | @Override | 48 | @Override | ... | ... |
... | @@ -348,7 +348,7 @@ public class SimpleDeviceStore | ... | @@ -348,7 +348,7 @@ public class SimpleDeviceStore |
348 | // exist, it creates and registers a new one. | 348 | // exist, it creates and registers a new one. |
349 | private ConcurrentMap<PortNumber, Port> getPortMap(DeviceId deviceId) { | 349 | private ConcurrentMap<PortNumber, Port> getPortMap(DeviceId deviceId) { |
350 | return createIfAbsentUnchecked(devicePorts, deviceId, | 350 | return createIfAbsentUnchecked(devicePorts, deviceId, |
351 | - NewConcurrentHashMap.<PortNumber, Port>ifNeeded()); | 351 | + NewConcurrentHashMap.ifNeeded()); |
352 | } | 352 | } |
353 | 353 | ||
354 | private Map<ProviderId, DeviceDescriptions> getOrCreateDeviceDescriptions( | 354 | private Map<ProviderId, DeviceDescriptions> getOrCreateDeviceDescriptions( | ... | ... |
... | @@ -265,7 +265,7 @@ public class SimpleDeviceStoreTest { | ... | @@ -265,7 +265,7 @@ public class SimpleDeviceStoreTest { |
265 | @Test | 265 | @Test |
266 | public final void testUpdatePorts() { | 266 | public final void testUpdatePorts() { |
267 | putDevice(DID1, SW1); | 267 | putDevice(DID1, SW1); |
268 | - List<PortDescription> pds = Arrays.<PortDescription>asList( | 268 | + List<PortDescription> pds = Arrays.asList( |
269 | new DefaultPortDescription(P1, true), | 269 | new DefaultPortDescription(P1, true), |
270 | new DefaultPortDescription(P2, true) | 270 | new DefaultPortDescription(P2, true) |
271 | ); | 271 | ); |
... | @@ -283,7 +283,7 @@ public class SimpleDeviceStoreTest { | ... | @@ -283,7 +283,7 @@ public class SimpleDeviceStoreTest { |
283 | assertTrue("Event for all expectedport appeared", expectedPorts.isEmpty()); | 283 | assertTrue("Event for all expectedport appeared", expectedPorts.isEmpty()); |
284 | 284 | ||
285 | 285 | ||
286 | - List<PortDescription> pds2 = Arrays.<PortDescription>asList( | 286 | + List<PortDescription> pds2 = Arrays.asList( |
287 | new DefaultPortDescription(P1, false), | 287 | new DefaultPortDescription(P1, false), |
288 | new DefaultPortDescription(P2, true), | 288 | new DefaultPortDescription(P2, true), |
289 | new DefaultPortDescription(P3, true) | 289 | new DefaultPortDescription(P3, true) |
... | @@ -308,7 +308,7 @@ public class SimpleDeviceStoreTest { | ... | @@ -308,7 +308,7 @@ public class SimpleDeviceStoreTest { |
308 | } | 308 | } |
309 | } | 309 | } |
310 | 310 | ||
311 | - List<PortDescription> pds3 = Arrays.<PortDescription>asList( | 311 | + List<PortDescription> pds3 = Arrays.asList( |
312 | new DefaultPortDescription(P1, false), | 312 | new DefaultPortDescription(P1, false), |
313 | new DefaultPortDescription(P2, true) | 313 | new DefaultPortDescription(P2, true) |
314 | ); | 314 | ); |
... | @@ -334,7 +334,7 @@ public class SimpleDeviceStoreTest { | ... | @@ -334,7 +334,7 @@ public class SimpleDeviceStoreTest { |
334 | @Test | 334 | @Test |
335 | public final void testUpdatePortStatus() { | 335 | public final void testUpdatePortStatus() { |
336 | putDevice(DID1, SW1); | 336 | putDevice(DID1, SW1); |
337 | - List<PortDescription> pds = Arrays.<PortDescription>asList( | 337 | + List<PortDescription> pds = Arrays.asList( |
338 | new DefaultPortDescription(P1, true) | 338 | new DefaultPortDescription(P1, true) |
339 | ); | 339 | ); |
340 | deviceStore.updatePorts(PID, DID1, pds); | 340 | deviceStore.updatePorts(PID, DID1, pds); |
... | @@ -352,7 +352,7 @@ public class SimpleDeviceStoreTest { | ... | @@ -352,7 +352,7 @@ public class SimpleDeviceStoreTest { |
352 | public final void testUpdatePortStatusAncillary() { | 352 | public final void testUpdatePortStatusAncillary() { |
353 | putDeviceAncillary(DID1, SW1); | 353 | putDeviceAncillary(DID1, SW1); |
354 | putDevice(DID1, SW1); | 354 | putDevice(DID1, SW1); |
355 | - List<PortDescription> pds = Arrays.<PortDescription>asList( | 355 | + List<PortDescription> pds = Arrays.asList( |
356 | new DefaultPortDescription(P1, true, A1) | 356 | new DefaultPortDescription(P1, true, A1) |
357 | ); | 357 | ); |
358 | deviceStore.updatePorts(PID, DID1, pds); | 358 | deviceStore.updatePorts(PID, DID1, pds); |
... | @@ -416,7 +416,7 @@ public class SimpleDeviceStoreTest { | ... | @@ -416,7 +416,7 @@ public class SimpleDeviceStoreTest { |
416 | public final void testGetPort() { | 416 | public final void testGetPort() { |
417 | putDevice(DID1, SW1); | 417 | putDevice(DID1, SW1); |
418 | putDevice(DID2, SW1); | 418 | putDevice(DID2, SW1); |
419 | - List<PortDescription> pds = Arrays.<PortDescription>asList( | 419 | + List<PortDescription> pds = Arrays.asList( |
420 | new DefaultPortDescription(P1, true), | 420 | new DefaultPortDescription(P1, true), |
421 | new DefaultPortDescription(P2, false) | 421 | new DefaultPortDescription(P2, false) |
422 | ); | 422 | ); |
... | @@ -437,7 +437,7 @@ public class SimpleDeviceStoreTest { | ... | @@ -437,7 +437,7 @@ public class SimpleDeviceStoreTest { |
437 | @Test | 437 | @Test |
438 | public final void testRemoveDevice() { | 438 | public final void testRemoveDevice() { |
439 | putDevice(DID1, SW1, A1); | 439 | putDevice(DID1, SW1, A1); |
440 | - List<PortDescription> pds = Arrays.<PortDescription>asList( | 440 | + List<PortDescription> pds = Arrays.asList( |
441 | new DefaultPortDescription(P1, true, A2) | 441 | new DefaultPortDescription(P1, true, A2) |
442 | ); | 442 | ); |
443 | deviceStore.updatePorts(PID, DID1, pds); | 443 | deviceStore.updatePorts(PID, DID1, pds); |
... | @@ -457,7 +457,7 @@ public class SimpleDeviceStoreTest { | ... | @@ -457,7 +457,7 @@ public class SimpleDeviceStoreTest { |
457 | 457 | ||
458 | // putBack Device, Port w/o annotation | 458 | // putBack Device, Port w/o annotation |
459 | putDevice(DID1, SW1); | 459 | putDevice(DID1, SW1); |
460 | - List<PortDescription> pds2 = Arrays.<PortDescription>asList( | 460 | + List<PortDescription> pds2 = Arrays.asList( |
461 | new DefaultPortDescription(P1, true) | 461 | new DefaultPortDescription(P1, true) |
462 | ); | 462 | ); |
463 | deviceStore.updatePorts(PID, DID1, pds2); | 463 | deviceStore.updatePorts(PID, DID1, pds2); | ... | ... |
... | @@ -164,7 +164,7 @@ public class SimpleFlowRuleStore | ... | @@ -164,7 +164,7 @@ public class SimpleFlowRuleStore |
164 | } | 164 | } |
165 | 165 | ||
166 | private static NewConcurrentHashMap<FlowId, List<StoredFlowEntry>> lazyEmptyFlowTable() { | 166 | private static NewConcurrentHashMap<FlowId, List<StoredFlowEntry>> lazyEmptyFlowTable() { |
167 | - return NewConcurrentHashMap.<FlowId, List<StoredFlowEntry>>ifNeeded(); | 167 | + return NewConcurrentHashMap.ifNeeded(); |
168 | } | 168 | } |
169 | 169 | ||
170 | /** | 170 | /** | ... | ... |
... | @@ -101,22 +101,22 @@ public class SimpleGroupStore | ... | @@ -101,22 +101,22 @@ public class SimpleGroupStore |
101 | 101 | ||
102 | private static NewConcurrentHashMap<GroupKey, StoredGroupEntry> | 102 | private static NewConcurrentHashMap<GroupKey, StoredGroupEntry> |
103 | lazyEmptyGroupKeyTable() { | 103 | lazyEmptyGroupKeyTable() { |
104 | - return NewConcurrentHashMap.<GroupKey, StoredGroupEntry>ifNeeded(); | 104 | + return NewConcurrentHashMap.ifNeeded(); |
105 | } | 105 | } |
106 | 106 | ||
107 | private static NewConcurrentHashMap<GroupId, StoredGroupEntry> | 107 | private static NewConcurrentHashMap<GroupId, StoredGroupEntry> |
108 | lazyEmptyGroupIdTable() { | 108 | lazyEmptyGroupIdTable() { |
109 | - return NewConcurrentHashMap.<GroupId, StoredGroupEntry>ifNeeded(); | 109 | + return NewConcurrentHashMap.ifNeeded(); |
110 | } | 110 | } |
111 | 111 | ||
112 | private static NewConcurrentHashMap<GroupKey, StoredGroupEntry> | 112 | private static NewConcurrentHashMap<GroupKey, StoredGroupEntry> |
113 | lazyEmptyPendingGroupKeyTable() { | 113 | lazyEmptyPendingGroupKeyTable() { |
114 | - return NewConcurrentHashMap.<GroupKey, StoredGroupEntry>ifNeeded(); | 114 | + return NewConcurrentHashMap.ifNeeded(); |
115 | } | 115 | } |
116 | 116 | ||
117 | private static NewConcurrentHashMap<GroupId, Group> | 117 | private static NewConcurrentHashMap<GroupId, Group> |
118 | lazyEmptyExtraneousGroupIdTable() { | 118 | lazyEmptyExtraneousGroupIdTable() { |
119 | - return NewConcurrentHashMap.<GroupId, Group>ifNeeded(); | 119 | + return NewConcurrentHashMap.ifNeeded(); |
120 | } | 120 | } |
121 | 121 | ||
122 | /** | 122 | /** | ... | ... |
... | @@ -177,7 +177,7 @@ public class SimpleHostStore | ... | @@ -177,7 +177,7 @@ public class SimpleHostStore |
177 | 177 | ||
178 | @Override | 178 | @Override |
179 | public Iterable<Host> getHosts() { | 179 | public Iterable<Host> getHosts() { |
180 | - return ImmutableSet.<Host>copyOf(hosts.values()); | 180 | + return ImmutableSet.copyOf(hosts.values()); |
181 | } | 181 | } |
182 | 182 | ||
183 | @Override | 183 | @Override | ... | ... |
... | @@ -198,7 +198,7 @@ public class DefaultTopologyProvider extends AbstractProvider | ... | @@ -198,7 +198,7 @@ public class DefaultTopologyProvider extends AbstractProvider |
198 | 198 | ||
199 | @Override | 199 | @Override |
200 | public void triggerRecompute() { | 200 | public void triggerRecompute() { |
201 | - triggerTopologyBuild(Collections.<Event>emptyList()); | 201 | + triggerTopologyBuild(Collections.emptyList()); |
202 | } | 202 | } |
203 | 203 | ||
204 | /** | 204 | /** | ... | ... |
... | @@ -37,7 +37,6 @@ import org.onosproject.net.device.DeviceListener; | ... | @@ -37,7 +37,6 @@ import org.onosproject.net.device.DeviceListener; |
37 | import org.onosproject.net.device.DeviceServiceAdapter; | 37 | import org.onosproject.net.device.DeviceServiceAdapter; |
38 | import org.onosproject.net.edge.EdgePortEvent; | 38 | import org.onosproject.net.edge.EdgePortEvent; |
39 | import org.onosproject.net.edge.EdgePortListener; | 39 | import org.onosproject.net.edge.EdgePortListener; |
40 | -import org.onosproject.net.flow.TrafficTreatment; | ||
41 | import org.onosproject.net.link.LinkEvent; | 40 | import org.onosproject.net.link.LinkEvent; |
42 | import org.onosproject.net.packet.OutboundPacket; | 41 | import org.onosproject.net.packet.OutboundPacket; |
43 | import org.onosproject.net.packet.PacketServiceAdapter; | 42 | import org.onosproject.net.packet.PacketServiceAdapter; |
... | @@ -352,7 +351,7 @@ public class EdgeManagerTest { | ... | @@ -352,7 +351,7 @@ public class EdgeManagerTest { |
352 | true))); | 351 | true))); |
353 | } | 352 | } |
354 | 353 | ||
355 | - mgr.emitPacket(ByteBuffer.wrap(arr), Optional.<TrafficTreatment>empty()); | 354 | + mgr.emitPacket(ByteBuffer.wrap(arr), Optional.empty()); |
356 | 355 | ||
357 | assertEquals("There were an unexpected number of emitted packets", | 356 | assertEquals("There were an unexpected number of emitted packets", |
358 | (totalPorts - numInfraPorts) * numDevices, packets.size()); | 357 | (totalPorts - numInfraPorts) * numDevices, packets.size()); |
... | @@ -364,7 +363,7 @@ public class EdgeManagerTest { | ... | @@ -364,7 +363,7 @@ public class EdgeManagerTest { |
364 | } | 363 | } |
365 | //Start testing emission to a specific device | 364 | //Start testing emission to a specific device |
366 | packets.clear(); | 365 | packets.clear(); |
367 | - mgr.emitPacket(NetTestTools.did(Integer.toString(1)), ByteBuffer.wrap(arr), Optional.<TrafficTreatment>empty()); | 366 | + mgr.emitPacket(NetTestTools.did(Integer.toString(1)), ByteBuffer.wrap(arr), Optional.empty()); |
368 | 367 | ||
369 | assertEquals("Unexpected number of outbound packets were emitted.", | 368 | assertEquals("Unexpected number of outbound packets were emitted.", |
370 | totalPorts - numInfraPorts, packets.size()); | 369 | totalPorts - numInfraPorts, packets.size()); |
... | @@ -530,4 +529,4 @@ public class EdgeManagerTest { | ... | @@ -530,4 +529,4 @@ public class EdgeManagerTest { |
530 | events.add(event); | 529 | events.add(event); |
531 | } | 530 | } |
532 | } | 531 | } |
533 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
532 | +} | ... | ... |
... | @@ -554,14 +554,14 @@ public class FlowRuleManagerTest { | ... | @@ -554,14 +554,14 @@ public class FlowRuleManagerTest { |
554 | @Override | 554 | @Override |
555 | public CompletedBatchOperation get() | 555 | public CompletedBatchOperation get() |
556 | throws InterruptedException, ExecutionException { | 556 | throws InterruptedException, ExecutionException { |
557 | - return new CompletedBatchOperation(true, Collections.<FlowRule>emptySet(), null); | 557 | + return new CompletedBatchOperation(true, Collections.emptySet(), null); |
558 | } | 558 | } |
559 | 559 | ||
560 | @Override | 560 | @Override |
561 | public CompletedBatchOperation get(long timeout, TimeUnit unit) | 561 | public CompletedBatchOperation get(long timeout, TimeUnit unit) |
562 | throws InterruptedException, | 562 | throws InterruptedException, |
563 | ExecutionException, TimeoutException { | 563 | ExecutionException, TimeoutException { |
564 | - return new CompletedBatchOperation(true, Collections.<FlowRule>emptySet(), null); | 564 | + return new CompletedBatchOperation(true, Collections.emptySet(), null); |
565 | } | 565 | } |
566 | 566 | ||
567 | @Override | 567 | @Override | ... | ... |
... | @@ -416,7 +416,7 @@ public class ProxyArpManagerTest { | ... | @@ -416,7 +416,7 @@ public class ProxyArpManagerTest { |
416 | */ | 416 | */ |
417 | @Test | 417 | @Test |
418 | public void testNotKnown() { | 418 | public void testNotKnown() { |
419 | - expect(hostService.getHostsByIp(IP1)).andReturn(Collections.<Host>emptySet()); | 419 | + expect(hostService.getHostsByIp(IP1)).andReturn(Collections.emptySet()); |
420 | replay(hostService); | 420 | replay(hostService); |
421 | replay(interfaceService); | 421 | replay(interfaceService); |
422 | 422 | ... | ... |
... | @@ -783,7 +783,7 @@ public class GossipDeviceStore | ... | @@ -783,7 +783,7 @@ public class GossipDeviceStore |
783 | // exist, it creates and registers a new one. | 783 | // exist, it creates and registers a new one. |
784 | private ConcurrentMap<PortNumber, Port> getPortMap(DeviceId deviceId) { | 784 | private ConcurrentMap<PortNumber, Port> getPortMap(DeviceId deviceId) { |
785 | return createIfAbsentUnchecked(devicePorts, deviceId, | 785 | return createIfAbsentUnchecked(devicePorts, deviceId, |
786 | - NewConcurrentHashMap.<PortNumber, Port>ifNeeded()); | 786 | + NewConcurrentHashMap.ifNeeded()); |
787 | } | 787 | } |
788 | 788 | ||
789 | private Map<ProviderId, DeviceDescriptions> getOrCreateDeviceDescriptionsMap( | 789 | private Map<ProviderId, DeviceDescriptions> getOrCreateDeviceDescriptionsMap( | ... | ... |
... | @@ -241,12 +241,12 @@ public class DistributedGroupStore | ... | @@ -241,12 +241,12 @@ public class DistributedGroupStore |
241 | 241 | ||
242 | private static NewConcurrentHashMap<GroupId, Group> | 242 | private static NewConcurrentHashMap<GroupId, Group> |
243 | lazyEmptyExtraneousGroupIdTable() { | 243 | lazyEmptyExtraneousGroupIdTable() { |
244 | - return NewConcurrentHashMap.<GroupId, Group>ifNeeded(); | 244 | + return NewConcurrentHashMap.ifNeeded(); |
245 | } | 245 | } |
246 | 246 | ||
247 | private static NewConcurrentHashMap<GroupId, StoredGroupEntry> | 247 | private static NewConcurrentHashMap<GroupId, StoredGroupEntry> |
248 | lazyEmptyGroupIdTable() { | 248 | lazyEmptyGroupIdTable() { |
249 | - return NewConcurrentHashMap.<GroupId, StoredGroupEntry>ifNeeded(); | 249 | + return NewConcurrentHashMap.ifNeeded(); |
250 | } | 250 | } |
251 | 251 | ||
252 | /** | 252 | /** | ... | ... |
... | @@ -30,7 +30,6 @@ import org.onosproject.common.DefaultTopology; | ... | @@ -30,7 +30,6 @@ import org.onosproject.common.DefaultTopology; |
30 | import org.onosproject.event.Event; | 30 | import org.onosproject.event.Event; |
31 | import org.onosproject.mastership.MastershipService; | 31 | import org.onosproject.mastership.MastershipService; |
32 | import org.onosproject.net.ConnectPoint; | 32 | import org.onosproject.net.ConnectPoint; |
33 | -import org.onosproject.net.Device; | ||
34 | import org.onosproject.net.DeviceId; | 33 | import org.onosproject.net.DeviceId; |
35 | import org.onosproject.net.DisjointPath; | 34 | import org.onosproject.net.DisjointPath; |
36 | import org.onosproject.net.Link; | 35 | import org.onosproject.net.Link; |
... | @@ -96,8 +95,8 @@ public class DistributedTopologyStore | ... | @@ -96,8 +95,8 @@ public class DistributedTopologyStore |
96 | private volatile DefaultTopology current = | 95 | private volatile DefaultTopology current = |
97 | new DefaultTopology(ProviderId.NONE, | 96 | new DefaultTopology(ProviderId.NONE, |
98 | new DefaultGraphDescription(0L, System.currentTimeMillis(), | 97 | new DefaultGraphDescription(0L, System.currentTimeMillis(), |
99 | - Collections.<Device>emptyList(), | 98 | + Collections.emptyList(), |
100 | - Collections.<Link>emptyList())); | 99 | + Collections.emptyList())); |
101 | 100 | ||
102 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) | 101 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
103 | protected StorageService storageService; | 102 | protected StorageService storageService; | ... | ... |
... | @@ -133,7 +133,7 @@ public class GossipDeviceStoreTest { | ... | @@ -133,7 +133,7 @@ public class GossipDeviceStoreTest { |
133 | private static final NodeId NID2 = new NodeId("remote"); | 133 | private static final NodeId NID2 = new NodeId("remote"); |
134 | private static final ControllerNode ONOS2 = | 134 | private static final ControllerNode ONOS2 = |
135 | new DefaultControllerNode(NID2, IpAddress.valueOf("127.0.0.2")); | 135 | new DefaultControllerNode(NID2, IpAddress.valueOf("127.0.0.2")); |
136 | - private static final List<SparseAnnotations> NO_ANNOTATION = Collections.<SparseAnnotations>emptyList(); | 136 | + private static final List<SparseAnnotations> NO_ANNOTATION = Collections.emptyList(); |
137 | 137 | ||
138 | EventuallyConsistentMapBuilder ecMapBuilder; | 138 | EventuallyConsistentMapBuilder ecMapBuilder; |
139 | EventuallyConsistentMap ecMap; | 139 | EventuallyConsistentMap ecMap; |
... | @@ -492,7 +492,7 @@ public class GossipDeviceStoreTest { | ... | @@ -492,7 +492,7 @@ public class GossipDeviceStoreTest { |
492 | @Test | 492 | @Test |
493 | public final void testUpdatePorts() { | 493 | public final void testUpdatePorts() { |
494 | putDevice(DID1, SW1); | 494 | putDevice(DID1, SW1); |
495 | - List<PortDescription> pds = Arrays.<PortDescription>asList( | 495 | + List<PortDescription> pds = Arrays.asList( |
496 | new DefaultPortDescription(P1, true), | 496 | new DefaultPortDescription(P1, true), |
497 | new DefaultPortDescription(P2, true) | 497 | new DefaultPortDescription(P2, true) |
498 | ); | 498 | ); |
... | @@ -517,7 +517,7 @@ public class GossipDeviceStoreTest { | ... | @@ -517,7 +517,7 @@ public class GossipDeviceStoreTest { |
517 | assertTrue("Event for all expectedport appeared", expectedPorts.isEmpty()); | 517 | assertTrue("Event for all expectedport appeared", expectedPorts.isEmpty()); |
518 | 518 | ||
519 | 519 | ||
520 | - List<PortDescription> pds2 = Arrays.<PortDescription>asList( | 520 | + List<PortDescription> pds2 = Arrays.asList( |
521 | new DefaultPortDescription(P1, false), | 521 | new DefaultPortDescription(P1, false), |
522 | new DefaultPortDescription(P2, true), | 522 | new DefaultPortDescription(P2, true), |
523 | new DefaultPortDescription(P3, true) | 523 | new DefaultPortDescription(P3, true) |
... | @@ -547,7 +547,7 @@ public class GossipDeviceStoreTest { | ... | @@ -547,7 +547,7 @@ public class GossipDeviceStoreTest { |
547 | } | 547 | } |
548 | } | 548 | } |
549 | 549 | ||
550 | - List<PortDescription> pds3 = Arrays.<PortDescription>asList( | 550 | + List<PortDescription> pds3 = Arrays.asList( |
551 | new DefaultPortDescription(P1, false), | 551 | new DefaultPortDescription(P1, false), |
552 | new DefaultPortDescription(P2, true) | 552 | new DefaultPortDescription(P2, true) |
553 | ); | 553 | ); |
... | @@ -577,7 +577,7 @@ public class GossipDeviceStoreTest { | ... | @@ -577,7 +577,7 @@ public class GossipDeviceStoreTest { |
577 | @Test | 577 | @Test |
578 | public final void testUpdatePortStatus() { | 578 | public final void testUpdatePortStatus() { |
579 | putDevice(DID1, SW1); | 579 | putDevice(DID1, SW1); |
580 | - List<PortDescription> pds = Arrays.<PortDescription>asList( | 580 | + List<PortDescription> pds = Arrays.asList( |
581 | new DefaultPortDescription(P1, true) | 581 | new DefaultPortDescription(P1, true) |
582 | ); | 582 | ); |
583 | deviceStore.updatePorts(PID, DID1, pds); | 583 | deviceStore.updatePorts(PID, DID1, pds); |
... | @@ -602,7 +602,7 @@ public class GossipDeviceStoreTest { | ... | @@ -602,7 +602,7 @@ public class GossipDeviceStoreTest { |
602 | public final void testUpdatePortStatusAncillary() throws IOException { | 602 | public final void testUpdatePortStatusAncillary() throws IOException { |
603 | putDeviceAncillary(DID1, SW1); | 603 | putDeviceAncillary(DID1, SW1); |
604 | putDevice(DID1, SW1); | 604 | putDevice(DID1, SW1); |
605 | - List<PortDescription> pds = Arrays.<PortDescription>asList( | 605 | + List<PortDescription> pds = Arrays.asList( |
606 | new DefaultPortDescription(P1, true, A1) | 606 | new DefaultPortDescription(P1, true, A1) |
607 | ); | 607 | ); |
608 | deviceStore.updatePorts(PID, DID1, pds); | 608 | deviceStore.updatePorts(PID, DID1, pds); |
... | @@ -727,7 +727,7 @@ public class GossipDeviceStoreTest { | ... | @@ -727,7 +727,7 @@ public class GossipDeviceStoreTest { |
727 | public final void testGetPorts() { | 727 | public final void testGetPorts() { |
728 | putDevice(DID1, SW1); | 728 | putDevice(DID1, SW1); |
729 | putDevice(DID2, SW1); | 729 | putDevice(DID2, SW1); |
730 | - List<PortDescription> pds = Arrays.<PortDescription>asList( | 730 | + List<PortDescription> pds = Arrays.asList( |
731 | new DefaultPortDescription(P1, true), | 731 | new DefaultPortDescription(P1, true), |
732 | new DefaultPortDescription(P2, true) | 732 | new DefaultPortDescription(P2, true) |
733 | ); | 733 | ); |
... | @@ -750,7 +750,7 @@ public class GossipDeviceStoreTest { | ... | @@ -750,7 +750,7 @@ public class GossipDeviceStoreTest { |
750 | public final void testGetPort() { | 750 | public final void testGetPort() { |
751 | putDevice(DID1, SW1); | 751 | putDevice(DID1, SW1); |
752 | putDevice(DID2, SW1); | 752 | putDevice(DID2, SW1); |
753 | - List<PortDescription> pds = Arrays.<PortDescription>asList( | 753 | + List<PortDescription> pds = Arrays.asList( |
754 | new DefaultPortDescription(P1, true), | 754 | new DefaultPortDescription(P1, true), |
755 | new DefaultPortDescription(P2, false) | 755 | new DefaultPortDescription(P2, false) |
756 | ); | 756 | ); |
... | @@ -771,7 +771,7 @@ public class GossipDeviceStoreTest { | ... | @@ -771,7 +771,7 @@ public class GossipDeviceStoreTest { |
771 | @Test | 771 | @Test |
772 | public final void testRemoveDevice() { | 772 | public final void testRemoveDevice() { |
773 | putDevice(DID1, SW1, A1); | 773 | putDevice(DID1, SW1, A1); |
774 | - List<PortDescription> pds = Arrays.<PortDescription>asList( | 774 | + List<PortDescription> pds = Arrays.asList( |
775 | new DefaultPortDescription(P1, true, A2) | 775 | new DefaultPortDescription(P1, true, A2) |
776 | ); | 776 | ); |
777 | deviceStore.updatePorts(PID, DID1, pds); | 777 | deviceStore.updatePorts(PID, DID1, pds); |
... | @@ -800,7 +800,7 @@ public class GossipDeviceStoreTest { | ... | @@ -800,7 +800,7 @@ public class GossipDeviceStoreTest { |
800 | 800 | ||
801 | // putBack Device, Port w/o annotation | 801 | // putBack Device, Port w/o annotation |
802 | putDevice(DID1, SW1); | 802 | putDevice(DID1, SW1); |
803 | - List<PortDescription> pds2 = Arrays.<PortDescription>asList( | 803 | + List<PortDescription> pds2 = Arrays.asList( |
804 | new DefaultPortDescription(P1, true) | 804 | new DefaultPortDescription(P1, true) |
805 | ); | 805 | ); |
806 | deviceStore.updatePorts(PID, DID1, pds2); | 806 | deviceStore.updatePorts(PID, DID1, pds2); | ... | ... |
-
Please register or login to post a comment