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
This commit is contained in:
Bruce Zu
2013-07-01 14:59:44 +08:00
parent 76c7890be2
commit d4268bd03f

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");