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

Remove generics from ContingenciesProviderFactory interface. #782

Merged
merged 1 commit into from
May 2, 2019

Conversation

sylvlecl
Copy link
Contributor

@sylvlecl sylvlecl commented May 2, 2019

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • [x ] The commit message follows our guidelines

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

API fix.

What is the current behavior? (You can also link to an open issue here)

The generic return type in ContingenciesProviderFactory does not seem to bring anything really useful,
while on the other side it prevents (or makes clumsy) the use of most
fluent APIS which rely on a known return type (streams, optionals ...).

It also causes "unchecked" warnings in implementations.

It seems very unlikely that this change actually breaks some client code.

What is the new behavior (if this is a feature change)?

The factory returns a plain ContingencyProvider.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

It seems very unlikely that this change actually breaks some client code.
I think it could only happen if the generic type is explicit in the method call:

factory.<MyContingencyProviderImpl>create()

Not sure when one would need to use this.

The generic return type does not seem to bring anything really useful,
while on the other side it prevents (or makes clumsy) the use of most
fluent APIS which rely on a known return type (streams, optionals ...).

It also causes "unchecked" warnings in implementations.

It seems very unlikely that this change actually breaks some client code.

Signed-off-by: Sylvain Leclerc <[email protected]>
@sylvlecl sylvlecl requested a review from geofjamg May 2, 2019 09:45
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.003%) to 81.14% when pulling d3d93bb on contingencies-provider-factory-remove-generics into c98d325 on master.

Copy link
Member

@geofjamg geofjamg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it break compatibility?

@sylvlecl
Copy link
Contributor Author

sylvlecl commented May 2, 2019

Does it break compatibility?

See the analysis in the PR text: in my opinion it's very unlikely to break any client-code.
I don't see any other case than the one mentioned, and I cannot imagine in which case you would need to do this.

@geofjamg geofjamg merged commit f454d90 into master May 2, 2019
@geofjamg geofjamg deleted the contingencies-provider-factory-remove-generics branch May 2, 2019 16:07
frannicot pushed a commit that referenced this pull request May 27, 2019
The generic return type does not seem to bring anything really useful,
while on the other side it prevents (or makes clumsy) the use of most
fluent APIS which rely on a known return type (streams, optionals ...).

It also causes "unchecked" warnings in implementations.

It seems very unlikely that this change actually breaks some client code.

Signed-off-by: Sylvain Leclerc <[email protected]>
Signed-off-by: frannicot <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants