mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DIRMINA-739) IllegalArgumentException thrown from ErrorGeneratingFilter
Date Tue, 01 Sep 2009 10:05:32 GMT

     [ https://issues.apache.org/jira/browse/DIRMINA-739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Lecharny updated DIRMINA-739:
--------------------------------------

    Fix Version/s: 2.0.0-M7

> IllegalArgumentException thrown from ErrorGeneratingFilter
> ----------------------------------------------------------
>
>                 Key: DIRMINA-739
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-739
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 2.0.0-M6
>            Reporter: Stephen Crane
>            Assignee: Emmanuel Lecharny
>             Fix For: 2.0.0-M7
>
>
> I've configured an ErrorGeneratingFilter in my tests and am now occasionally seeing the
following exception:
> {code}
> Caused by: java.lang.IllegalArgumentException: n must be positive
> 	at java.util.Random.nextInt(Random.java:250)
> 	at org.apache.mina.filter.errorgenerating.ErrorGeneratingFilter.manipulateIoBuffer(ErrorGeneratingFilter.java:187)
> 	at org.apache.mina.filter.errorgenerating.ErrorGeneratingFilter.messageReceived(ErrorGeneratingFilter.java:118)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433)
> {code}
> Obviously buffer.remaining() is returning 0 here.
> How about the following fix?
> {code}
> if (buffer.remaining() > 0 && changeByteProbability > rng.nextInt(1000))
{
> 	// as before
> }
> {code}

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


Mime
View raw message