[findBugs] Fix potential NPE in GC
Change-Id: I59cda76b2c5039e08612f394ee4f7f1788578c49 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
48b772bec1
commit
f63267134f
|
@ -1204,9 +1204,10 @@ boolean tooManyLooseObjects() {
|
||||||
new DirectoryStream.Filter<Path>() {
|
new DirectoryStream.Filter<Path>() {
|
||||||
|
|
||||||
public boolean accept(Path file) throws IOException {
|
public boolean accept(Path file) throws IOException {
|
||||||
return Files.isRegularFile(file) && PATTERN_LOOSE_OBJECT
|
Path fileName = file.getFileName();
|
||||||
.matcher(file.getFileName().toString())
|
return Files.isRegularFile(file) && fileName != null
|
||||||
.matches();
|
&& PATTERN_LOOSE_OBJECT
|
||||||
|
.matcher(fileName.toString()).matches();
|
||||||
}
|
}
|
||||||
})) {
|
})) {
|
||||||
for (Iterator<Path> iter = stream.iterator(); iter.hasNext();
|
for (Iterator<Path> iter = stream.iterator(); iter.hasNext();
|
||||||
|
|
Loading…
Reference in New Issue