Skip to content
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

Immutable list is not really immutable #1224

Closed
quantumlexa opened this issue Nov 3, 2019 · 38 comments
Closed

Immutable list is not really immutable #1224

quantumlexa opened this issue Nov 3, 2019 · 38 comments

Comments

@quantumlexa
Copy link

quantumlexa commented Nov 3, 2019

Please see the test:

    @Test
    public void testImmutability() {
        Immutable<String> immutable = new Immutable<>(new ArrayList<>(Arrays.asList("a", "b", "c")));
        int originalSize = immutable.size();
        immutable.subList(0, 2).add("d");
        Assert.assertEquals(originalSize, immutable.size());
    }

    @Test
    public void testImmutability2() {
        ArrayList<String> strings = new ArrayList<>(Arrays.asList("a", "b", "c"));
        Immutable<String> immutable = new Immutable<>(strings);
        int originalSize = immutable.size();
        strings.add("d");
        Assert.assertEquals(originalSize, immutable.size());
    }



@0crat
Copy link
Collaborator

0crat commented Nov 3, 2019

@paulodamaso/z please, pay attention to this issue

@0crat
Copy link
Collaborator

0crat commented Nov 3, 2019

@quantumlexa/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

@paulodamaso
Copy link
Contributor

@quantumlexa What behavior do you expect from this test execution?

@quantumlexa
Copy link
Author

@quantumlexa What behavior do you expect from this test execution?

I'd expect from Immutable list to be immutable, i.e. once the object is created - there is no way to modify it.
Please see the following: https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html

@paulodamaso
Copy link
Contributor

@0crat in

@0crat 0crat added the scope label Nov 6, 2019
@0crat
Copy link
Collaborator

0crat commented Nov 6, 2019

@0crat in (here)

@paulodamaso Job #1224 is now in scope, role is DEV

@0crat
Copy link
Collaborator

0crat commented Nov 6, 2019

@0crat in (here)

@paulodamaso Thanks for your contribution, @quantumlexa/z! If you would be a member of the project, you would now earn +15 reputation points, as explained in §29. You can join and apply to it, see §2.

@0crat
Copy link
Collaborator

0crat commented Nov 6, 2019

The job #1224 assigned to @iakunin/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

@fanifieiev
Copy link
Contributor

@quantumlexa What behavior do you expect from this test execution?

I'd expect from Immutable list to be immutable, i.e. once the object is created - there is no way to modify it.
Please see the following: https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html

@paulodamaso, @quantumlexa, @iakunin
I would also like to mention, that the subList method should return immutable list as well.
For now it does not.

@paulodamaso
Copy link
Contributor

@fanifieiev Yes, that is the cause of the problem

@fanifieiev
Copy link
Contributor

@fanifieiev Yes, that is the cause of the problem

@paulodamaso The cause is not only because of subList, but in general as well.
As the second test shows above, it is achievable without subList as well.

@iakunin
Copy link
Contributor

iakunin commented Nov 9, 2019

@0crat wait for #1232 to be merged

@0crat 0crat added the waiting label Nov 9, 2019
@0crat
Copy link
Collaborator

0crat commented Nov 9, 2019

@0crat wait for #1232 to be merged (here)

@iakunin The impediment for #1224 was registered successfully by @iakunin/z

@0pdd
Copy link
Collaborator

0pdd commented Nov 12, 2019

@quantumlexa the puzzle #1236 is still not solved.

@iakunin
Copy link
Contributor

iakunin commented Nov 13, 2019

@quantumlexa @paulodamaso is this issue solved? Can we close it?

1 similar comment
@iakunin
Copy link
Contributor

iakunin commented Nov 15, 2019

@quantumlexa @paulodamaso is this issue solved? Can we close it?

@fanifieiev
Copy link
Contributor

@quantumlexa @paulodamaso is this issue solved? Can we close it?

@iakunin I think only @paulodamaso can answer this question and decide to close the issue, but he is not responding for the last couple of days.

@iakunin
Copy link
Contributor

iakunin commented Nov 16, 2019

@iakunin I think only @paulodamaso can answer this question and decide to close the issue, but he is not responding for the last couple of days.

@fanifieiev yes, I asked @paulodamaso in Telegram and he advised me to ping @quantumlexa couple of times. And if it's no reply, then @paulodamaso will close this ticket.

@quantumlexa ping.

@paulodamaso
Copy link
Contributor

@iakunin Thanks!

@0crat
Copy link
Collaborator

0crat commented Nov 18, 2019

@sereshqua/z please review this job completed by @iakunin/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed

@0crat 0crat removed the scope label Nov 18, 2019
@0crat
Copy link
Collaborator

0crat commented Nov 18, 2019

The job #1224 is now out of scope

@sereshqua
Copy link

@quantumlexa please make sure that you start all your comments with the name of the user they are referred to, see

@iakunin
Copy link
Contributor

iakunin commented Nov 19, 2019

@sereshqua how long should we wait for @quantumlexa response to get this issue reviewed?

@sereshqua
Copy link

@iakunin up to 5 days

@quantumlexa
Copy link
Author

@sereshqua @iakunin I'm sorry guys, didn't know that you are waiting for me. As I'm not an owner the project, I just pointed out to the problem I found looking to the code - I'm good with either way.

@sereshqua
Copy link

@quantumlexa the only thing you missed was to start your comment with the name of the user to whom you addressed it :)

@sereshqua
Copy link

@0crat quality acceptable

@iakunin
Copy link
Contributor

iakunin commented Nov 20, 2019

@0crat status

@sereshqua
Copy link

@iakunin seems like 0crat went down :) and did not process this issue yet

@sereshqua
Copy link

@0crat quality acceptable

@iakunin
Copy link
Contributor

iakunin commented Nov 20, 2019

@sereshqua that's true. I hope he will awake soon :)

@0crat
Copy link
Collaborator

0crat commented Nov 20, 2019

@0crat quality acceptable (here)

@sereshqua There is no quality review for #1224, no performer

@iakunin
Copy link
Contributor

iakunin commented Nov 20, 2019

@0crat status

@0crat
Copy link
Collaborator

0crat commented Nov 20, 2019

Quality review completed: +4 point(s) just awarded to @sereshqua/z

@0crat
Copy link
Collaborator

0crat commented Nov 20, 2019

@0crat status (here)

@iakunin This is what I know about this job in C63314D6Z, as in §32:

@0crat
Copy link
Collaborator

0crat commented Nov 20, 2019

@0crat status (here)

@iakunin This is what I know about this job in C63314D6Z, as in §32:

@0crat
Copy link
Collaborator

0crat commented Nov 20, 2019

Order was finished, quality is "acceptable": +30 point(s) just awarded to @iakunin/z

@0pdd
Copy link
Collaborator

0pdd commented Feb 3, 2020

@quantumlexa the only puzzle #1236 is solved here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants