SiteLibraryLoaderUtil: catch NoSuchFileException when scanning for JARs
Without this, a stack trace is emitted to the console log. This causes a lot of noise particularly when running acceptance tests in Eclipse because it is emitted on every test. See [1] for an example of the stack trace. [1] http://paste.openstack.org/show/182219/ Change-Id: I1624f6a6aa42ae73ae1e97d1cb53d593184567ab
This commit is contained in:
parent
96de23a285
commit
1337e9726b
@ -17,6 +17,7 @@ package com.google.gerrit.common;
|
||||
import static com.google.gerrit.common.FileUtil.lastModified;
|
||||
|
||||
import com.google.common.collect.ComparisonChain;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Ordering;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
@ -25,6 +26,7 @@ import org.slf4j.LoggerFactory;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.NoSuchFileException;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
|
||||
@ -60,6 +62,8 @@ public final class SiteLibraryLoaderUtil {
|
||||
.result();
|
||||
}
|
||||
}.sortedCopy(jars);
|
||||
} catch (NoSuchFileException nsfe) {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user