Commit 0a3d402
Fix Android client game events failing to deserialize in cross-platform network play (Card-Forge#10304)
JVM hardcodes serialVersionUID=0 for records, but Android's D8 desugaring
computes a different UID, causing InvalidClassException for all GameEvent
types in GameEventProxy's inner deserialization. Override readClassDescriptor()
to use the local class descriptor when UIDs mismatch, matching the existing
pattern in SaveFileData and CObjectInputStream.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5d90c0c commit 0a3d402
4 files changed
Lines changed: 25 additions & 18 deletions
File tree
- forge-game/src/main/java/forge/game/event
- forge-gui/src/main/java/forge
- gamemodes
- match
- net
- player
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 243 | + | |
| 244 | + | |
247 | 245 | | |
248 | 246 | | |
249 | 247 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
219 | 237 | | |
220 | 238 | | |
221 | 239 | | |
| |||
Lines changed: 4 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | 151 | | |
161 | 152 | | |
162 | 153 | | |
163 | 154 | | |
164 | 155 | | |
165 | 156 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
170 | 161 | | |
171 | 162 | | |
172 | 163 | | |
| |||
0 commit comments