@Override public void onAddedTo(AbstractBuild build) { try { BuildAction a = new BuildAction(build); FileUtils.writeStringToFile(a.getPollingLogFile(), pollingLog); build.addAction(a); } catch (IOException e) { LOGGER.log(WARNING, "Failed to persist the polling log", e); } pollingLog = null; }
@Override public void onAddedTo(AbstractBuild build) { BuildAction oldAction = build.getAction(BuildAction.class); if (oldAction != null) { build.getActions().remove(oldAction); } try { BuildAction a = new BuildAction(build); FileUtils.writeStringToFile(a.getPollingLogFile(), pollingLog); build.addAction(a); } catch (IOException e) { LOGGER.log(WARNING, "Failed to persist the polling log", e); } pollingLog = null; }