I've been developping a chat client/server to get familiar with java, and I've run into a logic bug I don't understand.
I'm sending an object through a ObjectOutputStream (Message object, see ref), which contains fields and another object, which has 2 fields (User object). Before sending, using a debugger, I know that every field is correctly set up. On the receiving end, everything is correctly set up, except one of the field of the User class, which somehow gets reset to the value the same field of another User object of the program has. I've checked if they for some reason didn't share references, but a UserReceived.equals(UserInProgram) returns false (with no overrinding of the equals method).
Note: The only other instance of a User in the client (which pseudo field seems to be erasing the one received for some reason) is in another package, and set to private.
Relevant bits of code :
Message class, which is sent and received through the streams: http://codepaste.net/tiuxu7
User class, which field "pseudo" seem to be reset for some reason: http://codepaste.net/33m97j
Code to show how I'm sending/receiving the objects: http://codepaste.net/frxcv7
The complete source code of the server, client and library shared between those two can be found at github.com/TisButMe