Enable RedundantModifier checkstyle, add fixer

Add `fixModifiers.gradle` to run after `check` task.

The `RedundantModifierChecker` doesn't catch all errors at once.
We need run `check -> fixModifiers` pair several times to reach `SUCCESSFUL`.

The `fixThis` has been ported from the SA, but without applying.

* Polishing for `fixModifiers.gradle`
* Fix all redundant modifier with the `fixModifiers.gradle`

NOTE: Since all these task modify files on Windows we have to run them with the `-Dfile.encoding=UTF-8`.
Otherwise they are read and write with the Windows default `cp1251` making them incompatible with Unix system.
This commit is contained in:
Artem Bilan
2016-03-17 13:10:05 -04:00
parent 714734115a
commit c2954881ad
62 changed files with 259 additions and 141 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,42 +27,42 @@ public interface FileInfo<F> {
/**
* @return true if the remote file is a directory
*/
public abstract boolean isDirectory();
boolean isDirectory();
/**
* @return true if the remote file is a link
*/
public abstract boolean isLink();
boolean isLink();
/**
* @return the size of the remote file
*/
public abstract long getSize();
long getSize();
/**
* @return the modified time of the remote file
*/
public abstract long getModified();
long getModified();
/**
* @return the name of the remote file
*/
public abstract String getFilename();
String getFilename();
/**
* @return the remote directory in which the file resides
*/
public abstract String getRemoteDirectory();
String getRemoteDirectory();
/**
* @return a string representing the permissions of the remote
* file (e.g. -rw-r--r--).
*/
public String getPermissions();
String getPermissions();
/**
* @return the actual implementation from the underlying
* library, more sophisticated access is needed.
*/
public F getFileInfo();
F getFileInfo();
}

View File

@@ -29,12 +29,12 @@ public interface SharedSessionCapable {
/**
* @return true if this factory uses a shared session.
*/
public abstract boolean isSharedSession();
boolean isSharedSession();
/**
* Resets the shared session so the next {@code #getSession()} will return a session
* using a new connection.
*/
public abstract void resetSharedSession();
void resetSharedSession();
}