Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Commit 9ad16b3

Browse files
committed
add a comment explaining the rationale for not using default methods
(desugar bug)
1 parent f5120bb commit 9ad16b3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/main/java/java9/util/stream/Node.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
* @since 1.8
5959
*/
6060
interface Node<T> {
61+
// desugar bug: use old streamsupport version because desugar (Canary 6)
62+
// doesn't treat the default methods correctly (a Java 8 implementation
63+
// leads to AbstractMethodError / ClassCastException and what not)
6164

6265
/**
6366
* Returns a {@link Spliterator} describing the elements contained in this

src/main/java/java9/util/stream/Nodes.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
* @since 1.8
5151
*/
5252
final class Nodes {
53+
// desugar bug: use old streamsupport version because desugar (Canary 6)
54+
// doesn't treat the default methods correctly (a Java 8 implementation
55+
// leads to AbstractMethodError / ClassCastException and what not)
5356

5457
private Nodes() {
5558
throw new Error("no instances");

0 commit comments

Comments
 (0)