Remove modifiers 'public' and 'abstract' from interface methods

These modifiers are unnecessary (default for interface methods).

Change-Id: I5ad21dded21059922fb00449ba44e98037311ac4
This commit is contained in:
Urs Wolfer
2015-11-18 20:42:13 +01:00
committed by Edwin Kempin
parent 1bab069d1e
commit 4ebf42eb2b
80 changed files with 223 additions and 223 deletions

View File

@@ -23,5 +23,5 @@ import java.lang.annotation.Target;
@Target({METHOD})
@Retention(RUNTIME)
public @interface GerritConfigs {
public GerritConfig[] value();
GerritConfig[] value();
}

View File

@@ -22,11 +22,11 @@ import com.google.gerrit.extensions.api.projects.Projects;
import com.google.gerrit.extensions.restapi.NotImplementedException;
public interface GerritApi {
public Accounts accounts();
public Changes changes();
public Config config();
public Groups groups();
public Projects projects();
Accounts accounts();
Changes changes();
Config config();
Groups groups();
Projects projects();
/**
* A default implementation which allows source compatibility

View File

@@ -21,9 +21,9 @@ import java.util.EventListener;
/** Listener interested in server startup and shutdown events. */
@ExtensionPoint
public interface LifecycleListener extends EventListener {
/** Invoke when the server is starting. */
public void start();
/** Invoked when the server is starting. */
void start();
/** Invoked when the server is stopping. */
public void stop();
void stop();
}

View File

@@ -35,10 +35,10 @@ public interface UsageDataPublishedListener {
}
public interface MetaData {
public String getName();
public String getUnitName();
public String getUnitSymbol();
public String getDescription();
String getName();
String getUnitName();
String getUnitSymbol();
String getDescription();
}
void onUsageDataPublished(Event event);

View File

@@ -17,5 +17,5 @@ package com.google.gerrit.extensions.registration;
/** Handle for registered information. */
public interface RegistrationHandle {
/** Delete this registration. */
public void remove();
void remove();
}

View File

@@ -18,7 +18,7 @@ import com.google.inject.Key;
import com.google.inject.Provider;
public interface ReloadableRegistrationHandle<T> extends RegistrationHandle {
public Key<T> getKey();
Key<T> getKey();
public RegistrationHandle replace(Key<T> key, Provider<T> item);
RegistrationHandle replace(Key<T> key, Provider<T> item);
}

View File

@@ -18,5 +18,5 @@ package com.google.gerrit.extensions.restapi;
* A view which may change, although the underlying resource did not change
*/
public interface ETagView<R extends RestResource> extends RestReadView<R> {
public String getETag(R rsrc);
String getETag(R rsrc);
}

View File

@@ -30,11 +30,11 @@ public interface RestResource {
* @return time for the Last-Modified header. HTTP truncates the header
* value to seconds.
*/
public Timestamp getLastModified();
Timestamp getLastModified();
}
/** A resource with an ETag. */
public interface HasETag {
public String getETag();
String getETag();
}
}

View File

@@ -29,7 +29,7 @@ public interface UiAction<R extends RestResource> extends RestView<R> {
* assumed unavailable and not presented. This is usually the same as
* {@code setVisible(false)}.
*/
public Description getDescription(R resource);
Description getDescription(R resource);
/** Describes an action invokable through the web interface. */
public static class Description {

View File

@@ -15,5 +15,5 @@
package com.google.gwtexpui.globalkey.client;
public interface KeyCommandFilter {
public boolean include(KeyCommand key);
boolean include(KeyCommand key);
}

View File

@@ -22,7 +22,7 @@ public interface FindReplace {
* @return regular expression to match substrings with; should be treated as
* immutable.
*/
public RegExp pattern();
RegExp pattern();
/**
* Find and replace a single instance of this pattern in an input.
@@ -36,5 +36,5 @@ public interface FindReplace {
* @return result of regular expression replacement.
* @throws IllegalArgumentException if the input could not be safely sanitized.
*/
public String replace(String input);
String replace(String input);
}

View File

@@ -19,92 +19,92 @@ import com.google.gwt.resources.client.ImageResource;
public interface Resources extends ClientBundle {
@Source("addFileComment.png")
public ImageResource addFileComment();
ImageResource addFileComment();
@Source("arrowDown.png")
public ImageResource arrowDown();
ImageResource arrowDown();
@Source("arrowRight.png")
public ImageResource arrowRight();
ImageResource arrowRight();
@Source("arrowUp.png")
public ImageResource arrowUp();
ImageResource arrowUp();
@Source("deleteHover.png")
public ImageResource deleteHover();
ImageResource deleteHover();
@Source("deleteNormal.png")
public ImageResource deleteNormal();
ImageResource deleteNormal();
@Source("diffy26.png")
public ImageResource gerritAvatar26();
ImageResource gerritAvatar26();
@Source("downloadIcon.png")
public ImageResource downloadIcon();
ImageResource downloadIcon();
@Source("draftComments.png")
public ImageResource draftComments();
ImageResource draftComments();
@Source("editText.png")
public ImageResource edit();
ImageResource edit();
@Source("editUndo.png")
public ImageResource editUndo();
ImageResource editUndo();
@Source("gear.png")
public ImageResource gear();
ImageResource gear();
@Source("goNext.png")
public ImageResource goNext();
ImageResource goNext();
@Source("goPrev.png")
public ImageResource goPrev();
ImageResource goPrev();
@Source("goUp.png")
public ImageResource goUp();
ImageResource goUp();
@Source("greenCheck.png")
public ImageResource greenCheck();
ImageResource greenCheck();
@Source("info.png")
public ImageResource info();
ImageResource info();
@Source("listAdd.png")
public ImageResource listAdd();
ImageResource listAdd();
@Source("mediaFloppy.png")
public ImageResource save();
ImageResource save();
@Source("merge.png")
public ImageResource merge();
ImageResource merge();
@Source("queryIcon.png")
public ImageResource queryIcon();
ImageResource queryIcon();
@Source("readOnly.png")
public ImageResource readOnly();
ImageResource readOnly();
@Source("redNot.png")
public ImageResource redNot();
ImageResource redNot();
@Source("sideBySideDiff.png")
public ImageResource sideBySideDiff();
ImageResource sideBySideDiff();
@Source("starFilled.png")
public ImageResource starFilled();
ImageResource starFilled();
@Source("starOpen.png")
public ImageResource starOpen();
ImageResource starOpen();
@Source("undoNormal.png")
public ImageResource undoNormal();
ImageResource undoNormal();
@Source("unifiedDiff.png")
public ImageResource unifiedDiff();
ImageResource unifiedDiff();
@Source("warning.png")
public ImageResource warning();
ImageResource warning();
@Source("question.png")
public ImageResource question();
ImageResource question();
}

View File

@@ -25,11 +25,11 @@ public interface AdminResources extends ClientBundle {
AdminCss css();
@Source("deleteNormal.png")
public ImageResource deleteNormal();
ImageResource deleteNormal();
@Source("deleteHover.png")
public ImageResource deleteHover();
ImageResource deleteHover();
@Source("undoNormal.png")
public ImageResource undoNormal();
ImageResource undoNormal();
}

View File

@@ -38,7 +38,7 @@ public class StarredChanges {
/** Handler that can receive notifications of a change's starred status. */
public static interface ChangeStarHandler {
public void onChangeStar(ChangeStarEvent event);
void onChangeStar(ChangeStarEvent event);
}
/** Event fired when a star changes status. The new status is reported. */

View File

@@ -17,5 +17,5 @@ package com.google.gerrit.client.ui;
import com.google.gwt.event.shared.EventHandler;
public interface ScreenLoadHandler extends EventHandler {
public void onScreenLoad(ScreenLoadEvent event);
void onScreenLoad(ScreenLoadEvent event);
}

View File

@@ -401,23 +401,23 @@ public class CodeMirror extends JavaScriptObject {
}
public interface EventHandler {
public void handle(CodeMirror instance, NativeEvent event);
void handle(CodeMirror instance, NativeEvent event);
}
public interface RenderLineHandler {
public void handle(CodeMirror instance, LineHandle handle, Element element);
void handle(CodeMirror instance, LineHandle handle, Element element);
}
public interface GutterClickHandler {
public void handle(CodeMirror instance, int line, String gutter,
void handle(CodeMirror instance, int line, String gutter,
NativeEvent clickEvent);
}
public interface BeforeSelectionChangeHandler {
public void handle(CodeMirror instance, Pos anchor, Pos head);
void handle(CodeMirror instance, Pos anchor, Pos head);
}
public interface ChangesHandler {
public void handle(CodeMirror instance);
void handle(CodeMirror instance);
}
}

View File

@@ -21,18 +21,18 @@ import com.google.gerrit.server.CurrentUser;
import com.google.gerrit.server.account.AuthResult;
public interface WebSession {
public boolean isSignedIn();
public String getXGerritAuth();
public boolean isValidXGerritAuth(String keyIn);
public AccountExternalId.Key getLastLoginExternalId();
public CurrentUser getUser();
public void login(AuthResult res, boolean rememberMe);
boolean isSignedIn();
String getXGerritAuth();
boolean isValidXGerritAuth(String keyIn);
AccountExternalId.Key getLastLoginExternalId();
CurrentUser getUser();
void login(AuthResult res, boolean rememberMe);
/** Set the user account for this current request only. */
public void setUserAccountId(Account.Id id);
public boolean isAccessPathOk(AccessPath path);
public void setAccessPathOk(AccessPath path, boolean ok);
void setUserAccountId(Account.Id id);
boolean isAccessPathOk(AccessPath path);
void setAccessPathOk(AccessPath path, boolean ok);
public void logout();
public String getSessionId();
void logout();
String getSessionId();
}

View File

@@ -15,5 +15,5 @@
package com.google.gerrit.httpd.resources;
public interface ResourceKey {
public int weigh();
int weigh();
}

View File

@@ -23,5 +23,5 @@ interface DatabaseConfigInitializer {
* Performs database platform specific configuration steps and writes
* configuration parameters into the given database section
*/
public void initConfig(Section databaseSection);
void initConfig(Section databaseSection);
}

View File

@@ -33,7 +33,7 @@ public interface PluginsDistribution {
* IOException caused by dealing with the InputStream back to the
* caller
*/
public void process(String pluginName, InputStream in) throws IOException;
void process(String pluginName, InputStream in) throws IOException;
}
/**
@@ -45,7 +45,7 @@ public interface PluginsDistribution {
* @throws IOException in case of any other IO error caused by reading the
* plugin input stream
*/
public void foreach(Processor processor) throws FileNotFoundException, IOException;
void foreach(Processor processor) throws FileNotFoundException, IOException;
/**
* List plugins included in the Gerrit distribution
@@ -53,5 +53,5 @@ public interface PluginsDistribution {
* @throws FileNotFoundException if the location of the plugins couldn't be
* determined
*/
public List<String> listPluginNames() throws FileNotFoundException;
List<String> listPluginNames() throws FileNotFoundException;
}

View File

@@ -16,8 +16,8 @@ package com.google.gerrit.pgm.init.api;
/** A single step in the site initialization process. */
public interface InitStep {
public void run() throws Exception;
void run() throws Exception;
/** Executed after the site has been initialized */
public void postRun() throws Exception;
void postRun() throws Exception;
}

View File

@@ -56,7 +56,7 @@ public class Panel extends SimplePanel {
*
* @param panel panel that will contain the panel widget.
*/
public void onLoad(Panel panel);
void onLoad(Panel panel);
}
static final class Context extends JavaScriptObject {

View File

@@ -58,7 +58,7 @@ public final class Screen extends SimplePanel {
*
* @param screen panel that will contain the screen widget.
*/
public void onLoad(Screen screen);
void onLoad(Screen screen);
}
static final class Context extends JavaScriptObject {

View File

@@ -18,14 +18,14 @@ import com.google.gwtexpui.safehtml.client.SafeHtml;
public interface SparseHtmlFile {
/** @return the line of formatted HTML. */
public SafeHtml getSafeHtmlLine(int lineNo);
SafeHtml getSafeHtmlLine(int lineNo);
/** @return the number of lines in this sparse list. */
public int size();
int size();
/** @return true if the line is valid in this sparse list. */
public boolean contains(int idx);
boolean contains(int idx);
/** @return true if this line ends in the middle of a character edit span. */
public boolean hasTrailingEdit(int idx);
boolean hasTrailingEdit(int idx);
}

View File

@@ -39,7 +39,7 @@ public interface ChangeHooks {
* @param patchSet The Patchset that was created.
* @throws OrmException
*/
public void doPatchsetCreatedHook(Change change, PatchSet patchSet,
void doPatchsetCreatedHook(Change change, PatchSet patchSet,
ReviewDb db) throws OrmException;
/**
@@ -49,7 +49,7 @@ public interface ChangeHooks {
* @param patchSet The Patchset that was published.
* @throws OrmException
*/
public void doDraftPublishedHook(Change change, PatchSet patchSet,
void doDraftPublishedHook(Change change, PatchSet patchSet,
ReviewDb db) throws OrmException;
/**
@@ -62,7 +62,7 @@ public interface ChangeHooks {
* @param approvals Map of label IDs to scores
* @throws OrmException
*/
public void doCommentAddedHook(Change change, Account account,
void doCommentAddedHook(Change change, Account account,
PatchSet patchSet, String comment,
Map<String, Short> approvals, ReviewDb db)
throws OrmException;
@@ -76,7 +76,7 @@ public interface ChangeHooks {
* @param mergeResultRev The SHA-1 of the merge result revision.
* @throws OrmException
*/
public void doChangeMergedHook(Change change, Account account,
void doChangeMergedHook(Change change, Account account,
PatchSet patchSet, ReviewDb db, String mergeResultRev) throws OrmException;
/**
@@ -88,7 +88,7 @@ public interface ChangeHooks {
* @param reason The reason that the change failed to merge.
* @throws OrmException
*/
public void doMergeFailedHook(Change change, Account account,
void doMergeFailedHook(Change change, Account account,
PatchSet patchSet, String reason, ReviewDb db) throws OrmException;
/**
@@ -99,7 +99,7 @@ public interface ChangeHooks {
* @param reason Reason for abandoning the change.
* @throws OrmException
*/
public void doChangeAbandonedHook(Change change, Account account,
void doChangeAbandonedHook(Change change, Account account,
PatchSet patchSet, String reason, ReviewDb db) throws OrmException;
/**
@@ -110,7 +110,7 @@ public interface ChangeHooks {
* @param reason Reason for restoring the change.
* @throws OrmException
*/
public void doChangeRestoredHook(Change change, Account account,
void doChangeRestoredHook(Change change, Account account,
PatchSet patchSet, String reason, ReviewDb db) throws OrmException;
/**
@@ -120,7 +120,7 @@ public interface ChangeHooks {
* @param refUpdate An actual RefUpdate object
* @param account The gerrit user who moved the ref
*/
public void doRefUpdatedHook(Branch.NameKey refName, RefUpdate refUpdate,
void doRefUpdatedHook(Branch.NameKey refName, RefUpdate refUpdate,
Account account);
/**
@@ -131,7 +131,7 @@ public interface ChangeHooks {
* @param newId The ref's new id
* @param account The gerrit user who moved the ref
*/
public void doRefUpdatedHook(Branch.NameKey refName, ObjectId oldId,
void doRefUpdatedHook(Branch.NameKey refName, ObjectId oldId,
ObjectId newId, Account account);
/**
@@ -141,7 +141,7 @@ public interface ChangeHooks {
* @param patchSet The patchset that the reviewer was added on.
* @param account The gerrit user who was added as reviewer.
*/
public void doReviewerAddedHook(Change change, Account account,
void doReviewerAddedHook(Change change, Account account,
PatchSet patchSet, ReviewDb db) throws OrmException;
/**
@@ -151,10 +151,10 @@ public interface ChangeHooks {
* @param account The gerrit user who changed the topic.
* @param oldTopic The old topic name.
*/
public void doTopicChangedHook(Change change, Account account,
void doTopicChangedHook(Change change, Account account,
String oldTopic, ReviewDb db) throws OrmException;
public void doClaSignupHook(Account account, String claName);
void doClaSignupHook(Account account, String claName);
/**
* Fire the Ref update Hook
@@ -165,7 +165,7 @@ public interface ChangeHooks {
* @param oldId The ref's old id
* @param newId The ref's new id
*/
public HookResult doRefUpdateHook(Project project, String refName,
HookResult doRefUpdateHook(Project project, String refName,
Account uploader, ObjectId oldId, ObjectId newId);
/**
@@ -178,7 +178,7 @@ public interface ChangeHooks {
* @param db The database
* @throws OrmException
*/
public void doHashtagsChangedHook(Change change, Account account,
void doHashtagsChangedHook(Change change, Account account,
Set<String>added, Set<String> removed, Set<String> hashtags,
ReviewDb db) throws OrmException;
@@ -188,5 +188,5 @@ public interface ChangeHooks {
* @param project The project that was created
* @param headName The head name of the created project
*/
public void doProjectCreatedHook(Project.NameKey project, String headName);
void doProjectCreatedHook(Project.NameKey project, String headName);
}

View File

@@ -31,7 +31,7 @@ public interface EventDispatcher {
* @param db The database
* @throws OrmException
*/
public void postEvent(Change change, Event event, ReviewDb db)
void postEvent(Change change, Event event, ReviewDb db)
throws OrmException;
/**
@@ -40,5 +40,5 @@ public interface EventDispatcher {
* @param branchName The branch that the event is related to
* @param event The event to post
*/
public void postEvent(Branch.NameKey branchName, Event event);
void postEvent(Branch.NameKey branchName, Event event);
}

View File

@@ -19,5 +19,5 @@ import com.google.gerrit.server.events.Event;
@ExtensionPoint
public interface EventListener {
public void onEvent(Event event);
void onEvent(Event event);
}

View File

@@ -18,7 +18,7 @@ import com.google.gerrit.server.CurrentUser;
/** Distributes Events to ChangeListeners. Register listeners here. */
public interface EventSource {
public void addEventListener(EventListener listener, CurrentUser user);
void addEventListener(EventListener listener, CurrentUser user);
public void removeEventListener(EventListener listener);
void removeEventListener(EventListener listener);
}

View File

@@ -24,5 +24,5 @@ import com.google.gerrit.extensions.registration.RegistrationHandle;
* @param <V> type of the metric value, typically Integer or Long.
*/
public interface CallbackMetric<V> extends RegistrationHandle {
public void prune();
void prune();
}

View File

@@ -30,5 +30,5 @@ import com.googlecode.prolog_cafe.lang.Predicate;
@ExtensionPoint
public interface PredicateProvider {
/** Return set of packages that contain Prolog predicates */
public ImmutableSet<String> getPackages();
ImmutableSet<String> getPackages();
}

View File

@@ -20,7 +20,7 @@ import java.util.Set;
/** Translates an email address to a set of matching accounts. */
public interface AccountByEmailCache {
public Set<Account.Id> get(String email);
Set<Account.Id> get(String email);
public void evict(String email);
void evict(String email);
}

View File

@@ -18,13 +18,13 @@ import com.google.gerrit.reviewdb.client.Account;
/** Caches important (but small) account state to avoid database hits. */
public interface AccountCache {
public AccountState get(Account.Id accountId);
AccountState get(Account.Id accountId);
public AccountState getIfPresent(Account.Id accountId);
AccountState getIfPresent(Account.Id accountId);
public AccountState getByUsername(String username);
AccountState getByUsername(String username);
public void evict(Account.Id accountId);
void evict(Account.Id accountId);
public void evictByUsername(String username);
void evictByUsername(String username);
}

View File

@@ -40,7 +40,7 @@ import java.util.Map;
/** Access control management for server-wide capabilities. */
public class CapabilityControl {
public static interface Factory {
public CapabilityControl create(CurrentUser user);
CapabilityControl create(CurrentUser user);
}
private final CapabilityCollection capabilities;

View File

@@ -19,9 +19,9 @@ package com.google.gerrit.server.account;
* Expands user name to a local email address, usually by adding a domain.
*/
public interface EmailExpander {
public boolean canExpand(String user);
boolean canExpand(String user);
public String expand(String user);
String expand(String user);
public static class None implements EmailExpander {
public static final None INSTANCE = new None();

View File

@@ -19,9 +19,9 @@ import com.google.gerrit.reviewdb.client.AccountGroup;
/** Tracks group objects in memory for efficient access. */
public interface GroupCache {
public AccountGroup get(AccountGroup.Id groupId);
AccountGroup get(AccountGroup.Id groupId);
public AccountGroup get(AccountGroup.NameKey name);
AccountGroup get(AccountGroup.NameKey name);
/**
* Lookup a group definition by its UUID. The returned definition may be null
@@ -29,16 +29,16 @@ public interface GroupCache {
* copied from another server.
*/
@Nullable
public AccountGroup get(AccountGroup.UUID uuid);
AccountGroup get(AccountGroup.UUID uuid);
/** @return sorted iteration of groups. */
public abstract Iterable<AccountGroup> all();
Iterable<AccountGroup> all();
/** Notify the cache that a new group was constructed. */
public void onCreateGroup(AccountGroup.NameKey newGroupName);
void onCreateGroup(AccountGroup.NameKey newGroupName);
public void evict(AccountGroup group);
void evict(AccountGroup group);
public void evictAfterRename(final AccountGroup.NameKey oldName,
void evictAfterRename(final AccountGroup.NameKey oldName,
final AccountGroup.NameKey newName);
}

View File

@@ -21,14 +21,14 @@ import java.util.Set;
/** Tracks group inclusions in memory for efficient access. */
public interface GroupIncludeCache {
/** @return groups directly a member of the passed group. */
public Set<AccountGroup.UUID> subgroupsOf(AccountGroup.UUID group);
Set<AccountGroup.UUID> subgroupsOf(AccountGroup.UUID group);
/** @return any groups the passed group belongs to. */
public Set<AccountGroup.UUID> parentGroupsOf(AccountGroup.UUID groupId);
Set<AccountGroup.UUID> parentGroupsOf(AccountGroup.UUID groupId);
/** @return set of any UUIDs that are not internal groups. */
public Set<AccountGroup.UUID> allExternalMembers();
Set<AccountGroup.UUID> allExternalMembers();
public void evictSubgroupsOf(AccountGroup.UUID groupId);
public void evictParentGroupsOf(AccountGroup.UUID groupId);
void evictSubgroupsOf(AccountGroup.UUID groupId);
void evictParentGroupsOf(AccountGroup.UUID groupId);
}

View File

@@ -22,26 +22,26 @@ import java.util.Set;
public interface Realm {
/** Can the end-user modify this field of their own account? */
public boolean allowsEdit(Account.FieldName field);
boolean allowsEdit(Account.FieldName field);
/** Returns the account fields that the end-user can modify. */
public Set<Account.FieldName> getEditableFields();
Set<Account.FieldName> getEditableFields();
public AuthRequest authenticate(AuthRequest who) throws AccountException;
AuthRequest authenticate(AuthRequest who) throws AccountException;
public AuthRequest link(ReviewDb db, Account.Id to, AuthRequest who)
AuthRequest link(ReviewDb db, Account.Id to, AuthRequest who)
throws AccountException;
public AuthRequest unlink(ReviewDb db, Account.Id to, AuthRequest who)
AuthRequest unlink(ReviewDb db, Account.Id to, AuthRequest who)
throws AccountException;
public void onCreateAccount(AuthRequest who, Account account);
void onCreateAccount(AuthRequest who, Account account);
/** @return true if the user has the given email address. */
public boolean hasEmailAddress(IdentifiedUser who, String email);
boolean hasEmailAddress(IdentifiedUser who, String email);
/** @return all known email addresses for the identified user. */
public Set<String> getEmailAddresses(IdentifiedUser who);
Set<String> getEmailAddresses(IdentifiedUser who);
/**
* Locate an account whose local username is the given account name.
@@ -51,5 +51,5 @@ public interface Realm {
* how to convert the accountName into an email address, and then locate the
* user by that email address.
*/
public Account.Id lookup(String accountName);
Account.Id lookup(String accountName);
}

View File

@@ -37,7 +37,7 @@ public interface AvatarProvider {
* {@code null} is acceptable, and results in the server responding
* with a 404. This will hide the avatar image in the web UI.
*/
public String getUrl(IdentifiedUser forUser, int imageSize);
String getUrl(IdentifiedUser forUser, int imageSize);
/**
* Gets a URL for a user to modify their avatar image.
@@ -46,5 +46,5 @@ public interface AvatarProvider {
* @return a URL the user should visit to modify their avatar, or null if
* modification is not possible.
*/
public String getChangeAvatarUrl(IdentifiedUser forUser);
String getChangeAvatarUrl(IdentifiedUser forUser);
}

View File

@@ -17,7 +17,7 @@ package com.google.gerrit.server.cache;
import com.google.common.cache.RemovalNotification;
public interface CacheRemovalListener<K,V> {
public void onRemoval(String pluginName,
void onRemoval(String pluginName,
String cacheName,
RemovalNotification<K, V> notification);
}

View File

@@ -29,8 +29,8 @@ import org.eclipse.jgit.lib.Repository;
* implementation changes, which might invalidate old entries).
*/
public interface ChangeKindCache {
public ChangeKind getChangeKind(ProjectState project, Repository repo,
ChangeKind getChangeKind(ProjectState project, Repository repo,
ObjectId prior, ObjectId next);
public ChangeKind getChangeKind(ReviewDb db, Change change, PatchSet patch);
ChangeKind getChangeKind(ReviewDb db, Change change, PatchSet patch);
}

View File

@@ -39,9 +39,9 @@ public interface MergeabilityCache {
}
}
public boolean get(ObjectId commit, Ref intoRef, SubmitType submitType,
boolean get(ObjectId commit, Ref intoRef, SubmitType submitType,
String mergeStrategy, Branch.NameKey dest, Repository repo, ReviewDb db);
public Boolean getIfPresent(ObjectId commit, Ref intoRef,
Boolean getIfPresent(ObjectId commit, Ref intoRef,
SubmitType submitType, String mergeStrategy);
}

View File

@@ -37,7 +37,7 @@ import com.google.inject.assistedinject.AssistedInject;
public class ProjectOwnerGroupsProvider extends GroupSetProvider {
public interface Factory {
public ProjectOwnerGroupsProvider create(Project.NameKey project);
ProjectOwnerGroupsProvider create(Project.NameKey project);
}
@AssistedInject

View File

@@ -77,7 +77,7 @@ import java.util.TimeZone;
*/
public class BatchUpdate implements AutoCloseable {
public interface Factory {
public BatchUpdate create(ReviewDb db, Project.NameKey project,
BatchUpdate create(ReviewDb db, Project.NameKey project,
CurrentUser user, Timestamp when);
}

View File

@@ -20,5 +20,5 @@ import com.google.gerrit.reviewdb.client.Project;
import java.util.List;
public interface ChangeCache {
public List<Change> get(Project.NameKey name);
List<Change> get(Project.NameKey name);
}

View File

@@ -41,7 +41,7 @@ public interface GitRepositoryManager {
* repository.
* @throws IOException the name cannot be read as a repository.
*/
public abstract Repository openRepository(Project.NameKey name)
Repository openRepository(Project.NameKey name)
throws RepositoryNotFoundException, IOException;
/**
@@ -58,7 +58,7 @@ public interface GitRepositoryManager {
* @throws RepositoryNotFoundException the name is invalid.
* @throws IOException the repository cannot be created.
*/
public abstract Repository createRepository(Project.NameKey name)
Repository createRepository(Project.NameKey name)
throws RepositoryCaseMismatchException, RepositoryNotFoundException,
IOException;
@@ -76,11 +76,11 @@ public interface GitRepositoryManager {
* repository.
* @throws IOException the name cannot be read as a repository.
*/
public abstract Repository openMetadataRepository(Project.NameKey name)
Repository openMetadataRepository(Project.NameKey name)
throws RepositoryNotFoundException, IOException;
/** @return set of all known projects, sorted by natural NameKey order. */
public abstract SortedSet<Project.NameKey> list();
SortedSet<Project.NameKey> list();
/**
* Read the {@code GIT_DIR/description} file for gitweb.
@@ -94,7 +94,7 @@ public interface GitRepositoryManager {
* @throws IOException the description file exists, but is not readable by
* this process.
*/
public abstract String getProjectDescription(Project.NameKey name)
String getProjectDescription(Project.NameKey name)
throws RepositoryNotFoundException, IOException;
/**
@@ -106,6 +106,6 @@ public interface GitRepositoryManager {
* @param name the repository name, relative to the base directory.
* @param description new description text for the repository.
*/
public abstract void setProjectDescription(Project.NameKey name,
void setProjectDescription(Project.NameKey name,
final String description);
}

View File

@@ -19,5 +19,5 @@ public interface QueueProvider {
INTERACTIVE, BATCH
}
public WorkQueue.Executor getQueue(QueueType type);
WorkQueue.Executor getQueue(QueueType type);
}

View File

@@ -32,5 +32,5 @@ public interface ReceivePackInitializer {
* @param project project for which the ReceivePack is created
* @param receivePack the ReceivePack instance which is being initialized
*/
public void init(Project.NameKey project, ReceivePack receivePack);
void init(Project.NameKey project, ReceivePack receivePack);
}

View File

@@ -28,7 +28,7 @@ import java.util.Map;
public class TabFile {
public interface Parser {
public String parse(String str);
String parse(String str);
}
public static Parser TRIM = new Parser() {

View File

@@ -246,7 +246,7 @@ public class WorkQueue {
/** Runnable needing to know it was canceled. */
public interface CancelableRunnable extends Runnable {
/** Notifies the runnable it was canceled. */
public void cancel();
void cancel();
}
/** A wrapper around a scheduled Runnable, as maintained in the queue. */

View File

@@ -34,6 +34,6 @@ public interface CommitValidationListener {
* @return list of validation messages
* @throws CommitValidationException if validation fails
*/
public List<CommitValidationMessage> onCommitReceived(CommitReceivedEvent receiveEvent)
List<CommitValidationMessage> onCommitReceived(CommitReceivedEvent receiveEvent)
throws CommitValidationException;
}

View File

@@ -39,7 +39,7 @@ public interface MergeValidationListener {
* @param patchSetId the patch set ID
* @throws MergeValidationException if the commit fails to validate
*/
public void onPreMerge(Repository repo,
void onPreMerge(Repository repo,
CodeReviewCommit commit,
ProjectState destProject,
Branch.NameKey destBranch,

View File

@@ -51,7 +51,7 @@ public interface UploadValidationListener {
* @throws ValidationException to block the upload and send a message
* back to the end-user over the client's protocol connection.
*/
public void onPreUpload(Repository repository, Project project,
void onPreUpload(Repository repository, Project project,
String remoteHost, UploadPack up, Collection<? extends ObjectId> wants,
Collection<? extends ObjectId> haves)
throws ValidationException;

View File

@@ -35,10 +35,10 @@ import java.io.IOException;
*/
public interface ChangeIndex {
/** @return the schema version used by this index. */
public Schema<ChangeData> getSchema();
Schema<ChangeData> getSchema();
/** Close this index. */
public void close();
void close();
/**
* Update a change document in the index.
@@ -52,7 +52,7 @@ public interface ChangeIndex {
*
* @throws IOException
*/
public void replace(ChangeData cd) throws IOException;
void replace(ChangeData cd) throws IOException;
/**
* Delete a change document from the index by id.
@@ -61,14 +61,14 @@ public interface ChangeIndex {
*
* @throws IOException
*/
public void delete(Change.Id id) throws IOException;
void delete(Change.Id id) throws IOException;
/**
* Delete all change documents from the index.
*
* @throws IOException
*/
public void deleteAll() throws IOException;
void deleteAll() throws IOException;
/**
* Convert the given operator predicate into a source searching the index and
@@ -90,7 +90,7 @@ public interface ChangeIndex {
* @throws QueryParseException if the predicate could not be converted to an
* indexed data source.
*/
public ChangeDataSource getSource(Predicate<ChangeData> p, QueryOptions opts)
ChangeDataSource getSource(Predicate<ChangeData> p, QueryOptions opts)
throws QueryParseException;
/**
@@ -99,5 +99,5 @@ public interface ChangeIndex {
* @param ready whether the index is ready
* @throws IOException
*/
public void markReady(boolean ready) throws IOException;
void markReady(boolean ready) throws IOException;
}

View File

@@ -25,9 +25,9 @@ import java.util.List;
public class AddKeySender extends OutgoingEmail {
public interface Factory {
public AddKeySender create(IdentifiedUser user, AccountSshKey sshKey);
AddKeySender create(IdentifiedUser user, AccountSshKey sshKey);
public AddKeySender create(IdentifiedUser user, List<String> gpgKey);
AddKeySender create(IdentifiedUser user, List<String> gpgKey);
}
private final IdentifiedUser callingUser;

View File

@@ -52,7 +52,7 @@ public class CommentSender extends ReplyToChangeSender {
.getLogger(CommentSender.class);
public static interface Factory {
public CommentSender create(NotifyHandling notify, Change.Id id);
CommentSender create(NotifyHandling notify, Change.Id id);
}
private final NotifyHandling notify;

View File

@@ -33,7 +33,7 @@ public class CreateChangeSender extends NewChangeSender {
LoggerFactory.getLogger(CreateChangeSender.class);
public static interface Factory {
public CreateChangeSender create(Change.Id id);
CreateChangeSender create(Change.Id id);
}
@Inject

View File

@@ -28,7 +28,7 @@ public interface EmailTokenVerifier {
* the string provides proof the user has the ability to read messages
* sent to that address. Must not be null.
*/
public String encode(Account.Id accountId, String emailAddress);
String encode(Account.Id accountId, String emailAddress);
/**
* Decode a token previously created.
@@ -36,7 +36,7 @@ public interface EmailTokenVerifier {
* @return a pair of account id and email address.
* @throws InvalidTokenException the token is invalid, expired, malformed, etc.
*/
public ParsedToken decode(String tokenString) throws InvalidTokenException;
ParsedToken decode(String tokenString) throws InvalidTokenException;
/** Exception thrown when a token does not parse correctly. */
public static class InvalidTokenException extends Exception {

View File

@@ -18,7 +18,7 @@ import com.google.gerrit.reviewdb.client.Account;
/** Constructs an address to send email from. */
public interface FromAddressGenerator {
public boolean isGenericAddress(Account.Id fromId);
boolean isGenericAddress(Account.Id fromId);
public Address from(Account.Id fromId);
Address from(Account.Id fromId);
}

View File

@@ -23,7 +23,7 @@ import com.google.inject.assistedinject.Assisted;
/** Send notice about a change failing to merged. */
public class MergeFailSender extends ReplyToChangeSender {
public static interface Factory {
public MergeFailSender create(Change.Id id);
MergeFailSender create(Change.Id id);
}
@Inject

View File

@@ -31,7 +31,7 @@ import com.google.inject.assistedinject.Assisted;
/** Send notice about a change successfully merged. */
public class MergedSender extends ReplyToChangeSender {
public static interface Factory {
public MergedSender create(Change.Id id);
MergedSender create(Change.Id id);
}
private final LabelTypes labelTypes;

View File

@@ -23,7 +23,7 @@ import com.google.inject.assistedinject.Assisted;
public class RegisterNewEmailSender extends OutgoingEmail {
public interface Factory {
public RegisterNewEmailSender create(String address);
RegisterNewEmailSender create(String address);
}
private final EmailTokenVerifier tokenVerifier;

View File

@@ -31,7 +31,7 @@ import java.util.Set;
/** Send notice of new patch sets for reviewers. */
public class ReplacePatchSetSender extends ReplyToChangeSender {
public static interface Factory {
public ReplacePatchSetSender create(Change.Id id);
ReplacePatchSetSender create(Change.Id id);
}
private final Set<Account.Id> reviewers = new HashSet<>();

View File

@@ -22,7 +22,7 @@ import com.google.gwtorm.server.OrmException;
/** Alert a user to a reply to a change, usually commentary made during review. */
public abstract class ReplyToChangeSender extends ChangeEmail {
public static interface Factory<T extends ReplyToChangeSender> {
public T create(Change.Id id);
T create(Change.Id id);
}
protected ReplyToChangeSender(EmailArguments ea, String mc, ChangeData cd)

View File

@@ -31,7 +31,7 @@ public interface FileTypeRegistry {
* or cannot be determined, {@link MimeUtil2#UNKNOWN_MIME_TYPE} which
* is an alias for {@code application/octet-stream}.
*/
public abstract MimeType getMimeType(final String path, final byte[] content);
MimeType getMimeType(final String path, final byte[] content);
/**
* Is this content type safe to transmit to a browser directly?
@@ -42,6 +42,6 @@ public interface FileTypeRegistry {
* content type and wants it to be protected (typically by wrapping
* the data in a ZIP archive).
*/
public abstract boolean isSafeInline(final MimeType type);
boolean isSafeInline(final MimeType type);
}

View File

@@ -20,12 +20,12 @@ import com.google.gerrit.reviewdb.client.Project;
/** Provides a cached list of {@link PatchListEntry}. */
public interface PatchListCache {
public PatchList get(PatchListKey key, Project.NameKey project)
PatchList get(PatchListKey key, Project.NameKey project)
throws PatchListNotAvailableException;
public PatchList get(Change change, PatchSet patchSet)
PatchList get(Change change, PatchSet patchSet)
throws PatchListNotAvailableException;
public IntraLineDiff getIntraLineDiff(IntraLineDiffKey key,
IntraLineDiff getIntraLineDiff(IntraLineDiffKey key,
IntraLineDiffArgs args);
}

View File

@@ -16,5 +16,5 @@ package com.google.gerrit.server.plugins;
/** Broadcasts event indicating a plugin was reloaded. */
public interface ReloadPluginListener {
public void onReloadPlugin(Plugin oldPlugin, Plugin newPlugin);
void onReloadPlugin(Plugin oldPlugin, Plugin newPlugin);
}

View File

@@ -16,5 +16,5 @@ package com.google.gerrit.server.plugins;
/** Broadcasts event indicating a plugin was loaded. */
public interface StartPluginListener {
public void onStartPlugin(Plugin plugin);
void onStartPlugin(Plugin plugin);
}

View File

@@ -16,5 +16,5 @@ package com.google.gerrit.server.plugins;
/** Broadcasts event indicating a plugin was unloaded. */
public interface StopPluginListener {
public void onStopPlugin(Plugin plugin);
void onStopPlugin(Plugin plugin);
}

View File

@@ -23,10 +23,10 @@ import java.util.Set;
/** Cache of project information, including access rights. */
public interface ProjectCache {
/** @return the parent state for all projects on this server. */
public ProjectState getAllProjects();
ProjectState getAllProjects();
/** @return the project state of the project storing meta data for all users. */
public ProjectState getAllUsers();
ProjectState getAllUsers();
/**
* Get the cached data for a project by its unique name.
@@ -35,7 +35,7 @@ public interface ProjectCache {
* @return the cached data; null if no such project exists or a error occurred.
* @see #checkedGet(com.google.gerrit.reviewdb.client.Project.NameKey)
*/
public ProjectState get(Project.NameKey projectName);
ProjectState get(Project.NameKey projectName);
/**
* Get the cached data for a project by its unique name.
@@ -44,14 +44,14 @@ public interface ProjectCache {
* @throws IOException when there was an error.
* @return the cached data; null if no such project exists.
*/
public ProjectState checkedGet(Project.NameKey projectName)
ProjectState checkedGet(Project.NameKey projectName)
throws IOException;
/** Invalidate the cached information about the given project. */
public void evict(Project p);
void evict(Project p);
/** Invalidate the cached information about the given project. */
public void evict(Project.NameKey p);
void evict(Project.NameKey p);
/**
* Remove information about the given project from the cache. It will no
@@ -60,14 +60,14 @@ public interface ProjectCache {
void remove(Project p);
/** @return sorted iteration of projects. */
public abstract Iterable<Project.NameKey> all();
Iterable<Project.NameKey> all();
/**
* @return estimated set of relevant groups extracted from hot project access
* rules. If the cache is cold or too small for the entire project set
* of the server, this set may be incomplete.
*/
public abstract Set<AccountGroup.UUID> guessRelevantGroupUUIDs();
Set<AccountGroup.UUID> guessRelevantGroupUUIDs();
/**
* Filter the set of registered project names by common prefix.
@@ -75,8 +75,8 @@ public interface ProjectCache {
* @param prefix common prefix.
* @return sorted iteration of projects sharing the same prefix.
*/
public abstract Iterable<Project.NameKey> byName(String prefix);
Iterable<Project.NameKey> byName(String prefix);
/** Notify the cache that a new project was constructed. */
public void onCreateProject(Project.NameKey newProjectName);
void onCreateProject(Project.NameKey newProjectName);
}

View File

@@ -19,8 +19,8 @@ import com.google.gwtorm.server.ResultSet;
public interface DataSource<T> {
/** @return an estimate of the number of results from {@link #read()}. */
public int getCardinality();
int getCardinality();
/** @return read from the database and return the results. */
public ResultSet<T> read() throws OrmException;
ResultSet<T> read() throws OrmException;
}

View File

@@ -18,5 +18,5 @@ import com.google.gerrit.server.query.DataSource;
public interface ChangeDataSource extends DataSource<ChangeData> {
/** @return true if all returned ChangeData.hasChange() will be true. */
public boolean hasChange();
boolean hasChange();
}

View File

@@ -18,8 +18,8 @@ import com.google.gerrit.common.Nullable;
public interface ConflictsCache {
public void put(ConflictKey key, Boolean value);
void put(ConflictKey key, Boolean value);
@Nullable
public Boolean getIfPresent(ConflictKey key);
Boolean getIfPresent(ConflictKey key);
}

View File

@@ -20,11 +20,11 @@ import java.io.IOException;
/** Abstraction of a supported database platform */
public interface DataSourceType {
public String getDriver();
String getDriver();
public String getUrl();
String getUrl();
public boolean usePool();
boolean usePool();
/**
* Return a ScriptRunner that runs the index script. Must not return
@@ -32,5 +32,5 @@ public interface DataSourceType {
*
* @throws IOException
*/
public ScriptRunner getIndexScript() throws IOException;
ScriptRunner getIndexScript() throws IOException;
}

View File

@@ -19,8 +19,8 @@ import com.google.gerrit.reviewdb.client.AccountSshKey;
/** Permits controlling the contents of the SSH key cache area. */
public interface SshKeyCache {
public void evict(String username);
void evict(String username);
public AccountSshKey create(AccountSshKey.Id id, String encoded)
AccountSshKey create(AccountSshKey.Id id, String encoded)
throws InvalidSshKeyException;
}

View File

@@ -20,9 +20,9 @@ import java.util.SortedSet;
public class TreeFormatter {
public static interface TreeNode {
public String getDisplayName();
public boolean isVisible();
public SortedSet<? extends TreeNode> getChildren();
String getDisplayName();
boolean isVisible();
SortedSet<? extends TreeNode> getChildren();
}
public static final String NOT_VISIBLE_NODE = "(x)";

View File

@@ -30,6 +30,6 @@ public interface GroupCreationValidationListener {
* @param args arguments for the group creation
* @throws ValidationException if validation fails
*/
public void validateNewGroup(CreateGroupArgs args)
void validateNewGroup(CreateGroupArgs args)
throws ValidationException;
}

View File

@@ -32,6 +32,6 @@ public interface HashtagValidationListener {
* @param toRemove the hashtags to be removed
* @throws ValidationException if validation fails
*/
public void validateHashtags(Change change, Set<String> toAdd,
void validateHashtags(Change change, Set<String> toAdd,
Set<String> toRemove) throws ValidationException;
}

View File

@@ -55,6 +55,6 @@ public interface OutgoingEmailValidationListener {
* @param args E-mail properties. Some are mutable.
* @throws ValidationException if validation fails.
*/
public void validateOutgoingEmail(OutgoingEmailValidationListener.Args args)
void validateOutgoingEmail(OutgoingEmailValidationListener.Args args)
throws ValidationException;
}

View File

@@ -30,6 +30,6 @@ public interface ProjectCreationValidationListener {
* @param args arguments for the project creation
* @throws ValidationException if validation fails
*/
public void validateNewProject(CreateProjectArgs args)
void validateNewProject(CreateProjectArgs args)
throws ValidationException;
}

View File

@@ -489,16 +489,16 @@ public abstract class BaseCommand implements Command {
/** Runnable function which can throw an exception. */
public static interface CommandRunnable {
public void run() throws Exception;
void run() throws Exception;
}
/** Runnable function which can retrieve a project name related to the task */
public static interface ProjectCommandRunnable extends CommandRunnable {
// execute parser command before running, in order to be able to retrieve
// project name
public void executeParseCommand() throws Exception;
void executeParseCommand() throws Exception;
public Project.NameKey getProjectName();
Project.NameKey getProjectName();
}
/** Thrown from {@link CommandRunnable#run()} with client message and code. */