LOGGER.warning(()->"JENKINS-23152: "+rootDir+" already existed; will not overwrite with "+lastBuild+" but will create a fresh build #"+asJob().getNextBuildNumber());
returnnewBuild();
}
builds.put(lastBuild);
lastBuild.getPreviousBuild();// JENKINS-20662: create connection to previous build
returnlastBuild;
}catch(InvocationTargetExceptione){
LOGGER.log(Level.WARNING,String.format("A new build could not be created in job %s",asJob().getFullName()),e);