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
improve generics of promise #158
improve generics of promise #158
Conversation
Reviewed 8 of 8 files at r1. subprojects/jdeferred-core/src/test/java/org/jdeferred/impl/PipedPromiseTest.java, line 40 at r1 (raw file):
just curious, why the change from Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. subprojects/jdeferred-core/src/test/java/org/jdeferred/impl/PipedPromiseTest.java, line 40 at r1 (raw file): Previously, aalmiray (Andres Almiray) wrote…
You mean from
This may be OK for untyped languages such as Javascript but for Java we should prevent this cases Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. subprojects/jdeferred-core/src/test/java/org/jdeferred/impl/PipedPromiseTest.java, line 40 at r1 (raw file): Previously, sclassen wrote…
Not really, no. I meant the change made to Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. subprojects/jdeferred-core/src/test/java/org/jdeferred/impl/PipedPromiseTest.java, line 40 at r1 (raw file): Previously, aalmiray (Andres Almiray) wrote…
Same reasoning. The Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. subprojects/jdeferred-core/src/test/java/org/jdeferred/impl/PipedPromiseTest.java, line 40 at r1 (raw file): Previously, sclassen wrote…
ah got it :-) Comments from Reviewable |
@saturnism we'll have to merge with caution due to #156. In other words the fix for #156 should go last Review status: all files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
Reviewed 7 of 8 files at r1. Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
resolves #154
Note: This is a breaking API change
Never the less I think this will improve the experience of using jdeferred as the typing becomes more strict and therefore reduces possible runtime exceptions (such as ClassCastException)
On the same time by using "? super" and "? extends" the typing becomes relaxed as we now can do the following
where
The Java Stream API also uses "? super" and "? extends" to allow maximal flexibility
This change is