Merge pull request #7898 from deathbeam/fix-infobox-messages

Log infobox removal only if infobox was removed
This commit is contained in:
Tomas Slusny
2019-02-17 21:05:35 +00:00
committed by GitHub

View File

@@ -76,18 +76,18 @@ public class InfoBoxManager
public void removeInfoBox(InfoBox infoBox) public void removeInfoBox(InfoBox infoBox)
{ {
log.debug("Removing InfoBox {}", infoBox);
if (infoBoxes.remove(infoBox)) if (infoBoxes.remove(infoBox))
{ {
log.debug("Removed InfoBox {}", infoBox);
refreshInfoBoxes(); refreshInfoBoxes();
} }
} }
public void removeIf(Predicate<InfoBox> filter) public void removeIf(Predicate<InfoBox> filter)
{ {
log.debug("Removing InfoBoxes for filter {}", filter);
if (infoBoxes.removeIf(filter)) if (infoBoxes.removeIf(filter))
{ {
log.debug("Removed InfoBoxes for filter {}", filter);
refreshInfoBoxes(); refreshInfoBoxes();
} }
} }