void (Notification newNotification) { final Notification notification = myProjectOutOfDateNotification.getAndSet(newNotification); if (notification != null) { notification.expire(); notification.hideBalloon(); } }