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
suggestion: netty/example/objectecho inform about missing "implements Serializable" on client side #10777
Comments
Enable |
if you mean: p.addLast(new LoggingHandler(LogLevel.DEBUG)); do not help. No information is printed. (using non-serialized object - that dont work) BELOW IS WORKING CASE(when i use serialized object), BUT PROBABLY FOUND SOME new BUG: Anyway im not sure if i found some BUG or what. by default without logging i have:
when i add for example p.addLast(new LoggingHandler(LogLevel.WARN)); i have:
and when i set p.addLast(new LoggingHandler(LogLevel.ERROR)); i see:
While EVERYTHING WORK FINE (since i use serialialized object in this example) how can i know if this is SEVERE or WARN or INFO, while it just depends what level i set, it anyway print same info that is harmless... or myabe i just dont understand what "LoggingHandler" is for |
This should help: #10807 |
Motivation: People may use the object serialisation example as a vehicle to test out sending their own objects across the wire. If those objects are not actually serialisable for some reason, then we need to let the exception propagate so that this becomes obvious to people. Modification: Add a listener to the future that sends the first serialisable message, so that we ensure that any exceptions that shows up during serialisation becomes visible. Without this, the state of the future that sent the first message was never checked or inspected anywhere. Result: Serialisation bugs in code derived from the Object Echo example are much easier to diagnose. This fixes netty#10777
…ple (#10807) Motivation: People may use the object serialisation example as a vehicle to test out sending their own objects across the wire. If those objects are not actually serialisable for some reason, then we need to let the exception propagate so that this becomes obvious to people. Modification: Add a listener to the future that sends the first serialisable message, so that we ensure that any exceptions that shows up during serialisation becomes visible. Without this, the state of the future that sent the first message was never checked or inspected anywhere. Result: Serialisation bugs in code derived from the Object Echo example are much easier to diagnose. This fixes #10777
…ple (#10807) Motivation: People may use the object serialisation example as a vehicle to test out sending their own objects across the wire. If those objects are not actually serialisable for some reason, then we need to let the exception propagate so that this becomes obvious to people. Modification: Add a listener to the future that sends the first serialisable message, so that we ensure that any exceptions that shows up during serialisation becomes visible. Without this, the state of the future that sent the first message was never checked or inspected anywhere. Result: Serialisation bugs in code derived from the Object Echo example are much easier to diagnose. This fixes #10777
…ple (netty#10807) Motivation: People may use the object serialisation example as a vehicle to test out sending their own objects across the wire. If those objects are not actually serialisable for some reason, then we need to let the exception propagate so that this becomes obvious to people. Modification: Add a listener to the future that sends the first serialisable message, so that we ensure that any exceptions that shows up during serialisation becomes visible. Without this, the state of the future that sent the first message was never checked or inspected anywhere. Result: Serialisation bugs in code derived from the Object Echo example are much easier to diagnose. This fixes netty#10777
Hello,
as new user i wanted to try Objectecho "Example", and was confused when i sent Serializable Object that were containing an "non-serializable" Object as some depth field(that i didnt notice earlier), it was not sent at all, and i received no information at all. It took me time to debug and notice that one of its fields was an object that didnt implement Serializable.
Thats why i just throw some suggestion to add into "Objectecho Example" some new user friendly code to inform about it like:
1) some "Objectecho Example" class extending ObjectEncoder:
OR
(i didnt try enable Asserts, so if you use some, this option might be better)
2) Just add comment about it, to let new users know they will receive NO information when trying to send complex Objects that in some depth contains non-serializable Object.
Please note this refer only to "Objectecho Example" and Encoder (so its client side).
Just thought it could be helpfull for new users having same problem.
Expected behavior
Actual behavior
Steps to reproduce
Netty version
4.1.43
And ofc, hello to netty users/devs ;)
Please close it if "Objectecho Example" is not prepared for new users and its for testing purpose, or if you think its not needed, since its just suggestion.
The text was updated successfully, but these errors were encountered: