NIHVIVO-1229 Restore debug statements in the RevisionInfoBuilder. Guard against nulls in revision level or release label.
This commit is contained in:
parent
9b3ac410c2
commit
4553694c77
2 changed files with 11 additions and 0 deletions
|
@ -29,6 +29,7 @@ public class InfoResponseParser {
|
|||
public String parse() {
|
||||
try {
|
||||
path = figurePath();
|
||||
System.err.println("path=" + path); // TODO
|
||||
|
||||
if (isTrunkPath()) {
|
||||
return "trunk";
|
||||
|
@ -52,6 +53,8 @@ public class InfoResponseParser {
|
|||
|
||||
String url = getUrlFromResponse();
|
||||
String root = getRootFromResponse();
|
||||
System.err.println("url=" + url); // TODO
|
||||
System.err.println("root=" + root); // TODO
|
||||
|
||||
if (!url.startsWith(root)) {
|
||||
throw new Exception("url doesn't start with root.");
|
||||
|
|
|
@ -71,6 +71,8 @@ public class RevisionInfoBuilder {
|
|||
|
||||
String release = assembleReleaseNameFromSubversion();
|
||||
String revision = obtainRevisionLevelFromSubversion();
|
||||
System.err.println("release=" + release); // TODO
|
||||
System.err.println("revision=" + revision); // TODO
|
||||
return buildLine(release, revision);
|
||||
}
|
||||
|
||||
|
@ -139,6 +141,12 @@ public class RevisionInfoBuilder {
|
|||
}
|
||||
|
||||
private String buildLine(String release, String revision) {
|
||||
if (release == null) {
|
||||
release = "unknown";
|
||||
}
|
||||
if (revision == null) {
|
||||
revision = "unknown";
|
||||
}
|
||||
return productName + INFO_LINE_DELIMITER + release.trim()
|
||||
+ INFO_LINE_DELIMITER + revision.trim();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue