GitHub user orfjackal opened a pull request:
https://github.com/apache/mina/pull/3
Fixed IoBuffer.Pointer.setPosition to work in O(1) instead of O(n) in the
common case
IoBuffer.Pointer.setPosition used to always iterate through the singly
linked list starting from the very beginning. Here is a fix and a test to
reproduce the issue.
There are also some other small refactorings and javadoc fixes (that
IntelliJ IDEA's static analysis found - you should try running it also for the
rest of the project).
P.S: org.apache.mina.codec.IoBuffer#mark is broken. I'll file an issue for
that.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/orfjackal/mina iobuffer-fixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/mina/pull/3.patch
----
----