You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Norman Maurer (JIRA)" <ji...@apache.org> on 2010/04/12 09:51:40 UTC

[jira] Created: (DIRMINA-780) Writing null objects to the Session should raise an Exception

Writing null objects to the Session should raise an Exception
-------------------------------------------------------------

                 Key: DIRMINA-780
                 URL: https://issues.apache.org/jira/browse/DIRMINA-780
             Project: MINA
          Issue Type: Improvement
          Components: Core
            Reporter: Norman Maurer


When using MINA in JAMES we saw malformated packets when processing POP3. This was a cause of a bug in our code which wrote a "null" object to the session. Unfortunally MINA  don't throw an exception in this case and just write garbage to the session. We only found the bug because we have a netty implementation too which throws a NullPointerException in this case. 

I think MINA should do something similar..

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DIRMINA-780) Writing null objects to the Session should raise an Exception

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

Emmanuel Lecharny updated DIRMINA-780:
--------------------------------------

    Fix Version/s:     (was: 2.0.1)
                   2.0.2

> Writing null objects to the Session should raise an Exception
> -------------------------------------------------------------
>
>                 Key: DIRMINA-780
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-780
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.0-RC1
>            Reporter: Norman Maurer
>             Fix For: 2.0.2
>
>
> When using MINA in JAMES we saw malformated packets when processing POP3. This was a cause of a bug in our code which wrote a "null" object to the session. Unfortunally MINA  don't throw an exception in this case and just write garbage to the session. We only found the bug because we have a netty implementation too which throws a NullPointerException in this case. 
> I think MINA should do something similar..

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


[jira] Updated: (DIRMINA-780) Writing null objects to the Session should raise an Exception

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

Emmanuel Lecharny updated DIRMINA-780:
--------------------------------------

    Fix Version/s: 2.0.1
                       (was: 2.0.0)

Postponed to 2.0.1

> Writing null objects to the Session should raise an Exception
> -------------------------------------------------------------
>
>                 Key: DIRMINA-780
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-780
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.0-RC1
>            Reporter: Norman Maurer
>             Fix For: 2.0.1
>
>
> When using MINA in JAMES we saw malformated packets when processing POP3. This was a cause of a bug in our code which wrote a "null" object to the session. Unfortunally MINA  don't throw an exception in this case and just write garbage to the session. We only found the bug because we have a netty implementation too which throws a NullPointerException in this case. 
> I think MINA should do something similar..

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


[jira] Commented: (DIRMINA-780) Writing null objects to the Session should raise an Exception

Posted by "Ashish Paliwal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867124#action_12867124 ] 

Ashish Paliwal commented on DIRMINA-780:
----------------------------------------

Write API guards against null objects, here is the snippet from AbstractIoSession from trunk

    /**
     * {@inheritDoc}
     */
    public WriteFuture write(Object message) {
        return write(message, null);
    }

    /**
     * {@inheritDoc}
     */
    public WriteFuture write(Object message, SocketAddress remoteAddress) {
        if (message == null) {
            throw new NullPointerException("message");
        }
..

Am I looking at wrong place ?

> Writing null objects to the Session should raise an Exception
> -------------------------------------------------------------
>
>                 Key: DIRMINA-780
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-780
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.0-RC1
>            Reporter: Norman Maurer
>             Fix For: 2.0.0
>
>
> When using MINA in JAMES we saw malformated packets when processing POP3. This was a cause of a bug in our code which wrote a "null" object to the session. Unfortunally MINA  don't throw an exception in this case and just write garbage to the session. We only found the bug because we have a netty implementation too which throws a NullPointerException in this case. 
> I think MINA should do something similar..

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


[jira] Updated: (DIRMINA-780) Writing null objects to the Session should raise an Exception

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

Emmanuel Lecharny updated DIRMINA-780:
--------------------------------------

        Fix Version/s: 2.0.0
    Affects Version/s: 2.0.0-RC1

We have to fix this one before 2.0

> Writing null objects to the Session should raise an Exception
> -------------------------------------------------------------
>
>                 Key: DIRMINA-780
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-780
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.0-RC1
>            Reporter: Norman Maurer
>             Fix For: 2.0.0
>
>
> When using MINA in JAMES we saw malformated packets when processing POP3. This was a cause of a bug in our code which wrote a "null" object to the session. Unfortunally MINA  don't throw an exception in this case and just write garbage to the session. We only found the bug because we have a netty implementation too which throws a NullPointerException in this case. 
> I think MINA should do something similar..

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