955 |
|
final CompletableFuture<Integer> g = m.exceptionally |
956 |
|
(f, (Throwable t) -> { |
957 |
|
m.checkExecutionMode(); |
958 |
< |
threadAssertSame(t, ex); |
958 |
> |
assertSame(t, ex); |
959 |
|
a.getAndIncrement(); |
960 |
|
return v1; |
961 |
|
}); |
981 |
|
final CompletableFuture<Integer> g = m.exceptionally |
982 |
|
(f, (Throwable t) -> { |
983 |
|
m.checkExecutionMode(); |
984 |
< |
threadAssertSame(t, ex1); |
984 |
> |
assertSame(t, ex1); |
985 |
|
a.getAndIncrement(); |
986 |
|
throw ex2; |
987 |
|
}); |
1008 |
|
(f, |
1009 |
|
(Integer result, Throwable t) -> { |
1010 |
|
m.checkExecutionMode(); |
1011 |
< |
threadAssertSame(result, v1); |
1012 |
< |
threadAssertNull(t); |
1011 |
> |
assertSame(result, v1); |
1012 |
> |
assertNull(t); |
1013 |
|
a.getAndIncrement(); |
1014 |
|
}); |
1015 |
|
if (createIncomplete) assertTrue(f.complete(v1)); |
1035 |
|
(f, |
1036 |
|
(Integer result, Throwable t) -> { |
1037 |
|
m.checkExecutionMode(); |
1038 |
< |
threadAssertNull(result); |
1039 |
< |
threadAssertSame(t, ex); |
1038 |
> |
assertNull(result); |
1039 |
> |
assertSame(t, ex); |
1040 |
|
a.getAndIncrement(); |
1041 |
|
}); |
1042 |
|
if (createIncomplete) f.completeExceptionally(ex); |
1062 |
|
(f, |
1063 |
|
(Integer result, Throwable t) -> { |
1064 |
|
m.checkExecutionMode(); |
1065 |
< |
threadAssertNull(result); |
1066 |
< |
threadAssertTrue(t instanceof CancellationException); |
1065 |
> |
assertNull(result); |
1066 |
> |
assertTrue(t instanceof CancellationException); |
1067 |
|
a.getAndIncrement(); |
1068 |
|
}); |
1069 |
|
if (createIncomplete) assertTrue(f.cancel(mayInterruptIfRunning)); |
1090 |
|
(f, |
1091 |
|
(Integer result, Throwable t) -> { |
1092 |
|
m.checkExecutionMode(); |
1093 |
< |
threadAssertSame(result, v1); |
1094 |
< |
threadAssertNull(t); |
1093 |
> |
assertSame(result, v1); |
1094 |
> |
assertNull(t); |
1095 |
|
a.getAndIncrement(); |
1096 |
|
throw ex; |
1097 |
|
}); |
1121 |
|
(f, |
1122 |
|
(Integer result, Throwable t) -> { |
1123 |
|
m.checkExecutionMode(); |
1124 |
< |
threadAssertSame(t, ex1); |
1125 |
< |
threadAssertNull(result); |
1124 |
> |
assertSame(t, ex1); |
1125 |
> |
assertNull(result); |
1126 |
|
a.getAndIncrement(); |
1127 |
|
throw ex2; |
1128 |
|
}); |
1153 |
|
(f, |
1154 |
|
(Integer result, Throwable t) -> { |
1155 |
|
m.checkExecutionMode(); |
1156 |
< |
threadAssertSame(result, v1); |
1157 |
< |
threadAssertNull(t); |
1156 |
> |
assertSame(result, v1); |
1157 |
> |
assertNull(t); |
1158 |
|
a.getAndIncrement(); |
1159 |
|
return inc(v1); |
1160 |
|
}); |
1182 |
|
(f, |
1183 |
|
(Integer result, Throwable t) -> { |
1184 |
|
m.checkExecutionMode(); |
1185 |
< |
threadAssertNull(result); |
1186 |
< |
threadAssertSame(t, ex); |
1185 |
> |
assertNull(result); |
1186 |
> |
assertSame(t, ex); |
1187 |
|
a.getAndIncrement(); |
1188 |
|
return v1; |
1189 |
|
}); |
1211 |
|
(f, |
1212 |
|
(Integer result, Throwable t) -> { |
1213 |
|
m.checkExecutionMode(); |
1214 |
< |
threadAssertNull(result); |
1215 |
< |
threadAssertTrue(t instanceof CancellationException); |
1214 |
> |
assertNull(result); |
1215 |
> |
assertTrue(t instanceof CancellationException); |
1216 |
|
a.getAndIncrement(); |
1217 |
|
return v1; |
1218 |
|
}); |
1240 |
|
(f, |
1241 |
|
(Integer result, Throwable t) -> { |
1242 |
|
m.checkExecutionMode(); |
1243 |
< |
threadAssertSame(result, v1); |
1244 |
< |
threadAssertNull(t); |
1243 |
> |
assertSame(result, v1); |
1244 |
> |
assertNull(t); |
1245 |
|
a.getAndIncrement(); |
1246 |
|
throw ex; |
1247 |
|
}); |
1271 |
|
(f, |
1272 |
|
(Integer result, Throwable t) -> { |
1273 |
|
m.checkExecutionMode(); |
1274 |
< |
threadAssertNull(result); |
1275 |
< |
threadAssertSame(ex1, t); |
1274 |
> |
assertNull(result); |
1275 |
> |
assertSame(ex1, t); |
1276 |
|
a.getAndIncrement(); |
1277 |
|
throw ex2; |
1278 |
|
}); |
4859 |
|
if (!createIncomplete) f.completeExceptionally(ex); |
4860 |
|
final CompletionStage<Integer> g = d.exceptionallyAsync |
4861 |
|
((Throwable t) -> { |
4862 |
< |
threadAssertSame(t, ex); |
4862 |
> |
assertSame(t, ex); |
4863 |
|
a.getAndIncrement(); |
4864 |
|
return v1; |
4865 |
|
}); |
4886 |
|
if (!createIncomplete) f.completeExceptionally(ex1); |
4887 |
|
final CompletionStage<Integer> g = d.exceptionallyAsync |
4888 |
|
((Throwable t) -> { |
4889 |
< |
threadAssertSame(t, ex1); |
4889 |
> |
assertSame(t, ex1); |
4890 |
|
a.getAndIncrement(); |
4891 |
|
throw ex2; |
4892 |
|
}); |