catch and record benign network play exception

Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
This commit is contained in:
Jamin W. Collins
2018-08-24 19:49:01 -06:00
parent fb5710eeec
commit f500f6837f

View File

@@ -159,8 +159,14 @@ public enum ProtocolMethod {
} }
if (arg != null) { if (arg != null) {
// attempt to Serialize each argument, this will throw an exception if it can't. // attempt to Serialize each argument, this will throw an exception if it can't.
byte[] serialized = SerializationUtils.serialize((Serializable)arg); try {
SerializationUtils.deserialize(serialized); byte[] serialized = SerializationUtils.serialize((Serializable) arg);
SerializationUtils.deserialize(serialized);
} catch (ArrayIndexOutOfBoundsException ex) {
// not sure why this one would be thrown, but it is
// it also doesn't prevent things from working, so, log for now, pending full network rewrite
ex.printStackTrace();
}
} }
} }
} }