From 62857be2110aaded84a93fc9891742a1271b2b85 Mon Sep 17 00:00:00 2001 From: Brahma Reddy Battula Date: Wed, 31 May 2017 01:07:58 +0800 Subject: [PATCH] HADOOP-14456. Modifier 'static' is redundant for inner enums. Contributed by ZhangBing Lin. --- .../main/java/org/apache/hadoop/crypto/OpensslCipher.java | 4 ++-- .../java/org/apache/hadoop/crypto/key/kms/ValueQueue.java | 2 +- .../src/main/java/org/apache/hadoop/fs/Options.java | 2 +- .../org/apache/hadoop/fs/shell/CommandWithDestination.java | 2 +- .../java/org/apache/hadoop/ha/ActiveStandbyElector.java | 4 ++-- .../main/java/org/apache/hadoop/ha/HAServiceProtocol.java | 2 +- .../src/main/java/org/apache/hadoop/io/SequenceFile.java | 2 +- .../hadoop/io/compress/zlib/BuiltInGzipDecompressor.java | 2 +- .../org/apache/hadoop/io/compress/zlib/ZlibCompressor.java | 6 +++--- .../apache/hadoop/io/compress/zlib/ZlibDecompressor.java | 2 +- .../java/org/apache/hadoop/io/file/tfile/Compression.java | 2 +- .../main/java/org/apache/hadoop/io/nativeio/NativeIO.java | 2 +- .../src/main/java/org/apache/hadoop/ipc/Server.java | 2 +- .../main/java/org/apache/hadoop/security/SaslRpcServer.java | 4 ++-- .../org/apache/hadoop/security/UserGroupInformation.java | 2 +- .../java/org/apache/hadoop/security/ssl/SSLFactory.java | 2 +- .../token/delegation/web/DelegationTokenAuthenticator.java | 2 +- .../src/main/java/org/apache/hadoop/util/StringUtils.java | 2 +- .../java/org/apache/hadoop/fs/FileContextTestHelper.java | 2 +- .../java/org/apache/hadoop/fs/FileSystemTestHelper.java | 2 +- .../src/test/java/org/apache/hadoop/io/TestIOUtils.java | 2 +- .../apache/hadoop/io/retry/UnreliableImplementation.java | 2 +- .../java/org/apache/hadoop/crypto/key/kms/server/KMS.java | 2 +- .../main/java/org/apache/hadoop/mount/MountInterface.java | 2 +- .../main/java/org/apache/hadoop/nfs/nfs3/Nfs3Constant.java | 2 +- .../java/org/apache/hadoop/nfs/nfs3/request/SetAttr3.java | 2 +- .../src/main/java/org/apache/hadoop/oncrpc/RpcMessage.java | 2 +- 27 files changed, 32 insertions(+), 32 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/OpensslCipher.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/OpensslCipher.java index 2eb16ee474..6a03bb608e 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/OpensslCipher.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/OpensslCipher.java @@ -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 @@ static int get(String algorithm, String mode) } } - private static enum Padding { + private enum Padding { NoPadding; static int get(String padding) throws NoSuchPaddingException { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/ValueQueue.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/ValueQueue.java index 74052ebcd6..8411ffbf23 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/ValueQueue.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/ValueQueue.java @@ -198,7 +198,7 @@ public Runnable deleteByName(String name) { * "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 diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Options.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Options.java index dc50286f18..0ac53b2e94 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Options.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Options.java @@ -211,7 +211,7 @@ static CreateOpts[] setOpt(final T newValue, /** * 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 diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java index 2ab0a26873..578d22b48c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java @@ -118,7 +118,7 @@ protected void setPreserve(boolean preserve) { } } - protected static enum FileAttribute { + protected enum FileAttribute { TIMESTAMPS, OWNERSHIP, PERMISSION, ACL, XATTR; public static FileAttribute getAttribute(char symbol) { diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ActiveStandbyElector.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ActiveStandbyElector.java index db853f4eff..dec401e95c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ActiveStandbyElector.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ActiveStandbyElector.java @@ -145,11 +145,11 @@ public interface ActiveStandbyElectorCallback { 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 }; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAServiceProtocol.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAServiceProtocol.java index 7de12c78b4..7099de8d22 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAServiceProtocol.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAServiceProtocol.java @@ -65,7 +65,7 @@ public String toString() { } } - public static enum RequestSource { + public enum RequestSource { REQUEST_BY_USER, REQUEST_BY_USER_FORCED, REQUEST_BY_ZKFC; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/SequenceFile.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/SequenceFile.java index de0bf4f2ac..475d272e94 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/SequenceFile.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/SequenceFile.java @@ -230,7 +230,7 @@ private SequenceFile() {} // no public ctor * * @see SequenceFile.Writer */ - public static enum CompressionType { + public enum CompressionType { /** Do not compress records. */ NONE, /** Compress values only, each separately. */ diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/BuiltInGzipDecompressor.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/BuiltInGzipDecompressor.java index 2dee03a111..b4c66596cc 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/BuiltInGzipDecompressor.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/BuiltInGzipDecompressor.java @@ -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. */ diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java index 24d98a5339..6396fcb7ec 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/ZlibCompressor.java @@ -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 @@ int compressionLevel() { /** * 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 @@ int compressionStrategy() { /** * The type of header for compressed data. */ - public static enum CompressionHeader { + public enum CompressionHeader { /** * No headers/trailers/checksums. */ diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/ZlibDecompressor.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/ZlibDecompressor.java index d728fad817..dd550b9acb 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/ZlibDecompressor.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/zlib/ZlibDecompressor.java @@ -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. */ diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/Compression.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/Compression.java index f7ec7ac835..596b7ea63a 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/Compression.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/Compression.java @@ -75,7 +75,7 @@ public void flush() throws IOException { /** * Compression algorithms. */ - static enum Algorithm { + enum Algorithm { LZO(TFile.COMPRESSION_LZO) { private transient boolean checked = false; private static final String defaultClazz = diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIO.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIO.java index f3ff1c7745..b51c9054bb 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIO.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIO.java @@ -570,7 +570,7 @@ public static native long setFilePointer(FileDescriptor fd, 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 diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java index 3ca152400c..3ea5a24e82 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java @@ -1552,7 +1552,7 @@ private synchronized void waitPending() throws InterruptedException { } @InterfaceAudience.Private - public static enum AuthProtocol { + public enum AuthProtocol { NONE(0), SASL(-33); diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslRpcServer.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslRpcServer.java index 377a0f1127..a6fbb6dcef 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslRpcServer.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslRpcServer.java @@ -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 static String[] splitKerberosName(String fullName) { /** Authentication method */ @InterfaceStability.Evolving - public static enum AuthMethod { + public enum AuthMethod { SIMPLE((byte) 80, ""), KERBEROS((byte) 81, "GSSAPI"), @Deprecated diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java index a5c6226568..0510abd043 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java @@ -1510,7 +1510,7 @@ public static UserGroupInformation createRemoteUser(String user, AuthMethod auth */ @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, diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java index 1c504882cb..f05274af8f 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java @@ -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"; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticator.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticator.java index 9f39569883..87a569706c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticator.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticator.java @@ -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); diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/StringUtils.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/StringUtils.java index 72bd171cb7..cda5ec794e 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/StringUtils.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/StringUtils.java @@ -759,7 +759,7 @@ public static String createStartupShutdownMessage(String classname, * 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), diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextTestHelper.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextTestHelper.java index 5bf842cb67..e3a4a129b3 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextTestHelper.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextTestHelper.java @@ -216,7 +216,7 @@ public FileStatus containsPath(FileContext fc, String path, 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 { diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemTestHelper.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemTestHelper.java index c9d17819ca..ef9e094c4c 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemTestHelper.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileSystemTestHelper.java @@ -237,7 +237,7 @@ public FileStatus containsPath(FileSystem fSys, String path, FileStatus[] dirLis 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)); diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestIOUtils.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestIOUtils.java index ac4fb483f6..cac73bd2b2 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestIOUtils.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestIOUtils.java @@ -253,7 +253,7 @@ public void testSkipFully() throws IOException { } } - private static enum NoEntry3Filter implements FilenameFilter { + private enum NoEntry3Filter implements FilenameFilter { INSTANCE; @Override diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/UnreliableImplementation.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/UnreliableImplementation.java index 9387772464..7ce8abccba 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/UnreliableImplementation.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/UnreliableImplementation.java @@ -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, diff --git a/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMS.java b/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMS.java index 4e84e62d87..5873c7a501 100644 --- a/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMS.java +++ b/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMS.java @@ -60,7 +60,7 @@ @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, diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountInterface.java b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountInterface.java index 9d2693d1bd..4e6d0d1a8a 100644 --- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountInterface.java +++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountInterface.java @@ -27,7 +27,7 @@ */ public interface MountInterface { /** Mount procedures */ - public static enum MNTPROC { + public enum MNTPROC { // the order of the values below are significant. NULL, MNT, diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Constant.java b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Constant.java index de587a659c..ed8e4426b2 100644 --- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Constant.java +++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Constant.java @@ -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, diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SetAttr3.java b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SetAttr3.java index e8e637c44c..3db4485741 100644 --- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SetAttr3.java +++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SetAttr3.java @@ -41,7 +41,7 @@ public class SetAttr3 { private NfsTime mtime; private EnumSet updateFields; - public static enum SetAttrField { + public enum SetAttrField { MODE, UID, GID, SIZE, ATIME, MTIME }; diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcMessage.java b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcMessage.java index fff015e9fb..85cec7613b 100644 --- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcMessage.java +++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcMessage.java @@ -22,7 +22,7 @@ */ 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;