diff --git a/app/src/main/java/com/squareup/otto/LoggingBus.java b/app/src/main/java/com/squareup/otto/LoggingBus.java index 9a4d771dbb..d9758a9a24 100644 --- a/app/src/main/java/com/squareup/otto/LoggingBus.java +++ b/app/src/main/java/com/squareup/otto/LoggingBus.java @@ -5,6 +5,7 @@ import org.slf4j.LoggerFactory; import java.lang.reflect.Field; import java.lang.reflect.Method; +import java.util.ConcurrentModificationException; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -75,16 +76,19 @@ public class LoggingBus extends Bus { log.debug(" receiver: "); } - if (everyMinute < System.currentTimeMillis()) { - log.debug("***************** Event -> receiver pairings seen so far ****************"); - for (Map.Entry> stringSetEntry : event2Receiver.entrySet()) { - log.debug(" " + stringSetEntry.getKey()); - for (String s : stringSetEntry.getValue()) { - log.debug(" -> " + s); + try { + if (everyMinute < System.currentTimeMillis()) { + log.debug("***************** Event -> receiver pairings seen so far ****************"); + for (Map.Entry> stringSetEntry : event2Receiver.entrySet()) { + log.debug(" " + stringSetEntry.getKey()); + for (String s : stringSetEntry.getValue()) { + log.debug(" -> " + s); + } } + log.debug("*************************************************************************"); + everyMinute = System.currentTimeMillis() + 60 * 1000; } - log.debug("*************************************************************************"); - everyMinute = System.currentTimeMillis() + 60 * 1000; + } catch (ConcurrentModificationException ignored) { } super.dispatch(event, wrapper);