You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…ent) is called.
Motivation:
We did not correctly copy elements in some cases when add(index, element) was used.
Modifications:
- Correctly detect when copy is neede and when not.
- Add test case.
Result:
Fixes#7938.
…ent) is called. (#7939)
Motivation:
We did not correctly copy elements in some cases when add(index, element) was used.
Modifications:
- Correctly detect when copy is neede and when not.
- Add test case.
Result:
Fixes#7938.
Expected behavior
When an element is added to the beginning of CodecOutputList, the remaining elements should be shifted to the right, see https://docs.oracle.com/javase/8/docs/api/java/util/List.html#add-int-E-
Actual behavior
The new element is added to the correct position, but the remaining elements are modified.
Steps to reproduce
Create a new CodecOutputList, add integer 1, then add interger 0 to the position 0. The element at position 1 is null
Minimal yet complete reproducer code (or URL to code)
package io.netty.handler.codec;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import io.netty.handler.codec.CodecOutputList;
public class CodecOuputListTest {
}
Netty version
4.1.25
JVM version (e.g.
java -version
)1.8.0_152
OS version (e.g.
uname -a
)Linux wks-balga 4.14.35 #1 SMP Mon Apr 23 06:09:12 UTC 2018 x86_64 Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz GenuineIntel GNU/Linux
The text was updated successfully, but these errors were encountered: