Remove bad import of JGit Constants from GWT UI
This class cannot be imported into GWT UI code as it references symbols that are not legal in GWT input. We must inline the value of ".git". Change-Id: Ic399bfbb49d9c01ce74cdd8b800794e79f2cbcd1
This commit is contained in:
@@ -46,8 +46,6 @@ import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwtexpui.globalkey.client.NpTextBox;
|
||||
import com.google.gwtjsonrpc.common.VoidResult;
|
||||
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
|
||||
public class CreateProjectScreen extends Screen {
|
||||
private Grid grid;
|
||||
private NpTextBox project;
|
||||
@@ -238,13 +236,13 @@ public class CreateProjectScreen extends Screen {
|
||||
@Override
|
||||
public void onSuccess(VoidResult result) {
|
||||
String nameWithoutSuffix = projectName;
|
||||
if (nameWithoutSuffix.endsWith(Constants.DOT_GIT_EXT)) {
|
||||
if (nameWithoutSuffix.endsWith(".git")) {
|
||||
// Be nice and drop the trailing ".git" suffix, which we never
|
||||
// keep in our database, but clients might mistakenly provide
|
||||
// anyway.
|
||||
//
|
||||
nameWithoutSuffix = nameWithoutSuffix.substring(0, //
|
||||
nameWithoutSuffix.length() - Constants.DOT_GIT_EXT.length());
|
||||
nameWithoutSuffix.length() - 4);
|
||||
while (nameWithoutSuffix.endsWith("/")) {
|
||||
nameWithoutSuffix = nameWithoutSuffix.substring(//
|
||||
0, nameWithoutSuffix.length() - 1);
|
||||
|
||||
Reference in New Issue
Block a user