Skip to content

Commit

Permalink
Make PackageOrException.get() public + make loadPackages() variant.
Browse files Browse the repository at this point in the history
RELNOTES: None
PiperOrigin-RevId: 156876531
  • Loading branch information
cgrushko authored and iirina committed May 23, 2017
1 parent 8a5752d commit 6206d1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public Package loadPackage(PackageIdentifier pkgId)

@Override
public ImmutableMap<PackageIdentifier, PackageLoader.PackageOrException> loadPackages(
Iterable<PackageIdentifier> pkgIds) throws InterruptedException {
Iterable<? extends PackageIdentifier> pkgIds) throws InterruptedException {
ImmutableList.Builder<SkyKey> keysBuilder = ImmutableList.builder();
for (PackageIdentifier pkgId : pkgIds) {
keysBuilder.add(PackageValue.key(pkgId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface PackageLoader {
* Package#containsErrors}), e.g. if there was syntax error in the package's BUILD file.
*/
ImmutableMap<PackageIdentifier, PackageOrException> loadPackages(
Iterable<PackageIdentifier> pkgIds) throws InterruptedException;
Iterable<? extends PackageIdentifier> pkgIds) throws InterruptedException;

class PackageOrException {
private final Package pkg;
Expand All @@ -56,7 +56,7 @@ class PackageOrException {
* @throws NoSuchPackageException if there was a non-recoverable error loading the package, e.g.
* an io error reading the BUILD file.
*/
Package get() throws NoSuchPackageException {
public Package get() throws NoSuchPackageException {
if (pkg != null) {
return pkg;
}
Expand Down

0 comments on commit 6206d1e

Please sign in to comment.