diff options
author | nharmata <nharmata@google.com> | 2017-08-21 22:31:26 +0200 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2017-08-22 09:14:12 +0200 |
commit | 7dc86d0906267c198c4146f8f8ef496639925392 (patch) | |
tree | 3793ce334f6f8a301ed3350adc517c2c5f927252 /src/main/java/com | |
parent | 8d9576d031654903bcdcecaea5b745456e299343 (diff) |
Minor change to the ActionOnIOExceptionReadingBuildFile interface.
RELNOTES: None
PiperOrigin-RevId: 165967625
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java index 4a6010faba..d47c902ff6 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java @@ -171,12 +171,13 @@ public class PackageFunction implements SkyFunction { */ public interface ActionOnIOExceptionReadingBuildFile { /** - * Given the {@link IOException} encountered when reading the contents of a BUILD file, + * Given the {@link IOException} encountered when reading the contents of the given BUILD file, * returns the contents that should be used, or {@code null} if the original {@link IOException} * should be respected (that is, we should error-out with a package loading error). */ @Nullable - byte[] maybeGetBuildFileContentsToUse(IOException originalExn); + byte[] maybeGetBuildFileContentsToUse( + PathFragment buildFilePathFragment, IOException originalExn); /** * A {@link ActionOnIOExceptionReadingBuildFile} whose {@link #maybeGetBuildFileContentsToUse} @@ -190,7 +191,8 @@ public class PackageFunction implements SkyFunction { @Override @Nullable - public byte[] maybeGetBuildFileContentsToUse(IOException originalExn) { + public byte[] maybeGetBuildFileContentsToUse( + PathFragment buildFilePathFragment, IOException originalExn) { return null; } } @@ -1218,8 +1220,8 @@ public class PackageFunction implements SkyFunction { : FileSystemUtils.readWithKnownFileSize( buildFilePath, buildFileValue.getSize()); } catch (IOException e) { - buildFileBytes = - actionOnIOExceptionReadingBuildFile.maybeGetBuildFileContentsToUse(e); + buildFileBytes = actionOnIOExceptionReadingBuildFile.maybeGetBuildFileContentsToUse( + buildFilePath.asFragment(), e); if (buildFileBytes == null) { // Note that we did the work that led to this IOException, so we should // conservatively report this error as transient. |