3752 |
|
} |
3753 |
|
|
3754 |
|
/** |
3755 |
– |
* failedFuture(null) throws NPE |
3756 |
– |
*/ |
3757 |
– |
public void testFailedFuture_null() { |
3758 |
– |
try { |
3759 |
– |
CompletableFuture<Integer> f = CompletableFuture.failedFuture(null); |
3760 |
– |
shouldThrow(); |
3761 |
– |
} catch (NullPointerException success) {} |
3762 |
– |
} |
3763 |
– |
|
3764 |
– |
/** |
3755 |
|
* copy returns a CompletableFuture that is completed normally, |
3756 |
|
* with the same value, when source is. |
3757 |
|
*/ |
4180 |
|
// Manufacture boxed primitives for primitive params |
4181 |
|
for (int i = 0; i < args.length; i++) { |
4182 |
|
Class<?> type = parameterTypes[i]; |
4183 |
< |
if (parameterTypes[i] == boolean.class) |
4184 |
< |
args[i] = false; |
4185 |
< |
else if (parameterTypes[i] == int.class) |
4196 |
< |
args[i] = 0; |
4197 |
< |
else if (parameterTypes[i] == long.class) |
4198 |
< |
args[i] = 0L; |
4183 |
> |
if (type == boolean.class) args[i] = false; |
4184 |
> |
else if (type == int.class) args[i] = 0; |
4185 |
> |
else if (type == long.class) args[i] = 0L; |
4186 |
|
} |
4187 |
|
for (CompletionStage<Integer> stage : stages) { |
4188 |
|
try { |