From ff0101b0840019221496554ec59df5594957f03e Mon Sep 17 00:00:00 2001 From: Rob Sherwood Date: Sat, 11 May 2013 09:05:37 -0700 Subject: [PATCH] new LinkedList() mostly redundant with Arrays.asList() General code clean up. You get a ArrayList by default and that's the right thing in most places. This commit removes a bunch of missing Java generic warnings and shouldn't affect any code. Change-Id: I777cdf6a3fd1f2c883aac188d544ebc5a4420f55 Signed-off-by: Rob Sherwood --- .../controller/sal/core/PathTest.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/core/PathTest.java b/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/core/PathTest.java index 9058156b9e..656dd8ea5b 100644 --- a/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/core/PathTest.java +++ b/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/core/PathTest.java @@ -63,7 +63,8 @@ public class PathTest { Edge e2 = new Edge(c2, c3); Edge e3 = new Edge(c3, c4); Edge e4 = new Edge(c4, c5); - edges = new LinkedList(Arrays.asList(e0, e1, e2, e3, e4)); + // actually need a LinkedList because we're going to .remove() + edges = new LinkedList(Arrays.asList(e0, e1, e2, e3, e4)); } catch (ConstructionException e) { // Exception is NOT expected if raised test will fail Assert.assertTrue(false); @@ -130,7 +131,7 @@ public class PathTest { Edge e2 = new Edge(c2, c3); Edge e3 = new Edge(c3, c4); Edge e4 = new Edge(c4, c5); - edges1 = new LinkedList(Arrays.asList(e0, e1, e2, e3, e4)); + edges1 = Arrays.asList(e0, e1, e2, e3, e4); } catch (ConstructionException e) { // Exception is NOT expected if raised test will fail Assert.assertTrue(false); @@ -168,7 +169,7 @@ public class PathTest { Edge e2 = new Edge(c2, c3); Edge e3 = new Edge(c3, c4); Edge e4 = new Edge(c4, c5); - edges2 = new LinkedList(Arrays.asList(e0, e1, e2, e3, e4)); + edges2 = Arrays.asList(e0, e1, e2, e3, e4); } catch (ConstructionException e) { // Exception is NOT expected if raised test will fail Assert.assertTrue(false); @@ -206,7 +207,7 @@ public class PathTest { Edge e2 = new Edge(c2, c3); Edge e3 = new Edge(c3, c4); Edge e4 = new Edge(c4, c5); - edges3 = new LinkedList(Arrays.asList(e0, e1, e2, e3, e4)); + edges3 = Arrays.asList(e0, e1, e2, e3, e4); } catch (ConstructionException e) { // Exception is NOT expected if raised test will fail Assert.assertTrue(false); @@ -257,7 +258,7 @@ public class PathTest { Edge e0 = new Edge(c0, c1); - Path path = new Path(new LinkedList(Arrays.asList(e0))); + Path path = new Path(Arrays.asList(e0)); } catch (ConstructionException e) { // Exception is NOT expected if raised test will fail Assert.assertTrue(false); @@ -299,7 +300,7 @@ public class PathTest { Edge e2 = new Edge(c2, c3); Edge e3 = new Edge(c3, c4); Edge e4 = new Edge(c4, c5); - List edges = new LinkedList(Arrays.asList(e0, e1, e2, e3, e4)); + List edges = Arrays.asList(e0, e1, e2, e3, e4); Path path = new Path(edges); // Test start node @@ -325,7 +326,7 @@ public class PathTest { (short) 0x1), n1); Edge e0 = new Edge(c0, c1); - List edges = new LinkedList(Arrays.asList(e0)); + List edges = Arrays.asList(e0); Path path = new Path(edges); // Test start node -- 2.36.6