[
https://issues.apache.org/jira/browse/DIRMINA-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Trustin Lee resolved DIRMINA-410.
---------------------------------
Resolution: Fixed
I made the following changes to simplify DefaultIoFilterChainBuilder:
http://svn.apache.org/viewvc/mina/branches/1.1/core/src/main/java/org/apache/mina/common/DefaultIoFilterChainBuilder.java?r1=562335&r2=562334&pathrev=562335
The issues you addressed are also fixed in the change above.
> DefaultIoFilterChainBuilder synchronization issue with contains(...) methods
> ----------------------------------------------------------------------------
>
> Key: DIRMINA-410
> URL: https://issues.apache.org/jira/browse/DIRMINA-410
> Project: MINA
> Issue Type: Bug
> Affects Versions: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0, 1.0.4, 1.1.1
> Reporter: im-james
> Assignee: Trustin Lee
> Fix For: 1.0.5, 1.1.2
>
>
> In org.apache.mina.common.DefaultIoFilterChainBuilder, most public methods
> are synchronized to guard the variables "entries" and "entriesByName".
> However, 2 methods are not synchronized and I believe that they should be
> synchronized.
> I'm talking about these 2:
> public boolean contains(IoFilter filter) {...}
> public boolean contains(Class<? extends IoFilter> filterType) {...}
> it should be:
> public synchronized boolean contains(IoFilter filter) {...}
> public synchronized boolean contains(Class<? extends IoFilter> filterType)
> {...}
> The version on the trunk is different but I've got the impression that there
> is another type of bug:
> I've noticed that the variable "entries" is initialized with a "new
> CopyOnWriteArrayList<Entry>()". However, the clear() method put a regular
> "new ArrayList<Entry>()" into it. This is probably not what is intended.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.