We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream#toList()
The default implementation of Stream#toList() is already implemented by JVMDG:
// java default default List<T> toList() { return (List<T>) Collections.unmodifiableList(new ArrayList<>(Arrays.asList(this.toArray()))); } // jvmdg stub public static <T> List<T> toList(Stream<T> stream) { return Collections.unmodifiableList(new ArrayList(Arrays.asList(stream.toArray()))); }
But there's a fast variant of Stream#toList() in java.util.stream.ReferencePipeline:
java.util.stream.ReferencePipeline
@Override public List<P_OUT> toList() { return SharedSecrets.getJavaUtilCollectionAccess().listFromTrustedArrayNullsAllowed(this.toArray()); } // where the 'listFromTrustedArrayNullsAllowed' is static <E> List<E> listFromTrustedArrayNullsAllowed(Object... input) { assert input.getClass() == Object[].class; return input.length == 0 ? EMPTY_LIST_NULLS : new ListN(input, true); } // the 'ListN' is in 'java.util.ImmutableCollections'
Is it possible to implement this in JVMDownGrader?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The default implementation of
Stream#toList()
is already implemented by JVMDG:But there's a fast variant of
Stream#toList()
injava.util.stream.ReferencePipeline
:Is it possible to implement this in JVMDownGrader?
The text was updated successfully, but these errors were encountered: