New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null point exception in StringEncoder of Netty 3.5.1 #28
Comments
Jetserver is using 3.3.1.Final. This one does not seem to have the problem. I had requested Netty team long time back if they could make their encoding/decoding logic to be more re-usable, seems we are going in opposite direction! |
:p I'm trying to use netty 4.x. But there are so many difference between 3.x and 4.x. |
BTW, may I ask another question: |
Without checking its hard to say. If you check the jetserver unit test cases, you can see usage of a DecoderEmbedder and EncoderEmbedder provided by netty. Simulate a pipeline using these and use a netty version in which its not working and try it out. In the mean time I will see if my flash client works for these versions of Netty. |
I have checked in the fix for NPE occurring in later versions of Netty for string encoder/decoder. Binaries are not updated, please take latest code and build. |
Thanks! |
Could you attach an example java object you are serializing to amf? I can run a test case and see whats messing up. |
Netty StringEncoder:
...
@OverRide
protected Object encode(
ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
if (!(msg instanceof String)) {
return msg;
}
return copiedBuffer(ctx.getChannel().getConfig().getBufferFactory().getDefaultOrder(), (String) msg, charset);
}
...
NettyUtils:
ChannelBuffer strBuffer = (ChannelBuffer) super.encode(null, null, msg);
The ChannelHandlerContext can not be null.
My version of writeString():
OR, which version of netty does not have this problem?...
The text was updated successfully, but these errors were encountered: