[findBugs] Prevent potential NPE in FileLfsRepository.getOutputStream()
Change-Id: I6f91997e8a976e5f4ace91c082d8b9adf1451adc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
5b104a7275
commit
bfebe6ae4b
|
@ -147,7 +147,10 @@ ReadableByteChannel getReadChannel(AnyLongObjectId id)
|
|||
AtomicObjectOutputStream getOutputStream(AnyLongObjectId id)
|
||||
throws IOException {
|
||||
Path path = getPath(id);
|
||||
Files.createDirectories(path.getParent());
|
||||
Path parent = path.getParent();
|
||||
if (parent != null) {
|
||||
Files.createDirectories(parent);
|
||||
}
|
||||
return new AtomicObjectOutputStream(path, id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue