File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
sources/net.sf.j2s.java.core/src/java/util/stream Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -435,8 +435,11 @@ public final <A> A[] toArray(IntFunction<A[]> generator) {
435435 // super type of U an ArrayStoreException will be thrown.
436436 @ SuppressWarnings ("rawtypes" )
437437 IntFunction rawGenerator = (IntFunction ) generator ;
438- return (A []) Nodes .flatten (evaluateToArrayNode (rawGenerator ), rawGenerator )
439- .asArray (rawGenerator );
438+ // using extra temporary variable 'node' with explicit type 'Node<A>' required as Eclipse 4.7.3a reports error
439+ // 'The method flatten(Node<T>, IntFunction<T[]>) in the type Nodes is not applicable for the arguments (Node, IntFunction)'
440+ // when directly using 'evaluateToArrayNode(rawGenerator)' in call to 'Nodes.flatten'.
441+ Node <A > node = evaluateToArrayNode (rawGenerator );
442+ return (A []) Nodes .flatten (node , rawGenerator ).asArray (rawGenerator );
440443 }
441444
442445 @ Override
You can’t perform that action at this time.
0 commit comments