Fix generic handling of NameAlreadyUsedException in GerritCallback
GerritCallback identifies a NameAlreadyUsedException by checking the
exception message. Since commit 7125a01aa2
the exception message may now include the already used name. Because of
this the check in GerritCallback must be adapted. Make sure that the
already used name is included into the displayed error message.
Change-Id: I27813bca41c6218e7f6ce740b43a8d596c8763b5
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -18,13 +18,9 @@ package com.google.gerrit.common.errors;
|
||||
public class NameAlreadyUsedException extends Exception {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String MESSAGE = "Name Already Used";
|
||||
|
||||
public NameAlreadyUsedException() {
|
||||
super(MESSAGE);
|
||||
}
|
||||
public static final String MESSAGE = "Name Already Used: ";
|
||||
|
||||
public NameAlreadyUsedException(String name) {
|
||||
super(MESSAGE + ": " + name);
|
||||
super(MESSAGE + name);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user