locked += getBuildsDiskUsageAllSubItems(subGroup, older, yonger).get("locked");
notLoaded += getBuildsDiskUsageAllSubItems(subGroup, older, yonger).get("notLoaded");
}
else{
if(group instanceof AbstractProject){
AbstractProject p = (AbstractProject) item;
DiskUsageProperty property = (DiskUsageProperty) p.getProperty(DiskUsageProperty.class);
if(property==null){
DiskUsageUtil.addProperty(project);
property = project.getProperty(DiskUsageProperty.class);
}
Set<DiskUsageBuildInformation> informations = property.getDiskUsageOfBuilds();
for(DiskUsageBuildInformation information: informations){
Date date = null;
try {
date = Run.getIDFormatter().parse(information.getId());
} catch (ParseException ex) {
Logger.getLogger(ProjectDiskUsageAction.class.getName()).log(Level.SEVERE, null, ex);
continue;
}
if(older!=null && !date.before(older))
continue;
if(yonger!=null && !date.after(yonger))
continue;
Long size = information.getSize();
buildsDiskUsage += size;
Collection<AbstractBuild> loadedBuilds = (Collection<AbstractBuild>) p._getRuns().getLoadedBuilds().values();
AbstractBuild build = null;
for (AbstractBuild b : loadedBuilds){
if(b.getId().equals(information.getId())){
build = b;
}