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

Change return type to Stream<? extends TestTemplateInvocationContext> #3577

Open
sormuras opened this issue Nov 29, 2023 · 2 comments
Open

Comments

@sormuras
Copy link
Member

Stream<TestTemplateInvocationContext> provideTestTemplateInvocationContexts(ExtensionContext context);

Michael wrote:

I mean I tried to do Stream.generate(() -> new MyInvocationContext()).limit(/*number*/)
This does not work.
but Stream.generate(() -> new MyInvocationContext()).limit(/*number*/).map(e -> e) works...

@sormuras
Copy link
Member Author

Question is, can we change the return type without breaking existing code?

@marcphilipp
Copy link
Member

According to https://wiki.eclipse.org/Evolving_Java-based_APIs_2#Evolving_API_interfaces_-_API_methods that would break binary compatibility. We should have declared the method like that initially, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants