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

Problem with RequestRouter#FilterSet Imutable iterator and Collections.sort with guava 19 #550

Closed
barjo opened this Issue Dec 15, 2015 · 8 comments

Comments

Projects
None yet
3 participants
@barjo
Member

barjo commented Dec 15, 2015

Guava 19 will throw an com.google.common.collect.UnmodifiableListIterator.set when https://github.com/wisdom-framework/wisdom/blob/master/core/router/src/main/java/org/wisdom/router/RequestRouter.java#L489 is called. ImmutableList.copyOf(this).iterator(); return an UnmodifiableListIterator

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Dec 15, 2015

Member

I'm not sure I follow.

It creates an unmodifiable list taking a snapshot of the current list. This should not be used to modify the underlying list (that's the purpose).

Do you have a reproducer for this issue ?

Member

cescoffier commented Dec 15, 2015

I'm not sure I follow.

It creates an unmodifiable list taking a snapshot of the current list. This should not be used to modify the underlying list (that's the purpose).

Do you have a reproducer for this issue ?

@barjo

This comment has been minimized.

Show comment
Hide comment
@barjo

barjo Dec 15, 2015

Member

Am not sure from where it comes, but the bindFilter, will add a filter that throw an UnmodifiableListIterator from guava 19 when sorted . I got it with a 0.10.0-SNAPSHOT wisdom framework.

Member

barjo commented Dec 15, 2015

Am not sure from where it comes, but the bindFilter, will add a filter that throw an UnmodifiableListIterator from guava 19 when sorted . I got it with a 0.10.0-SNAPSHOT wisdom framework.

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Dec 15, 2015

Member

It's because of the sort implementation sorting an array but setting the values using a ListIterator.

Member

cescoffier commented Dec 15, 2015

It's because of the sort implementation sorting an array but setting the values using a ListIterator.

@cescoffier cescoffier self-assigned this Dec 15, 2015

@cescoffier cescoffier added this to the 0.10.0 milestone Dec 15, 2015

@cescoffier cescoffier added the bug label Dec 15, 2015

@barjo

This comment has been minimized.

Show comment
Hide comment
@barjo

barjo Dec 15, 2015

Member

tricky

Member

barjo commented Dec 15, 2015

tricky

@barjo

This comment has been minimized.

Show comment
Hide comment
@barjo

barjo Dec 16, 2015

Member

side question, would it makes sens to use a TreeSet to store the filter rather than an ArrayList?

Member

barjo commented Dec 16, 2015

side question, would it makes sens to use a TreeSet to store the filter rather than an ArrayList?

@cescoffier cescoffier reopened this Dec 17, 2015

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Dec 17, 2015

Member

I've attempted a fix, please let me know as I'm unable to reproduce it.

Member

cescoffier commented Dec 17, 2015

I've attempted a fix, please let me know as I'm unable to reproduce it.

@jetien

This comment has been minimized.

Show comment
Hide comment
@jetien

jetien Dec 17, 2015

Contributor

It works for me ! thks

Contributor

jetien commented Dec 17, 2015

It works for me ! thks

@barjo

This comment has been minimized.

Show comment
Hide comment
@barjo

barjo Dec 18, 2015

Member

That works for me too (^^)b

Member

barjo commented Dec 18, 2015

That works for me too (^^)b

@barjo barjo closed this Dec 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment