yegor256 / cactoos

Object-Oriented Java primitives, as an alternative to Google Guava and Apache Commons
https://www.cactoos.org
MIT License
742 stars 165 forks source link

AndInThreadsTest.java:49-51: Remove the use of the static... #898

Closed 0pdd closed 5 years ago

0pdd commented 6 years ago

The puzzle 829-59f865f8 from #829 has to be resolved:

https://github.com/yegor256/cactoos/blob/995eb06e36912fe63f3ab22d1f992284084ee698/src/test/java/org/cactoos/scalar/AndInThreadsTest.java#L49-L51

The puzzle was created by Paulo Benety on 22-May-18.

Estimate: 30 minutes,

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

0crat commented 6 years ago

@llorllale/z please, pay attention to this issue

0crat commented 6 years ago

Job #898 is now in scope, role is DEV

0crat commented 6 years ago

The job #898 assigned to @vssekorin/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be a monetary reward for this job

0crat commented 6 years ago

The user @vssekorin/z resigned from #898, please stop working. Reason for job resignation: It is older than 10 days, see §8

0crat commented 6 years ago

Job gh:yegor256/cactoos#898 is not assigned, can't get performer

0crat commented 6 years ago

Resigned on delay, see §8: -30 point(s) just awarded to @vssekorin/z

0crat commented 5 years ago

The job #898 assigned to @iprogrammerr/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

BinaryIgor commented 5 years ago

@0crat waiting on outcome of #1008

0crat commented 5 years ago

@0crat waiting on outcome of #1008 (here)

@Iprogrammerr The impediment for #898 was registered successfully by @iprogrammerr/z

0crat commented 5 years ago

The job #898 assigned to @tomascury/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

tomascury commented 5 years ago

@0crat waiting on outcome of #947

0crat commented 5 years ago

@0crat waiting on outcome of #947 (here)

@tomascury The impediment for #898 was registered successfully by @tomascury/z

tomascury commented 5 years ago

@0crat refuse

0crat commented 5 years ago

@0crat refuse (here)

@tomascury The user @tomascury/z resigned from #898, please stop working. Reason for job resignation: Order was cancelled

0crat commented 5 years ago

Tasks refusal is discouraged, see §6: -15 point(s) just awarded to @tomascury/z

0crat commented 5 years ago

The job #898 assigned to @victornoel/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

victornoel commented 5 years ago

@0crat refuse

0crat commented 5 years ago

@0crat refuse (here)

@victornoel The user @victornoel/z resigned from #898, please stop working. Reason for job resignation: Order was cancelled

0crat commented 5 years ago

Tasks refusal is discouraged, see §6: -15 point(s) just awarded to @victornoel/z

0crat commented 5 years ago

The job #898 assigned to @longstone/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

0crat commented 5 years ago

Job gh:yegor256/cactoos#898 already assigned to @longstone, can't assign to @longstone

longstone commented 5 years ago

@0crat refuse

0crat commented 5 years ago

@0crat refuse (here)

@longstone The user @longstone/z resigned from #898, please stop working. Reason for job resignation: Order was cancelled

0crat commented 5 years ago

Tasks refusal is discouraged, see §6: -15 point(s) just awarded to @longstone/z

0crat commented 5 years ago

The job #898 assigned to @golyalpha/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

golyalpha commented 5 years ago

@0crat refuse

0crat commented 5 years ago

@0crat refuse (here)

@golyalpha The user @golyalpha/z resigned from #898, please stop working. Reason for job resignation: Order was cancelled

0crat commented 5 years ago

Tasks refusal is discouraged, see §6: -15 point(s) just awarded to @golyalpha/z

0crat commented 5 years ago

The job #898 assigned to @atapin/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

atapin commented 5 years ago

@0crat waiting for #947

0crat commented 5 years ago

@0crat waiting for #947 (here)

@atapin The impediment for #898 was registered successfully by @atapin/z

0crat commented 5 years ago

The job #898 assigned to @umbrah/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

vladhss commented 5 years ago

@0crat refuse

0crat commented 5 years ago

@0crat refuse (here)

@Umbrah The user @umbrah/z resigned from #898, please stop working. Reason for job resignation: Order was cancelled

0crat commented 5 years ago

Tasks refusal is discouraged, see §6: -15 point(s) just awarded to @umbrah/z

0crat commented 5 years ago

The job #898 assigned to @vzurauskas/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

vzurauskas commented 5 years ago

@0crat refuse, this task depends on https://github.com/yegor256/cactoos/issues/947

0crat commented 5 years ago

@0crat refuse, this task depends on https://github.com/yegor256/cactoos/issues/947 (here)

@vzurauskas Can't understand "refuse,", try one of these:

vzurauskas commented 5 years ago

@0crat refuse this task, what's wrong with you? :)

0crat commented 5 years ago

@0crat refuse this task, what's wrong with you? :) (here)

@vzurauskas The user @vzurauskas/z resigned from #898, please stop working. Reason for job resignation: Order was cancelled

0crat commented 5 years ago

Tasks refusal is discouraged, see §6: -15 point(s) just awarded to @vzurauskas/z

0crat commented 5 years ago

The job #898 assigned to @scristalli/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

scristalli commented 5 years ago

@0crat waiting for #947

0crat commented 5 years ago

@0crat waiting for #947 (here)

@scristalli The impediment for #898 was registered successfully by @scristalli/z

scristalli commented 5 years ago

@llorllale this task requires a mutable collection by its description and previous comments, topic that is already present in #1008, addressed as a duplicate of #947, and postponed after release 1.0. Is the release expected soon? Otherwise, is there any chance this task can be closed and put out of scope for now? It seems that it can't be solved at the moment and it only blocks slots for other jobs.

Thank you.

scristalli commented 5 years ago

@llorllale can I ask for an update on this? I'd just like to know what timeframe is expected for release 1.0, so that mutable collections can be discussed. I'd like not to refuse tasks, but depending on the actual feasability of this I don't want to hold it for months either.

llorllale commented 5 years ago

@scristalli just do this for now:

Remove the use of the static method Collections.synchronizedList. Replace by an object-oriented approach.

scristalli commented 5 years ago

@llorllale I don't think the task can be split like so: an object-oriented approach would require a class like Collections.SynchronizedList (which is the one used by the static method), too bad it's private. Unless of course leaving simple, unwrapped ArrayList, but that would make the code not thread-safe anymore. The tests here create a collection, and then modify it by adding elements to it.

The only options I see:

  1. Allow the introduction of mutable classes in Cactoos, so that we can use a mutable version of Synced. If this will be probably allowed after release 1.0, then I would like to know how far the project is from it.
  2. Establish that the tests are wrong (because they go against the principles of EO), so what we need is to change the tests (admitting it is possible to do so and preserve their semantics).
  3. Leave everything as it is, but this task would be unfeasible IMHO.

Have I missed something?

llorllale commented 5 years ago

@scristalli you can proceed with Synced

scristalli commented 5 years ago

@llorllale thanks for unblocking this. I'm following discussion in #947, which I think needs to be solved before this. I would happily avoid to Create a class similar to SyncCollection but mutable if a more general solution is approved in the project.