[#749] Report non @Shareable handler name that has been re-added.

This commit is contained in:
coltnz 2012-11-18 23:11:39 +13:00 committed by Norman Maurer
parent 5d2b41c094
commit fea7475080

View File

@ -627,7 +627,8 @@ public class DefaultChannelPipeline implements ChannelPipeline {
ChannelStateHandlerAdapter h = (ChannelStateHandlerAdapter) handler;
if (!h.isSharable() && h.added) {
throw new ChannelHandlerLifeCycleException(
"Only a @Sharable handler can be added or removed multiple times.");
h.getClass().getName() +
" is not a @Sharable handler, so can't be added or removed multiple times.");
}
h.added = true;
}