Skip broken symbolic ref in DfsReftableDatabase
We skipped the broken symbolic reference in other implementation like DfsRefDatabase, RefDirectory. The broken symbolic reference may cause NPE when caller forget to have a null check against the object id before calling parse it. Change-Id: If5e07202e9ee329d0bd9488936d79c98143c7ad9 Signed-off-by: Zhen Chen <czhen@google.com>
This commit is contained in:
parent
f40ebed124
commit
5452ac1dea
|
@ -241,7 +241,7 @@ public Map<String, Ref> getRefs(String prefix) throws IOException {
|
|||
: table.seekRef(prefix)) {
|
||||
while (rc.next()) {
|
||||
Ref ref = table.resolve(rc.getRef());
|
||||
if (ref != null) {
|
||||
if (ref != null && ref.getObjectId() != null) {
|
||||
all.add(ref);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue