File tree 2 files changed +7
-0
lines changed
core/src/main/scala/scala/collection/parallel
junit/src/test/scala/scala/collection/parallel/mutable
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -471,6 +471,8 @@ extends IterableOnce[T @uncheckedVariance]
471
471
}
472
472
473
473
def max [U >: T ](implicit ord : Ordering [U ]): T = {
474
+ if (isEmpty) throw new UnsupportedOperationException (" empty.max" )
475
+
474
476
tasksupport.executeAndWaitResult(new Max (ord, splitter)).get.asInstanceOf [T ]
475
477
}
476
478
Original file line number Diff line number Diff line change @@ -138,4 +138,9 @@ class ParArrayTest extends scala.collection.concurrent.ctries_old.Spec {
138
138
evaluating { ParArray .empty[Int ].min }.shouldProduce[UnsupportedOperationException ]()
139
139
}
140
140
141
+ @ Test
142
+ def `empty max` : Unit = {
143
+ evaluating { ParArray .empty[Int ].max }.shouldProduce[UnsupportedOperationException ]()
144
+ }
145
+
141
146
}
You can’t perform that action at this time.
0 commit comments