From d47025985fb927e9f5a5126bf5b76fda80956ce4 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Thu, 28 Aug 2008 18:09:09 +0000 Subject: [PATCH] [HUDSON-1461] reducing the amount of bogus error messages that Hudson prints during start up. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@11803 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/model/RunMap.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/model/RunMap.java b/core/src/main/java/hudson/model/RunMap.java index faeb2b08b2..19b816911e 100644 --- a/core/src/main/java/hudson/model/RunMap.java +++ b/core/src/main/java/hudson/model/RunMap.java @@ -162,7 +162,11 @@ public final class RunMap> extends AbstractMap imp buildDir.mkdirs(); String[] buildDirs = buildDir.list(new FilenameFilter() { public boolean accept(File dir, String name) { - return new File(dir,name).isDirectory(); + // HUDSON-1461 sometimes create bogus data directories with impossible dates, such as year 0. + // Date object doesn't roundtrip year 0 (year is -2,-1,+1,+2,... and there's no zero), + // so we eventually fail to load this data. + // so don't even bother trying.k + return !name.startsWith("0000") && new File(dir,name).isDirectory(); } }); -- GitLab