if(item instanceof ItemGroup){
buildsDiskUsage += getBuildsDiskUsageAllSubItems((ItemGroup)item);
}
else{
if(item instanceof AbstractProject){
AbstractProject project = (AbstractProject) item;
DiskUsageProperty property = (DiskUsageProperty) project.getProperty(DiskUsageProperty.class);
if(property==null){
DiskUsageUtil.addProperty(project);
property = (DiskUsageProperty) project.getProperty(DiskUsageProperty.class);
}
Set<DiskUsageBuildInformation> informations = property.getDiskUsageOfBuilds();
for(DiskUsageBuildInformation information : informations){
if(information.getNumber() == build.getNumber()){
buildsDiskUsage += information.getSize();