Convert Branch.NameKey to AutoValue

See I6982fb24 for context.

Change-Id: I7a79a374c9efdd4ccd9ab5169562fb8ae3452120
This commit is contained in:
Dave Borowitz
2019-04-17 15:53:44 -07:00
parent 19ef3c8968
commit ac3b3d63d1
114 changed files with 436 additions and 451 deletions

View File

@@ -81,13 +81,13 @@ public class SubmoduleSectionParser {
String project;
if (branch.equals(".")) {
branch = superProjectBranch.get();
branch = superProjectBranch.branch();
}
// relative URL
if (url.startsWith("../")) {
// prefix with a slash for easier relative path walks
project = '/' + superProjectBranch.getParentKey().get();
project = '/' + superProjectBranch.project().get();
String hostPart = url;
while (hostPart.startsWith("../")) {
int lastSlash = project.lastIndexOf('/');
@@ -135,7 +135,7 @@ public class SubmoduleSectionParser {
}
Project.NameKey projectKey = new Project.NameKey(project);
return new SubmoduleSubscription(
superProjectBranch, new Branch.NameKey(projectKey, branch), path);
superProjectBranch, Branch.nameKey(projectKey, branch), path);
}
} catch (URISyntaxException e) {
// Error in url syntax (in fact it is uri syntax)