HADOOP-14456. Modifier 'static' is redundant for inner enums. Contributed by ZhangBing Lin.

This commit is contained in:
Brahma Reddy Battula 2017-05-31 01:07:58 +08:00 committed by Xiaoyu Yao
parent 6a481be339
commit 71c34c7155
27 changed files with 32 additions and 32 deletions

View File

@ -47,7 +47,7 @@ public final class OpensslCipher {
public static final int DECRYPT_MODE = 0;
/** Currently only support AES/CTR/NoPadding. */
private static enum AlgMode {
private enum AlgMode {
AES_CTR;
static int get(String algorithm, String mode)
@ -61,7 +61,7 @@ public final class OpensslCipher {
}
}
private static enum Padding {
private enum Padding {
NoPadding;
static int get(String padding) throws NoSuchPaddingException {

View File

@ -198,7 +198,7 @@ public class ValueQueue <E> {
* "n" values and Queue is empty.
* This decides how many values to return when client calls "getAtMost"
*/
public static enum SyncGenerationPolicy {
public enum SyncGenerationPolicy {
ATLEAST_ONE, // Return atleast 1 value
LOW_WATERMARK, // Return min(n, lowWatermark * numValues) values
ALL // Return n values

View File

@ -211,7 +211,7 @@ public final class Options {
/**
* Enum to support the varargs for rename() options
*/
public static enum Rename {
public enum Rename {
NONE((byte) 0), // No options
OVERWRITE((byte) 1), // Overwrite the rename destination
TO_TRASH ((byte) 2); // Rename to trash

View File

@ -118,7 +118,7 @@ abstract class CommandWithDestination extends FsCommand {
}
}
protected static enum FileAttribute {
protected enum FileAttribute {
TIMESTAMPS, OWNERSHIP, PERMISSION, ACL, XATTR;
public static FileAttribute getAttribute(char symbol) {

View File

@ -145,11 +145,11 @@ public class ActiveStandbyElector implements StatCallback, StringCallback {
private static final int SLEEP_AFTER_FAILURE_TO_BECOME_ACTIVE = 1000;
private static enum ConnectionState {
private enum ConnectionState {
DISCONNECTED, CONNECTED, TERMINATED
};
static enum State {
enum State {
INIT, ACTIVE, STANDBY, NEUTRAL
};

View File

@ -65,7 +65,7 @@ public interface HAServiceProtocol {
}
}
public static enum RequestSource {
public enum RequestSource {
REQUEST_BY_USER,
REQUEST_BY_USER_FORCED,
REQUEST_BY_ZKFC;

View File

@ -230,7 +230,7 @@ public class SequenceFile {
*
* @see SequenceFile.Writer
*/
public static enum CompressionType {
public enum CompressionType {
/** Do not compress records. */
NONE,
/** Compress values only, each separately. */

View File

@ -68,7 +68,7 @@ public class BuiltInGzipDecompressor implements Decompressor {
* (Technically, the private variables localBuf through hasHeaderCRC are
* also part of the state, so this enum is merely the label for it.)
*/
private static enum GzipStateLabel {
private enum GzipStateLabel {
/**
* Immediately prior to or (strictly) within the 10-byte basic gzip header.
*/

View File

@ -57,7 +57,7 @@ public class ZlibCompressor implements Compressor {
/**
* The compression level for zlib library.
*/
public static enum CompressionLevel {
public enum CompressionLevel {
/**
* Compression level for no compression.
*/
@ -133,7 +133,7 @@ public class ZlibCompressor implements Compressor {
/**
* The compression level for zlib library.
*/
public static enum CompressionStrategy {
public enum CompressionStrategy {
/**
* Compression strategy best used for data consisting mostly of small
* values with a somewhat random distribution. Forces more Huffman coding
@ -178,7 +178,7 @@ public class ZlibCompressor implements Compressor {
/**
* The type of header for compressed data.
*/
public static enum CompressionHeader {
public enum CompressionHeader {
/**
* No headers/trailers/checksums.
*/

View File

@ -49,7 +49,7 @@ public class ZlibDecompressor implements Decompressor {
/**
* The headers to detect from compressed data.
*/
public static enum CompressionHeader {
public enum CompressionHeader {
/**
* No headers/trailers/checksums.
*/

View File

@ -75,7 +75,7 @@ final class Compression {
/**
* Compression algorithms.
*/
static enum Algorithm {
enum Algorithm {
LZO(TFile.COMPRESSION_LZO) {
private transient boolean checked = false;
private static final String defaultClazz =

View File

@ -570,7 +570,7 @@ public class NativeIO {
private static native String getOwner(FileDescriptor fd) throws IOException;
/** Supported list of Windows access right flags */
public static enum AccessRight {
public enum AccessRight {
ACCESS_READ (0x0001), // FILE_READ_DATA
ACCESS_WRITE (0x0002), // FILE_WRITE_DATA
ACCESS_EXECUTE (0x0020); // FILE_EXECUTE

View File

@ -1552,7 +1552,7 @@ public abstract class Server {
}
@InterfaceAudience.Private
public static enum AuthProtocol {
public enum AuthProtocol {
NONE(0),
SASL(-33);

View File

@ -68,7 +68,7 @@ public class SaslRpcServer {
public static final String SASL_DEFAULT_REALM = "default";
private static SaslServerFactory saslFactory;
public static enum QualityOfProtection {
public enum QualityOfProtection {
AUTHENTICATION("auth"),
INTEGRITY("auth-int"),
PRIVACY("auth-conf");
@ -218,7 +218,7 @@ public class SaslRpcServer {
/** Authentication method */
@InterfaceStability.Evolving
public static enum AuthMethod {
public enum AuthMethod {
SIMPLE((byte) 80, ""),
KERBEROS((byte) 81, "GSSAPI"),
@Deprecated

View File

@ -1510,7 +1510,7 @@ public class UserGroupInformation {
*/
@InterfaceAudience.Public
@InterfaceStability.Evolving
public static enum AuthenticationMethod {
public enum AuthenticationMethod {
// currently we support only one auth per method, but eventually a
// subtype is needed to differentiate, ex. if digest is token or ldap
SIMPLE(AuthMethod.SIMPLE,

View File

@ -57,7 +57,7 @@ public class SSLFactory implements ConnectionConfigurator {
static final Logger LOG = LoggerFactory.getLogger(SSLFactory.class);
@InterfaceAudience.Private
public static enum Mode { CLIENT, SERVER }
public enum Mode { CLIENT, SERVER }
public static final String SSL_CLIENT_CONF_KEY = "hadoop.ssl.client.conf";
public static final String SSL_CLIENT_CONF_DEFAULT = "ssl-client.xml";

View File

@ -74,7 +74,7 @@ public abstract class DelegationTokenAuthenticator implements Authenticator {
* DelegationToken operations.
*/
@InterfaceAudience.Private
public static enum DelegationTokenOperation {
public enum DelegationTokenOperation {
GETDELEGATIONTOKEN(HTTP_GET, true),
RENEWDELEGATIONTOKEN(HTTP_PUT, true),
CANCELDELEGATIONTOKEN(HTTP_PUT, false);

View File

@ -759,7 +759,7 @@ public class StringUtils {
* which can be represented by a 64-bit integer.
* TraditionalBinaryPrefix symbol are case insensitive.
*/
public static enum TraditionalBinaryPrefix {
public enum TraditionalBinaryPrefix {
KILO(10),
MEGA(KILO.bitShift + 10),
GIGA(MEGA.bitShift + 10),

View File

@ -216,7 +216,7 @@ public final class FileContextTestHelper {
return containsPath(fc, new Path(path), dirList);
}
public static enum fileType {isDir, isFile, isSymlink};
public enum fileType {isDir, isFile, isSymlink};
public static void checkFileStatus(FileContext aFc, String path,
fileType expectedType) throws IOException {

View File

@ -237,7 +237,7 @@ public class FileSystemTestHelper {
return containsPath(fSys, new Path(path), dirList);
}
public static enum fileType {isDir, isFile, isSymlink};
public enum fileType {isDir, isFile, isSymlink};
public static void checkFileStatus(FileSystem aFs, String path,
fileType expectedType) throws IOException {
FileStatus s = aFs.getFileStatus(new Path(path));

View File

@ -253,7 +253,7 @@ public class TestIOUtils {
}
}
private static enum NoEntry3Filter implements FilenameFilter {
private enum NoEntry3Filter implements FilenameFilter {
INSTANCE;
@Override

View File

@ -36,7 +36,7 @@ class UnreliableImplementation implements UnreliableInterface {
private String identifier;
private TypeOfExceptionToFailWith exceptionToFailWith;
public static enum TypeOfExceptionToFailWith {
public enum TypeOfExceptionToFailWith {
UNRELIABLE_EXCEPTION,
STANDBY_EXCEPTION,
IO_EXCEPTION,

View File

@ -60,7 +60,7 @@ import java.util.Map;
@InterfaceAudience.Private
public class KMS {
public static enum KMSOp {
public enum KMSOp {
CREATE_KEY, DELETE_KEY, ROLL_NEW_VERSION, INVALIDATE_CACHE,
GET_KEYS, GET_KEYS_METADATA,
GET_KEY_VERSIONS, GET_METADATA, GET_KEY_VERSION, GET_CURRENT_KEY,

View File

@ -27,7 +27,7 @@ import org.apache.hadoop.oncrpc.XDR;
*/
public interface MountInterface {
/** Mount procedures */
public static enum MNTPROC {
public enum MNTPROC {
// the order of the values below are significant.
NULL,
MNT,

View File

@ -32,7 +32,7 @@ public class Nfs3Constant {
public final static int VERSION = 3;
// The procedures
public static enum NFSPROC3 {
public enum NFSPROC3 {
// the order of the values below are significant.
NULL,
GETATTR,

View File

@ -41,7 +41,7 @@ public class SetAttr3 {
private NfsTime mtime;
private EnumSet<SetAttrField> updateFields;
public static enum SetAttrField {
public enum SetAttrField {
MODE, UID, GID, SIZE, ATIME, MTIME
};

View File

@ -22,7 +22,7 @@ package org.apache.hadoop.oncrpc;
*/
public abstract class RpcMessage {
/** Message type */
public static enum Type {
public enum Type {
// the order of the values below are significant.
RPC_CALL,
RPC_REPLY;