mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raphaël P. Barazzutti (JIRA) <j...@apache.org>
Subject [jira] [Commented] (DIRMINA-949) Fixed IoBuffer.Pointer.setPosition to work in O(1) instead of O(n) in the common case
Date Thu, 18 Jul 2013 10:04:48 GMT

    [ 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

Mime
View raw message