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:
parent
d93c45fca6
commit
77eb5cd1cb
@ -196,7 +196,7 @@ public class MyWatchedProjectsScreen extends SettingsScreen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void doAddNew() {
|
protected void doAddNew() {
|
||||||
final String projectName = nameTxt.getText();
|
final String projectName = nameTxt.getText().trim();
|
||||||
if ("".equals(projectName)) {
|
if ("".equals(projectName)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user