[
https://issues.apache.org/jira/browse/DIRMINA-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859647#action_12859647
]
Jacklondon Chen commented on DIRMINA-778:
-----------------------------------------
in code of TextLineCodecFactory,
public class TextLineCodecFactory implements ProtocolCodecFactory {
private final TextLineDecoder decoder;
public ProtocolDecoder getDecoder() {
return decoder;
}
which means one TextLineCodecFactory object holds one TextLineDecoder object,
and one TextLineDecoder holds one delimBuf .
That are all singleton from code:
acceptor.getFilterChain().addLast(
"codec",
new ProtocolCodecFilter(new TextLineCodecFactory(Charset
.forName("UTF-8"))));
Could you tell me which one is not singleton?
ProtocolCodecFilter/TextLineCodecFactory/TextLineDecoder/delimBuf ?
> TextLineDecoder not thread safe?
> --------------------------------
>
> Key: DIRMINA-778
> URL: https://issues.apache.org/jira/browse/DIRMINA-778
> Project: MINA
> Issue Type: Bug
> Components: Filter
> Affects Versions: 2.0.0-RC1
> Reporter: Jacklondon Chen
> Fix For: 2.0.0
>
>
> in sample code "reverser", there is code like this:
> acceptor.getFilterChain().addLast(
> "codec",
> new ProtocolCodecFilter(new TextLineCodecFactory(Charset
> .forName("UTF-8"))));
> and that means there is only one instance of TextLineCodecFactory, which
> holds one instance of TextLineEncoder, and TextLineDecoder has a member var
> named as "IoBuffer delimBuf".
> Is it thread safe to call decode() using this delimBuf?
> I think it's a bug.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.