-
Notifications
You must be signed in to change notification settings - Fork 163
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
FuncOf returning null on apply #551
Comments
@yegor256 please, pay attention to this issue |
@yegor256 I agree with this. Let us know if you differ |
@0crat in |
@llorllale Job #551 is now in scope, role is |
Bug was reported, see §29: +15 point(s) just awarded to @neonailol/z |
@llorllale By the way, in case if all our objects are immutable then |
@SharplEr what we are against is |
@llorllale how can we fix that? I can't see any other solution... |
@llorllale Okay. In case if I remove this ctor, it will affect about 15 other classes (tests included). So a big part of functionality will be lost. Do I need to save this functionality somehow? |
@yegor256 I see one way, create new class: FuncOptional<X, Y> implements Func<X,Optional<Y>> Which can return But unfortunately such code will not build: public CallableOf(final Runnable runnable) {
this(new FuncOptional<>(runnable));
} Now I'm thinking about can I avoid this or not. |
I believe we should drop this functionality all together because it goes against our principles and also simply because |
@SharplEr although not stated as one of our principles, I know for a fact that @yegor256 doesn't like I am personally not against |
@neonailol the puzzle #861 is still not solved. |
@neonailol PR was merged, please close the issue. |
@0crat waiting |
@neonailol ping |
@elenavolokhova/z please review this job completed by @SharplEr/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed |
The job #551 is now out of scope |
@SharplEr According to our Policy:
There is no direct message with the link to corresponding PR. |
@elenavolokhova confirm |
@0crat quality acceptable |
Quality review completed: +8 point(s) just awarded to @elenavolokhova/z |
According to readme this library advertised and null-free
cactoos/README.md
Line 35 in 8586d83
But in
FuncOf
there is 2 constructors, that returns null on callingapply
of retunedFunc
Is this really nececary? Maybe they do not belong in there and should be moved to smth like
FuncNlsOf
or changed to better abstractions or simple removedcactoos/src/main/java/org/cactoos/func/FuncOf.java
Lines 76 to 78 in 8586d83
cactoos/src/main/java/org/cactoos/func/FuncOf.java
Lines 68 to 70 in 8586d83
Also tests say that
null
is expected behaviour therecactoos/src/test/java/org/cactoos/func/FuncOfTest.java
Lines 53 to 64 in 8586d83
cactoos/src/test/java/org/cactoos/func/FuncOfTest.java
Lines 66 to 75 in 8586d83
Also i'm seeing same behaviour in constructors of
CallableOf
andBiFuncOf
The text was updated successfully, but these errors were encountered: