Fix Checkstyle warnings related to class and member modifier order

Change the order of class and member modifiers to follow the order
defined in the Java Language Specification and the Google Java
Style guide [1].

[1] https://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.8.7-modifiers

Change-Id: Ic7f85cb4d15f49159095aa37d3c41dbffd69c805
This commit is contained in:
David Pursehouse 2015-04-14 11:26:17 +09:00
parent c7463ba0a4
commit 994159eab7
16 changed files with 27 additions and 21 deletions

View File

@ -132,7 +132,8 @@ public abstract class AbstractDaemonTest {
protected Provider<InternalChangeQuery> queryProvider;
@Inject
protected @GerritServerConfig Config cfg;
@GerritServerConfig
protected Config cfg;
@Inject
private InProcessProtocol inProcessProtocol;

View File

@ -53,7 +53,7 @@ import java.util.concurrent.TimeUnit;
public class GerritServer {
@AutoValue
static abstract class Description {
abstract static class Description {
static Description forTestClass(org.junit.runner.Description testDesc,
String configName) {
return new AutoValue_GerritServer_Description(

View File

@ -54,7 +54,8 @@ public class SubmitOnPushIT extends AbstractDaemonTest {
private ChangeNotes.Factory changeNotesFactory;
@Inject
private @GerritPersonIdent PersonIdent serverIdent;
@GerritPersonIdent
private PersonIdent serverIdent;
@Test
public void submitOnPush() throws Exception {

View File

@ -67,7 +67,7 @@ class GerritConfigProvider implements Provider<GerritConfig> {
final SshInfo si, final ContactStore cs,
final ServletContext sc, final DownloadConfig dc,
final GetArchive.AllowedFormats af,
final @AnonymousCowardName String acn) {
@AnonymousCowardName final String acn) {
realm = r;
cfg = gsc;
authConfig = ac;

View File

@ -31,7 +31,7 @@ public class Browser {
private final Config cfg;
@Inject
Browser(final @GerritServerConfig Config cfg) {
Browser(@GerritServerConfig final Config cfg) {
this.cfg = cfg;
}

View File

@ -54,7 +54,7 @@ public class SitePathInitializer {
public SitePathInitializer(final Injector injector, final ConsoleUI ui,
final InitFlags flags, final SitePaths site,
final Section.Factory sectionFactory,
final @Nullable SecureStoreInitData secureStoreInitData) {
@Nullable final SecureStoreInitData secureStoreInitData) {
this.ui = ui;
this.flags = flags;
this.site = site;

View File

@ -47,7 +47,7 @@ public class InitFlags {
@Inject
public InitFlags(final SitePaths site,
final SecureStore secureStore,
final @InstallPlugins List<String> installPlugins) throws IOException,
@InstallPlugins final List<String> installPlugins) throws IOException,
ConfigInvalidException {
sec = secureStore;
this.installPlugins = installPlugins;

View File

@ -243,8 +243,8 @@ public class ChangeHookRunner implements ChangeHooks, EventDispatcher,
@Inject
public ChangeHookRunner(final WorkQueue queue,
final GitRepositoryManager repoManager,
final @GerritServerConfig Config config,
final @AnonymousCowardName String anonymousCowardName,
@GerritServerConfig final Config config,
@AnonymousCowardName final String anonymousCowardName,
final SitePaths sitePath,
final ProjectCache projectCache,
final AccountCache accountCache,

View File

@ -147,13 +147,13 @@ public class IdentifiedUser extends CurrentUser {
CapabilityControl.Factory capabilityControlFactory,
final AuthConfig authConfig,
Realm realm,
final @AnonymousCowardName String anonymousCowardName,
final @CanonicalWebUrl Provider<String> canonicalUrl,
@AnonymousCowardName final String anonymousCowardName,
@CanonicalWebUrl final Provider<String> canonicalUrl,
final AccountCache accountCache,
final GroupBackend groupBackend,
final @DisableReverseDnsLookup Boolean disableReverseDnsLookup,
@DisableReverseDnsLookup final Boolean disableReverseDnsLookup,
final @RemotePeer Provider<SocketAddress> remotePeerProvider,
@RemotePeer final Provider<SocketAddress> remotePeerProvider,
final Provider<ReviewDb> dbProvider) {
this.capabilityControlFactory = capabilityControlFactory;
this.authConfig = authConfig;

View File

@ -390,7 +390,7 @@ public class ChangeEditModifier {
private static ObjectId writeNewTree(TreeOperation op, RevWalk rw,
ObjectInserter ins, RevCommit prevEdit, ObjectReader reader,
String fileName, @Nullable String newFile,
final @Nullable ObjectId content) throws IOException {
@Nullable final ObjectId content) throws IOException {
DirCache newTree = readTree(reader, prevEdit);
DirCacheEditor dce = newTree.editor();
switch (op) {

View File

@ -41,7 +41,7 @@ public class FromAddressGeneratorProvider implements
@Inject
FromAddressGeneratorProvider(@GerritServerConfig final Config cfg,
final @AnonymousCowardName String anonymousCowardName,
@AnonymousCowardName final String anonymousCowardName,
@GerritPersonIdent final PersonIdent myIdent,
final AccountCache accountCache) {

View File

@ -518,10 +518,12 @@ public class PluginGuiceEnvironment {
bindings.remove(Key.get(Injector.class));
bindings.remove(Key.get(java.util.logging.Logger.class));
final @Nullable Binding<HttpServletRequest> requestBinding =
@Nullable
final Binding<HttpServletRequest> requestBinding =
src.getExistingBinding(Key.get(HttpServletRequest.class));
final @Nullable Binding<HttpServletResponse> responseBinding =
@Nullable
final Binding<HttpServletResponse> responseBinding =
src.getExistingBinding(Key.get(HttpServletResponse.class));
return new AbstractModule() {

View File

@ -38,7 +38,8 @@ import java.util.Collections;
/** Creates the current database schema and populates initial code rows. */
public class SchemaCreator {
private final @SitePath
@SitePath
private final
Path site_path;
private final AllProjectsCreator allProjectsCreator;

View File

@ -109,7 +109,8 @@ public class CommentsTest {
public Config config;
@ConfigSuite.Config
public static @GerritServerConfig Config noteDbEnabled() {
@GerritServerConfig
public static Config noteDbEnabled() {
return NotesMigration.allEnabledConfig();
}

View File

@ -68,7 +68,7 @@ class DatabasePubKeyAuth implements PublickeyAuthenticator {
DatabasePubKeyAuth(final SshKeyCacheImpl skc, final SshLog l,
final IdentifiedUser.GenericFactory uf, final PeerDaemonUser.Factory pf,
final SitePaths site, final KeyPairProvider hostKeyProvider,
final @GerritServerConfig Config cfg, final SshScope s) {
@GerritServerConfig final Config cfg, final SshScope s) {
sshKeyCache = skc;
sshLog = l;
userFactory = uf;

@ -1 +1 @@
Subproject commit 603b7b3885a1d2953ca891f58d2a6095e72e5313
Subproject commit 4d1a7b61034d52859cc7349af41d1068e954556d