From: Nathaniel Wesley Filardo Date: Sun, 22 Sep 2019 12:48:57 +0000 (+0100) Subject: lib: drop support for messages without timestamps X-Git-Tag: release-1.4~13 X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=84ab24fa53307ebaa6328dd4431ef2049bb1670e;p=acmetensortoys-ctfws-android lib: drop support for messages without timestamps All our tooling does the right thing, and this was always janky --- diff --git a/lib/src/main/java/com/acmetensortoys/ctfwstimer/lib/CtFwSGameStateManager.java b/lib/src/main/java/com/acmetensortoys/ctfwstimer/lib/CtFwSGameStateManager.java index 7c3876c..0049391 100644 --- a/lib/src/main/java/com/acmetensortoys/ctfwstimer/lib/CtFwSGameStateManager.java +++ b/lib/src/main/java/com/acmetensortoys/ctfwstimer/lib/CtFwSGameStateManager.java @@ -272,17 +272,12 @@ public class CtFwSGameStateManager { try { t = s.nextLong(); - } catch (NoSuchElementException nse) { - // Maybe they forgot a time stamp? Fake one up, a second ago or so, - // to allow for some clock drift and another message with a timestamp. - synchronized (this) { - m = new Msg(mT.wallMS() - 1000, str); - } - } - - if (m == null) { s.useDelimiter("\\z"); m = new Msg(t, s.next().trim()); + } catch (NoSuchElementException nse) { + // malformed message; shouldn't be a problem these days (while we used to + // make up a timestamp for the entire string as the message, our tooling + // always sends with timestamps now). } synchronized (this) {