Fix hashcode changing between different executions (#2478)#2479
Fix hashcode changing between different executions (#2478)#2479dmulloy2 merged 1 commit intodmulloy2:masterfrom Mr-EmPee:master
Conversation
|
Another fix would be making the hashcode variable transient. |
|
Well if you open a PR to fix a bug it woild be really nice if you could explain in depth why the issue occurred in the first place ;) |
|
i think the real issue here is that it's relying on the hashCode being stable, which is not a safe assumption |
All the details are in the linked issue.
I mean we could just put a transient on the cached variable, that would solve the problem without assuming that they maintain the same hashcode |
|
The linked issue does not describe where the problem originates from. It only generically describes an issue with serialising/deserializing packet containers... |
To add more context, you serialize a packetContainer and when trying to deserialize it protocol lib does what I've describeded above and it fails. |
|
I think using |
right, so in my mind a proper fix addresses the fact that serialization relies on hashCode instead of something stable |
okay, I'm gonna try to add the modifier transient to the hashcode cache variable, that should fix the problem without --- edit |
Fixes the issue that was preventing the deserialization of PacketContainers
closes #2478