Merge branch 'stable-0.2' * stable-0.2: Bump version to 0.2-11 BlameCacheImpl: Avoid NPE if path does not exist VisibilityCacheTest: Open TestRepository in try-with-resource Backport all build-related commits from master to stable-0.2 Change-Id: I0c28c63abe2643c51232b27a299cf02777951610
diff --git a/java/com/google/gitiles/blame/cache/BlameCacheImpl.java b/java/com/google/gitiles/blame/cache/BlameCacheImpl.java index 320bf49..75ab09b 100644 --- a/java/com/google/gitiles/blame/cache/BlameCacheImpl.java +++ b/java/com/google/gitiles/blame/cache/BlameCacheImpl.java
@@ -136,6 +136,9 @@ public static List<Region> loadBlame(Key key, Repository repo) throws IOException { try (BlameGenerator gen = new BlameGenerator(repo, key.path)) { gen.push(null, key.commitId); + if (gen.getResultContents() == null) { + return ImmutableList.of(); + } return loadRegions(gen); } }