Sort members
This commit is contained in:
parent
9be39c4a7a
commit
143518b64a
|
@ -190,11 +190,11 @@ public class MultiBackgroundInitializer
|
||||||
// collect the results
|
// collect the results
|
||||||
final Map<String, Object> results = new HashMap<>();
|
final Map<String, Object> results = new HashMap<>();
|
||||||
final Map<String, ConcurrentException> excepts = new HashMap<>();
|
final Map<String, ConcurrentException> excepts = new HashMap<>();
|
||||||
inits.entrySet().forEach(e -> {
|
inits.forEach((k, v) -> {
|
||||||
try {
|
try {
|
||||||
results.put(e.getKey(), e.getValue().get());
|
results.put(k, v.get());
|
||||||
} catch (final ConcurrentException cex) {
|
} catch (final ConcurrentException cex) {
|
||||||
excepts.put(e.getKey(), cex);
|
excepts.put(k, cex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -168,12 +168,23 @@ public class StreamsTest extends AbstractLangTest {
|
||||||
assertEquals(2, Streams.of(Arrays.asList("A", "B")).collect(Collectors.toList()).size());
|
assertEquals(2, Streams.of(Arrays.asList("A", "B")).collect(Collectors.toList()).size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testOfIterableNotNull() {
|
||||||
|
assertEquals(2, Streams.of((Iterable<String>) Arrays.asList("A", "B")).collect(Collectors.toList()).size());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testOfCollectionNull() {
|
public void testOfCollectionNull() {
|
||||||
final List<String> input = null;
|
final List<String> input = null;
|
||||||
assertEquals(0, Streams.of(input).collect(Collectors.toList()).size());
|
assertEquals(0, Streams.of(input).collect(Collectors.toList()).size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testOfIterableNull() {
|
||||||
|
final Iterable<String> input = null;
|
||||||
|
assertEquals(0, Streams.of(input).collect(Collectors.toList()).size());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testOfEnumeration() {
|
public void testOfEnumeration() {
|
||||||
final Hashtable<String, Integer> table = new Hashtable<>();
|
final Hashtable<String, Integer> table = new Hashtable<>();
|
||||||
|
@ -188,17 +199,6 @@ public class StreamsTest extends AbstractLangTest {
|
||||||
assertEquals(2, collect.size());
|
assertEquals(2, collect.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testOfIterableNotNull() {
|
|
||||||
assertEquals(2, Streams.of((Iterable<String>) Arrays.asList("A", "B")).collect(Collectors.toList()).size());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testOfIterableNull() {
|
|
||||||
final Iterable<String> input = null;
|
|
||||||
assertEquals(0, Streams.of(input).collect(Collectors.toList()).size());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSimpleStreamFilter() {
|
public void testSimpleStreamFilter() {
|
||||||
final List<String> input = Arrays.asList("1", "2", "3", "4", "5", "6");
|
final List<String> input = Arrays.asList("1", "2", "3", "4", "5", "6");
|
||||||
|
|
Loading…
Reference in New Issue