1.x: Change the signature of ignoreElements is also an implicit cast to whatever type you want.#3451
1.x: Change the signature of ignoreElements is also an implicit cast to whatever type you want.#3451abersnaze wants to merge 1 commit intoReactiveX:1.xfrom
Conversation
…atever type you want.
There was a problem hiding this comment.
Actually, there is no need to add more type parameters but just do an unchecked cast or raw type cast:
@SuppressWarnings("unchecked")
//...
return (Observable)lift(OperatorIgnoreElements.<T>instance());Note that instance() does this re-cast as well since the operator is stateless.
|
ah that's great @abersnaze, so simple! |
There was a problem hiding this comment.
Doesn't it prove this breaks the source compatibility?
There was a problem hiding this comment.
Yes, but it doesn't prove if it breaks binary compatibility?
There was a problem hiding this comment.
Would be nice to check binary compatibility as part of CI, there are some checker tools that we can include into the build process. Probably, it deserves a separate issue.
There was a problem hiding this comment.
I came across a semver for Java library awhile ago that could take two jars and hint if it was major, minor or patch change.
There was a problem hiding this comment.
I just realized we don't have a guidance on source compatibility explicitly. We only discussed backward compatibility in #1917. But I'm supposed backward compatibility should include both binary and source backward compatibility.
|
So we need a decision on the importance of source compatibility specifically in the category of generic types, right? I'm happy to add a generic type to |
|
Could this changed be done in a minor release? |
|
closing in favor of #3567 |
to remove the need for mergeWithEmpty and concatWithEmpty in #3430. I'm pretty sure that this doesn't count as a breaking change because of type erasure.