/** {@inheritDoc} */ @Override public Collection<Message> doUpgrade() throws Exception { for (Plan buildable : planManager.getAllPlansUnrestricted()) { if (Iterables.any( buildable.getBuildDefinition().getTaskDefinitions(), SonarPredicates.isSonarTask())) { logger.info("Check Sonar Tasks for " + buildable.getBuildKey()); for (TaskDefinition taskDefinition : Iterables.filter( buildable.getBuildDefinition().getTaskDefinitions(), SonarPredicates.isSonarTask())) { TaskDefinition newTaskDefinition = getTaskConfigurationService() .editTask( buildable.getPlanKey(), taskDefinition.getId(), taskDefinition.getUserDescription(), getTaskConfigurationMap(taskDefinition), taskDefinition.getRootDirectorySelector()); logger.info( "Encrypted task passwords of task [" + newTaskDefinition.getId() + "] of type [" + newTaskDefinition.getPluginKey() + "]"); } } else { logger.info(buildable.getBuildKey() + " has no Sonar Tasks to check"); } } return null; }