You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2008/11/11 16:50:44 UTC

[jira] Created: (DIRMINA-635) The IoFilter.preAdd method should take an IoSession argument

The IoFilter.preAdd method should take an IoSession argument
------------------------------------------------------------

                 Key: DIRMINA-635
                 URL: https://issues.apache.org/jira/browse/DIRMINA-635
             Project: MINA
          Issue Type: Bug
    Affects Versions: 2.0.0-M3
            Reporter: Emmanuel Lecharny


When injected an ProtocolCodecFilter in a chain when a session is already created, the encoder and decoder are never injected into the session's attribute, leading to NPE.

This could be fixed if we create those objects during the preAdd() phase, but we need to pass the session to this preAdd method. Anyway, it makes sense, as we may want to update some session's attribute during the addition, just in case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DIRMINA-635) The IoFilter.preAdd method should take an IoSession argument

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRMINA-635.
-------------------------------------


> The IoFilter.preAdd method should take an IoSession argument
> ------------------------------------------------------------
>
>                 Key: DIRMINA-635
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-635
>             Project: MINA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M3
>            Reporter: Emmanuel Lecharny
>            Assignee: Emmanuel Lecharny
>
> When injected an ProtocolCodecFilter in a chain when a session is already created, the encoder and decoder are never injected into the session's attribute, leading to NPE.
> This could be fixed if we create those objects during the preAdd() phase, but we need to pass the session to this preAdd method. Anyway, it makes sense, as we may want to update some session's attribute during the addition, just in case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DIRMINA-635) The IoFilter.preAdd method should take an IoSession argument

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny reassigned DIRMINA-635:
-----------------------------------------

    Assignee: Emmanuel Lecharny

> The IoFilter.preAdd method should take an IoSession argument
> ------------------------------------------------------------
>
>                 Key: DIRMINA-635
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-635
>             Project: MINA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M3
>            Reporter: Emmanuel Lecharny
>            Assignee: Emmanuel Lecharny
>
> When injected an ProtocolCodecFilter in a chain when a session is already created, the encoder and decoder are never injected into the session's attribute, leading to NPE.
> This could be fixed if we create those objects during the preAdd() phase, but we need to pass the session to this preAdd method. Anyway, it makes sense, as we may want to update some session's attribute during the addition, just in case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-635) The IoFilter.preAdd method should take an IoSession argument

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646583#action_12646583 ] 

Emmanuel Lecharny commented on DIRMINA-635:
-------------------------------------------

The preAdd method takes a IoFilterChain as a first argument, which has a getSession() method, so there is no need to pass a IoSession.

It will then be easy to modify the preAdd method to initialize the encoder and decoder there, instead of doing so in the sessionCreated() method.

Also we have to do it in both case, as the preAdd method is not called when the filter is added in the chain outside of the session.

> The IoFilter.preAdd method should take an IoSession argument
> ------------------------------------------------------------
>
>                 Key: DIRMINA-635
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-635
>             Project: MINA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M3
>            Reporter: Emmanuel Lecharny
>
> When injected an ProtocolCodecFilter in a chain when a session is already created, the encoder and decoder are never injected into the session's attribute, leading to NPE.
> This could be fixed if we create those objects during the preAdd() phase, but we need to pass the session to this preAdd method. Anyway, it makes sense, as we may want to update some session's attribute during the addition, just in case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRMINA-635) The IoFilter.preAdd method should take an IoSession argument

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRMINA-635.
---------------------------------------

    Resolution: Fixed

Fixed with : http://svn.apache.org/viewvc?rev=713125&view=rev

> The IoFilter.preAdd method should take an IoSession argument
> ------------------------------------------------------------
>
>                 Key: DIRMINA-635
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-635
>             Project: MINA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M3
>            Reporter: Emmanuel Lecharny
>            Assignee: Emmanuel Lecharny
>
> When injected an ProtocolCodecFilter in a chain when a session is already created, the encoder and decoder are never injected into the session's attribute, leading to NPE.
> This could be fixed if we create those objects during the preAdd() phase, but we need to pass the session to this preAdd method. Anyway, it makes sense, as we may want to update some session's attribute during the addition, just in case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.