You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Raphaël P. Barazzutti (JIRA)" <ji...@apache.org> on 2013/07/18 12:04:48 UTC

[jira] [Commented] (DIRMINA-949) Fixed IoBuffer.Pointer.setPosition to work in O(1) instead of O(n) in the common case

    [ https://issues.apache.org/jira/browse/DIRMINA-949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13712186#comment-13712186 ] 

Raphaël P. Barazzutti commented on DIRMINA-949:
-----------------------------------------------

Hi Esko,

Thank you for your nice contribution!

Since methods providing relative reads and writes are already ensuring that they are on the appropriate position (by calling updatePos), we can then use IoBuffer.Pointer.setPosition in a lazy way. Which might be interesting in cases where reads (respectively writes) are eventually not done afterward. This lazy behaviour has no influence on other cases.

For the IoBuffer#mark you're right, a fix is ready done.

Cheers,

Raphaël
                
> Fixed IoBuffer.Pointer.setPosition to work in O(1) instead of O(n) in the common case
> -------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-949
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-949
>             Project: MINA
>          Issue Type: Bug
>    Affects Versions: 3.0.0-M1
>            Reporter: Esko Luontola
>
> IoBuffer.Pointer.setPosition used to always iterate through the singly linked list starting from the very beginning. There's a fix and a test to reproduce the issue at https://github.com/apache/mina/pull/3
> 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 another issue for that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira