ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/jtreg/util/Collections/EmptyCollectionSerialization.java
(Generate patch)

Comparing jsr166/src/test/jtreg/util/Collections/EmptyCollectionSerialization.java (file contents):
Revision 1.3 by jsr166, Wed Sep 9 22:05:28 2015 UTC vs.
Revision 1.4 by jsr166, Sun Oct 18 17:34:26 2015 UTC

# Line 58 | Line 58 | public class EmptyCollectionSerializatio
58              Object singleton = o.get();
59              assertSame(o.get(), singleton, description + ": broken Supplier not returning singleton");
60              Object copy = patheticDeepCopy(singleton);
61 <            assertSame( copy, singleton, description + ": " +
61 >            assertSame(copy, singleton, description + ": " +
62                  copy.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(copy)) +
63                  " is not the singleton " +
64                  singleton.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(singleton)));
# Line 73 | Line 73 | public class EmptyCollectionSerializatio
73      }
74  
75      public static Collection<Object[]> makeSingletons() {
76 <        return Arrays.asList(
77 <            new Object[]{"Collections.EMPTY_LIST",
78 <                (Supplier) () -> {return Collections.EMPTY_LIST;}},
79 <            new Object[]{"Collections.EMPTY_MAP",
80 <                (Supplier) () -> {return Collections.EMPTY_MAP;}},
81 <            new Object[]{"Collections.EMPTY_SET",
82 <                (Supplier) () -> {return Collections.EMPTY_SET;}},
83 <            new Object[]{"Collections.singletonMap()",
84 <                (Supplier) () -> {return Collections.emptyList();}},
85 <            new Object[]{"Collections.emptyMap()",
86 <                (Supplier) () -> {return Collections.emptyMap();}},
87 <            new Object[]{"Collections.emptySet()",
88 <                (Supplier) () -> {return Collections.emptySet();}},
89 <            new Object[]{"Collections.emptySortedSet()",
90 <                (Supplier) () -> {return Collections.emptySortedSet();}},
91 <            new Object[]{"Collections.emptySortedMap()",
92 <                (Supplier) () -> {return Collections.emptySortedMap();}},
93 <            new Object[]{"Collections.emptyNavigableSet()",
94 <                (Supplier) () -> {return Collections.emptyNavigableSet();}},
95 <            new Object[]{"Collections.emptyNavigableMap()",
96 <                (Supplier) () -> {return Collections.emptyNavigableMap();}}
97 <            );
76 >        Object[][] params = {
77 >            {"Collections.EMPTY_LIST",
78 >             (Supplier) () -> Collections.EMPTY_LIST},
79 >            {"Collections.EMPTY_MAP",
80 >             (Supplier) () -> Collections.EMPTY_MAP},
81 >            {"Collections.EMPTY_SET",
82 >             (Supplier) () -> Collections.EMPTY_SET},
83 >            {"Collections.emptyList()",
84 >             (Supplier) () -> Collections.emptyList()},
85 >            {"Collections.emptyMap()",
86 >             (Supplier) () -> Collections.emptyMap()},
87 >            {"Collections.emptySet()",
88 >             (Supplier) () -> Collections.emptySet()},
89 >            {"Collections.emptySortedSet()",
90 >             (Supplier) () -> Collections.emptySortedSet()},
91 >            {"Collections.emptySortedMap()",
92 >             (Supplier) () -> Collections.emptySortedMap()},
93 >            {"Collections.emptyNavigableSet()",
94 >             (Supplier) () -> Collections.emptyNavigableSet()},
95 >            {"Collections.emptyNavigableMap()",
96 >             (Supplier) () -> Collections.emptyNavigableMap()},
97 >        };
98 >        return Arrays.asList(params);
99      }
100   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines