-
Notifications
You must be signed in to change notification settings - Fork 5
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
Type Safety #31
Comments
It looks like that add(Object) and addNonBlocking(Object) also have no type constraint. |
Hab rausgefunden warum das nicht so einfach zu machen ist.
|
Have a look, I put the current changes in the branch 31-type-safety |
Thanks for the try, one solution seems to be to use In this case, we'll just need to fix the |
I think, we have to find out why a termination object is required. |
I would expect the termination object to be required as for consumers of a pipe are listening, until the termination object comes, and than they stop their activity. This would also work with |
Good idea. I'll ask Nelson about the issue. Maybe he has some insights. |
Nelson has no idea, but Christian provided some insights:
The object is relevant to be type safe on a higher level. The TerminateObject ensures that users can do not need to know whether "null" as entry is valid or not. The TerminateObject is private to ensure a user cannot accidentally use it. We should either document this in the code or alternatively have another solution for it. In both cases we should add this to the documentation for maintainers and users. |
As far as I get it, a pipe always uses the same data type, and just transfers an instances. Why does it only return
Object
onremoveLast
?TeeTime/src/main/java/teetime/framework/pipe/IPipe.java
Line 74 in 94c7703
As far as I see it,
T
or? extends T
should also work.The text was updated successfully, but these errors were encountered: