Remove unused InactiveAccountException class
InactiveAccountException is not thrown anywhere. Remove it and the only place where it's caught/handled. Change-Id: I12c918bd2c8ef5dc28c27fc0c50f731f3b0b0cec
This commit is contained in:
parent
b53d575af6
commit
472378fa0c
@ -1,26 +0,0 @@
|
||||
// Copyright (C) 2010 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.common.errors;
|
||||
|
||||
/** Error indicating the account is currently inactive. */
|
||||
public class InactiveAccountException extends Exception {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String MESSAGE = "Account Inactive: ";
|
||||
|
||||
public InactiveAccountException(String who) {
|
||||
super(MESSAGE + who);
|
||||
}
|
||||
}
|
@ -17,7 +17,6 @@ package com.google.gerrit.client.rpc;
|
||||
import com.google.gerrit.client.ErrorDialog;
|
||||
import com.google.gerrit.client.Gerrit;
|
||||
import com.google.gerrit.client.NotSignedInDialog;
|
||||
import com.google.gerrit.common.errors.InactiveAccountException;
|
||||
import com.google.gerrit.common.errors.NameAlreadyUsedException;
|
||||
import com.google.gerrit.common.errors.NoSuchAccountException;
|
||||
import com.google.gerrit.common.errors.NoSuchEntityException;
|
||||
@ -42,9 +41,6 @@ public abstract class GerritCallback<T> implements
|
||||
new NotSignedInDialog().center();
|
||||
} else if (isNoSuchEntity(caught)) {
|
||||
new ErrorDialog(Gerrit.C.notFoundBody()).center();
|
||||
} else if (isInactiveAccount(caught)) {
|
||||
new ErrorDialog(Gerrit.C.inactiveAccountBody()).center();
|
||||
|
||||
} else if (isNoSuchAccount(caught)) {
|
||||
final String msg = caught.getMessage();
|
||||
final String who = msg.substring(NoSuchAccountException.MESSAGE.length());
|
||||
@ -97,11 +93,6 @@ public abstract class GerritCallback<T> implements
|
||||
&& caught.getMessage().equals(NoSuchEntityException.MESSAGE));
|
||||
}
|
||||
|
||||
protected static boolean isInactiveAccount(final Throwable caught) {
|
||||
return caught instanceof RemoteJsonException
|
||||
&& caught.getMessage().startsWith(InactiveAccountException.MESSAGE);
|
||||
}
|
||||
|
||||
protected static boolean isNoSuchAccount(final Throwable caught) {
|
||||
return caught instanceof RemoteJsonException
|
||||
&& caught.getMessage().startsWith(NoSuchAccountException.MESSAGE);
|
||||
|
Loading…
Reference in New Issue
Block a user