Fix: NullPointerException of dashboard title

Fixed according to the Document about dashboard.title: "If not specified
the path of the dashboard config file is used as title."

Change-Id: Ia55ed5e491c676d3c4bfea4a069b998817997e24
(cherry picked from commit d4268bd03f1014edc747c10fe025787c4e42905f)
This commit is contained in:
Bruce Zu 2013-07-01 14:59:44 +08:00
parent 6eb69e631b
commit 9539366499

View File

@ -160,7 +160,8 @@ class DashboardsCollection implements
DashboardInfo info = new DashboardInfo(refName, path);
info.project = project;
info.definingProject = definingProject.getName();
info.title = replace(project, config.getString("dashboard", null, "title"));
String query = config.getString("dashboard", null, "title");
info.title = replace(project, query == null ? info.path : query);
info.description = replace(project, config.getString("dashboard", null, "description"));
info.foreach = config.getString("dashboard", null, "foreach");