yangxu998 / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Iterable returned from transform fails contains criteria. #673

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create list of Files.
2. Create Function<File, String> that returns file name.
3. Execute Lists.transform on list of files using function.
4. Call Iterables.contains on transformation using a name (String) that should 
match.

What is the expected output? What do you see instead?
Should return true. Returns false.

What version of the product are you using? On what operating system?
r09
Redhat

Please provide any additional information below.
It appears that TransformingRandomAccessList does not account for 
AbstractCollection's implementation of contains which uses the iterator. It 
appears that the iterator returned from TransformingRandomAccessList is an 
iterator over the pre-transformation type instead of the post-transformation 
type.

The same is true for TransformingSequentialList as it only overrides 
listIterator but not iterator.

Original issue reported on code.google.com by dancerj...@gmail.com on 29 Jul 2011 at 4:32

GoogleCodeExporter commented 9 years ago
Sorry, bug on my end. Please close.

Original comment by dancerj...@gmail.com on 29 Jul 2011 at 4:41

GoogleCodeExporter commented 9 years ago

Original comment by cgdec...@gmail.com on 29 Jul 2011 at 4:53

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:09