Trim project name before adding it to watched projects list

When the project name is copied from somewhere with prefix
space or trailing space, click 'watch' button, Gerrit will
throw error.

Change-Id: Ie1ee301f62e8b30c5730794754091319ce3a71ae
This commit is contained in:
Bruce Zu 2013-04-09 11:10:26 +08:00
parent d93c45fca6
commit 77eb5cd1cb

View File

@ -196,7 +196,7 @@ public class MyWatchedProjectsScreen extends SettingsScreen {
}
protected void doAddNew() {
final String projectName = nameTxt.getText();
final String projectName = nameTxt.getText().trim();
if ("".equals(projectName)) {
return;
}