Document the intended use of RepoCommand#setURI()

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I4a59dd8278b7b0026094692127b7f55e89c10bae
This commit is contained in:
Han-Wen Nienhuys 2017-03-29 13:51:57 +02:00
parent 6e652846f6
commit f32d65759c
1 changed files with 8 additions and 3 deletions

View File

@ -264,7 +264,11 @@ public RepoCommand setInputStream(InputStream inputStream) {
}
/**
* Set base URI of the pathes inside the XML
* Set base URI of the paths inside the XML. This is typically the name of
* the directory holding the manifest repository, eg. for
* https://android.googlesource.com/platform/manifest, this should be
* /platform (if you would run this on android.googlesource.com)
* or https://android.googlesource.com/platform elsewhere.
*
* @param uri
* @return this command
@ -448,9 +452,10 @@ public RepoCommand setIncludedFileReader(IncludedFileReader reader) {
public RevCommit call() throws GitAPIException {
try {
checkCallable();
if (uri == null || uri.length() == 0)
if (uri == null || uri.length() == 0) {
throw new IllegalArgumentException(
JGitText.get().uriNotConfigured);
JGitText.get().uriNotConfigured);
}
if (inputStream == null) {
if (manifestPath == null || manifestPath.length() == 0)
throw new IllegalArgumentException(