Skip to content
New issue

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

FYI: Duplicate extension method. #363

Closed
a1730 opened this issue May 16, 2022 · 2 comments
Closed

FYI: Duplicate extension method. #363

a1730 opened this issue May 16, 2022 · 2 comments

Comments

@a1730
Copy link

a1730 commented May 16, 2022

Java 17 has toList in its Stream class.

warning: Duplicate extension method. 'toList(java.util.stream.Stream)' from 'manifold.collections.extensions.java.util.stream.Stream.ManifoldStreamCollectionsExt' duplicates a method in the extended class 'java.util.stream.Stream'

Thank you for Manifold.

@rsmckinney
Copy link
Member

Hi @a1730. This is expected since Manifold targets all Java versions (currently 8-18) with a single library. As such ManifoldStreamCollectionsExt#toList is always present and duplicates the method in newer Java releases, however it is safe because a duplicate extension method is ignored, hence the warning.

I'm going to add an annotation so extension method authors can tag known duplicates that are semantically the same. In this case manifold will skip the method and avoid the warning. Thanks for bringing this up. See #364

@a1730
Copy link
Author

a1730 commented May 17, 2022

Hi @rsmckinney ,
Thank you for the quick response, and near instantaneous technical resolution in #364.
I am closing this issue in difference to #134.
Thank you for manifold.

@a1730 a1730 closed this as completed May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants