Closed prithviraj2609 closed 1 month ago
Hello @nikhilnanivadekar,
Good Morning ! Just trying to understand if this issue can be assigned to me. I saw it open as "good first issue". not sure if the issue has already been solved The Issue was "Optimize ImmutableArrayList.takeWhile() and dropWhile() for small lists."
The unit tests are failing - the implementation of dropWhile looks like what I'd expect, but the implementation of takeWhile is now broken.
02:47:02:201 [ERROR] Tests run: 172, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.067 s <<< FAILURE! -- in org.eclipse.collections.impl.list.immutable.ImmutableArrayListTest
02:47:02:201 [ERROR] org.eclipse.collections.impl.list.immutable.ImmutableArrayListTest.takeWhile -- Time elapsed: 0.003 s <<< FAILURE!
java.lang.AssertionError: expected:<[1]> but was:<[2, 3]>
at org.eclipse.collections.impl.list.immutable.AbstractImmutableListTestCase.takeWhile(AbstractImmutableListTestCase.java:574)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
The commit message could mention the issue to automatically link them up. Something like Optimize ImmutableArrayList.takeWhile() and dropWhile() for small lists. Fixes #1640
The unit tests are failing - the implementation of dropWhile looks like what I'd expect, but the implementation of takeWhile is now broken.
02:47:02:201 [ERROR] Tests run: 172, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.067 s <<< FAILURE! -- in org.eclipse.collections.impl.list.immutable.ImmutableArrayListTest 02:47:02:201 [ERROR] org.eclipse.collections.impl.list.immutable.ImmutableArrayListTest.takeWhile -- Time elapsed: 0.003 s <<< FAILURE! java.lang.AssertionError: expected:<[1]> but was:<[2, 3]> at org.eclipse.collections.impl.list.immutable.AbstractImmutableListTestCase.takeWhile(AbstractImmutableListTestCase.java:574) at java.base/java.lang.reflect.Method.invoke(Method.java:566)
The tests are now passing with expected results
The tests are now passing with expected results
Thank you! Could you also squash the two commits into one?
The tests are now passing with expected results
Thank you! Could you also squash the two commits into one?
I have squashed the two commits into one.
I am also seeing the option Update Branch
should I update the branch?
I have squashed the two commits into one.
Looks like there are still two commits.
I have squashed the two commits into one.
Looks like there are still two commits.
![]()
Looks fine now, sorry for the mess
Have updated the methods takeWhile() and dropWhile() in the class ImmutableArrayList