diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/cmdline')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/cmdline/PackageIdentifier.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/cmdline/PackageIdentifier.java b/src/main/java/com/google/devtools/build/lib/cmdline/PackageIdentifier.java index 74cd6fa8d7..6445f48b32 100644 --- a/src/main/java/com/google/devtools/build/lib/cmdline/PackageIdentifier.java +++ b/src/main/java/com/google/devtools/build/lib/cmdline/PackageIdentifier.java @@ -38,7 +38,6 @@ public final class PackageIdentifier implements Comparable<PackageIdentifier>, S private static final Interner<PackageIdentifier> INTERNER = Interners.newWeakInterner(); - public static PackageIdentifier create(String repository, PathFragment pkgName) throws LabelSyntaxException { return create(RepositoryName.create(repository), pkgName); @@ -51,11 +50,13 @@ public final class PackageIdentifier implements Comparable<PackageIdentifier>, S public static final String DEFAULT_REPOSITORY = ""; public static final RepositoryName DEFAULT_REPOSITORY_NAME; public static final RepositoryName MAIN_REPOSITORY_NAME; + public static final PackageIdentifier EMPTY_PACKAGE_ID; static { try { DEFAULT_REPOSITORY_NAME = RepositoryName.create(DEFAULT_REPOSITORY); MAIN_REPOSITORY_NAME = RepositoryName.create("@"); + EMPTY_PACKAGE_ID = createInMainRepo(PathFragment.EMPTY_FRAGMENT); } catch (LabelSyntaxException e) { throw new IllegalStateException(e); } |