Reorder the modifiers to comply with the Java Language Specification. (#7858)
This commit is contained in:
parent
9915770b44
commit
9249415ebd
|
|
@ -26,7 +26,7 @@ import org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster;
|
|||
*/
|
||||
public class FailbackCluster extends AbstractCluster {
|
||||
|
||||
public final static String NAME = "failback";
|
||||
public static final String NAME = "failback";
|
||||
|
||||
@Override
|
||||
public <T> AbstractClusterInvoker<T> doJoin(Directory<T> directory) throws RpcException {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster;
|
|||
*/
|
||||
public class FailfastCluster extends AbstractCluster {
|
||||
|
||||
public final static String NAME = "failfast";
|
||||
public static final String NAME = "failfast";
|
||||
|
||||
@Override
|
||||
public <T> AbstractClusterInvoker<T> doJoin(Directory<T> directory) throws RpcException {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster;
|
|||
*/
|
||||
public class FailoverCluster extends AbstractCluster {
|
||||
|
||||
public final static String NAME = "failover";
|
||||
public static final String NAME = "failover";
|
||||
|
||||
@Override
|
||||
public <T> AbstractClusterInvoker<T> doJoin(Directory<T> directory) throws RpcException {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster;
|
|||
*/
|
||||
public class FailsafeCluster extends AbstractCluster {
|
||||
|
||||
public final static String NAME = "failsafe";
|
||||
public static final String NAME = "failsafe";
|
||||
|
||||
@Override
|
||||
public <T> AbstractClusterInvoker<T> doJoin(Directory<T> directory) throws RpcException {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster;
|
|||
*/
|
||||
public class ForkingCluster extends AbstractCluster {
|
||||
|
||||
public final static String NAME = "forking";
|
||||
public static final String NAME = "forking";
|
||||
|
||||
@Override
|
||||
public <T> AbstractClusterInvoker<T> doJoin(Directory<T> directory) throws RpcException {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster;
|
|||
*/
|
||||
public class ZoneAwareCluster extends AbstractCluster {
|
||||
|
||||
public final static String NAME = "zone-aware";
|
||||
public static final String NAME = "zone-aware";
|
||||
|
||||
@Override
|
||||
protected <T> AbstractClusterInvoker<T> doJoin(Directory<T> directory) throws RpcException {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import java.util.Comparator;
|
|||
*/
|
||||
public class CharSequenceComparator implements Comparator<CharSequence> {
|
||||
|
||||
public final static CharSequenceComparator INSTANCE = new CharSequenceComparator();
|
||||
public static final CharSequenceComparator INSTANCE = new CharSequenceComparator();
|
||||
|
||||
private CharSequenceComparator() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import java.util.Comparator;
|
|||
*/
|
||||
public class MethodComparator implements Comparator<Method> {
|
||||
|
||||
public final static MethodComparator INSTANCE = new MethodComparator();
|
||||
public static final MethodComparator INSTANCE = new MethodComparator();
|
||||
|
||||
private MethodComparator() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class UrlUtils {
|
|||
/**
|
||||
* in the url string,mark the param begin
|
||||
*/
|
||||
private final static String URL_PARAM_STARTING_SYMBOL = "?";
|
||||
private static final String URL_PARAM_STARTING_SYMBOL = "?";
|
||||
|
||||
public static URL parseURL(String address, Map<String, String> defaults) {
|
||||
if (address == null || address.length() == 0) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
|
||||
public class JavaCodeTest {
|
||||
|
||||
public final static AtomicInteger SUBFIX = new AtomicInteger(8);
|
||||
public static final AtomicInteger SUBFIX = new AtomicInteger(8);
|
||||
|
||||
String getSimpleCode() {
|
||||
StringBuilder code = new StringBuilder();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class DubboConfigAliasPostProcessor implements BeanDefinitionRegistryPost
|
|||
/**
|
||||
* The bean name of {@link DubboConfigConfigurationRegistrar}
|
||||
*/
|
||||
public final static String BEAN_NAME = "dubboConfigAliasPostProcessor";
|
||||
public static final String BEAN_NAME = "dubboConfigAliasPostProcessor";
|
||||
|
||||
private BeanDefinitionRegistry registry;
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ import static org.springframework.util.ClassUtils.resolveClassName;
|
|||
public class ServiceClassPostProcessor implements BeanDefinitionRegistryPostProcessor, EnvironmentAware,
|
||||
ResourceLoaderAware, BeanClassLoaderAware {
|
||||
|
||||
private final static List<Class<? extends Annotation>> serviceAnnotationTypes = asList(
|
||||
private static final List<Class<? extends Annotation>> serviceAnnotationTypes = asList(
|
||||
// @since 2.7.7 Add the @DubboService , the issue : https://github.com/apache/dubbo/issues/6007
|
||||
DubboService.class,
|
||||
// @since 2.7.0 the substitute @com.alibaba.dubbo.config.annotation.Service
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ import static org.apache.dubbo.metadata.report.support.Constants.SYNC_REPORT_KEY
|
|||
*/
|
||||
public abstract class AbstractMetadataReport implements MetadataReport {
|
||||
|
||||
protected final static String DEFAULT_ROOT = "dubbo";
|
||||
protected static final String DEFAULT_ROOT = "dubbo";
|
||||
|
||||
private static final int ONE_DAY_IN_MILLISECONDS = 60 * 24 * 60 * 1000;
|
||||
private static final int FOUR_HOURS_IN_MILLISECONDS = 60 * 4 * 60 * 1000;
|
||||
|
|
|
|||
|
|
@ -61,9 +61,9 @@ import static org.apache.dubbo.metadata.annotation.processing.util.ServiceAnnota
|
|||
*/
|
||||
public abstract class AbstractServiceRestMetadataResolver implements ServiceRestMetadataResolver {
|
||||
|
||||
private final static ThreadLocal<Map<String, Object>> threadLocalCache = withInitial(HashMap::new);
|
||||
private static final ThreadLocal<Map<String, Object>> threadLocalCache = withInitial(HashMap::new);
|
||||
|
||||
private final static Map<String, List<AnnotatedMethodParameterProcessor>> parameterProcessorsMap = loadAnnotatedMethodParameterProcessors();
|
||||
private static final Map<String, List<AnnotatedMethodParameterProcessor>> parameterProcessorsMap = loadAnnotatedMethodParameterProcessors();
|
||||
|
||||
private final String processorName = getClass().getSimpleName();
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||
*/
|
||||
public class ExecutableElementComparator implements Comparator<ExecutableElement> {
|
||||
|
||||
public final static ExecutableElementComparator INSTANCE = new ExecutableElementComparator();
|
||||
public static final ExecutableElementComparator INSTANCE = new ExecutableElementComparator();
|
||||
|
||||
private ExecutableElementComparator() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,15 +50,15 @@ import static org.apache.dubbo.metadata.MetadataConstants.META_DATA_STORE_TAG;
|
|||
*/
|
||||
public class RedisMetadataReport extends AbstractMetadataReport {
|
||||
|
||||
private final static String REDIS_DATABASE_KEY = "database";
|
||||
private static final String REDIS_DATABASE_KEY = "database";
|
||||
/**
|
||||
* maximum number of retries
|
||||
*/
|
||||
private final static int MAX_ATTEMPTS = 2;
|
||||
private static final int MAX_ATTEMPTS = 2;
|
||||
/**
|
||||
* the default slot of the redis database
|
||||
*/
|
||||
private final static int DEFAULT_REDIS_DATABASE_SLOT = 0;
|
||||
private static final int DEFAULT_REDIS_DATABASE_SLOT = 0;
|
||||
|
||||
JedisPool pool;
|
||||
Set<HostAndPort> jedisClusterNodes;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import static org.apache.dubbo.registry.Constants.DEFAULT_REGISTRY;
|
|||
*/
|
||||
public class InterfaceCompatibleRegistryProtocol extends RegistryProtocol {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(InterfaceCompatibleRegistryProtocol.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(InterfaceCompatibleRegistryProtocol.class);
|
||||
|
||||
@Override
|
||||
protected URL getRegistryUrl(Invoker<?> originInvoker) {
|
||||
|
|
|
|||
|
|
@ -132,10 +132,10 @@ public class RegistryProtocol implements Protocol {
|
|||
APPLICATION_KEY, VERSION_KEY, GROUP_KEY, DUBBO_VERSION_KEY, RELEASE_KEY
|
||||
};
|
||||
|
||||
private final static String REGISTRY_PROTOCOL_LISTENER_KEY = "registry.protocol.listener";
|
||||
private final static int DEFAULT_PORT = 9090;
|
||||
private static final String REGISTRY_PROTOCOL_LISTENER_KEY = "registry.protocol.listener";
|
||||
private static final int DEFAULT_PORT = 9090;
|
||||
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(RegistryProtocol.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RegistryProtocol.class);
|
||||
private final Map<URL, NotifyListener> overrideListeners = new ConcurrentHashMap<>();
|
||||
private final Map<String, ServiceConfigurationListener> serviceConfigurationListeners = new ConcurrentHashMap<>();
|
||||
private final ProviderConfigurationListener providerConfigurationListener = new ProviderConfigurationListener();
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@ import static org.apache.dubbo.remoting.Constants.CHECK_KEY;
|
|||
*/
|
||||
public class EtcdRegistry extends FailbackRegistry {
|
||||
|
||||
private final static int DEFAULT_ETCD_PORT = 2379;
|
||||
private static final int DEFAULT_ETCD_PORT = 2379;
|
||||
|
||||
private final static String DEFAULT_ROOT = "dubbo";
|
||||
private static final String DEFAULT_ROOT = "dubbo";
|
||||
|
||||
private final String root;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
*/
|
||||
public class EtcdServiceDiscovery extends AbstractServiceDiscovery implements EventListener<ServiceInstancesChangedEvent> {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(EtcdServiceDiscovery.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(EtcdServiceDiscovery.class);
|
||||
|
||||
private final String root = "/services";
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import static org.apache.dubbo.common.constants.RegistryConstants.EMPTY_PROTOCOL
|
|||
*/
|
||||
public class MultipleRegistry extends AbstractRegistry {
|
||||
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(MultipleRegistry.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(MultipleRegistry.class);
|
||||
|
||||
public static final String REGISTRY_FOR_SERVICE = "service-registry";
|
||||
public static final String REGISTRY_FOR_REFERENCE = "reference-registry";
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ import static org.apache.dubbo.registry.Constants.UNREGISTER;
|
|||
*/
|
||||
public class RedisRegistry extends FailbackRegistry {
|
||||
|
||||
private final static String DEFAULT_ROOT = "dubbo";
|
||||
private static final String DEFAULT_ROOT = "dubbo";
|
||||
|
||||
private final ScheduledExecutorService expireExecutor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("DubboRegistryExpireTimer", true));
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ import static org.apache.dubbo.common.constants.RegistryConstants.ROUTERS_CATEGO
|
|||
*/
|
||||
public class ZookeeperRegistry extends FailbackRegistry {
|
||||
|
||||
private final static String DEFAULT_ROOT = "dubbo";
|
||||
private static final String DEFAULT_ROOT = "dubbo";
|
||||
|
||||
private final String root;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import java.lang.reflect.InvocationTargetException;
|
|||
*/
|
||||
|
||||
public class RpcMessageHandler implements Replier<RpcMessage> {
|
||||
private final static ServiceProvider DEFAULT_PROVIDER = new ServiceProvider() {
|
||||
private static final ServiceProvider DEFAULT_PROVIDER = new ServiceProvider() {
|
||||
public Object getImplementation(String service) {
|
||||
String impl = service + "Impl";
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ import static org.apache.dubbo.rpc.Constants.RETURN_PREFIX;
|
|||
import static org.apache.dubbo.rpc.Constants.THROW_PREFIX;
|
||||
|
||||
final public class MockInvoker<T> implements Invoker<T> {
|
||||
private final static ProxyFactory PROXY_FACTORY = ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension();
|
||||
private final static Map<String, Invoker<?>> MOCK_MAP = new ConcurrentHashMap<String, Invoker<?>>();
|
||||
private final static Map<String, Throwable> THROWABLE_MAP = new ConcurrentHashMap<String, Throwable>();
|
||||
private static final ProxyFactory PROXY_FACTORY = ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension();
|
||||
private static final Map<String, Invoker<?>> MOCK_MAP = new ConcurrentHashMap<String, Invoker<?>>();
|
||||
private static final Map<String, Throwable> THROWABLE_MAP = new ConcurrentHashMap<String, Throwable>();
|
||||
|
||||
private final URL url;
|
||||
private final Class<T> type;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ final class LazyConnectExchangeClient implements ExchangeClient {
|
|||
* when this warning rises from invocation, program probably have bug.
|
||||
*/
|
||||
protected static final String REQUEST_WITH_WARNING_KEY = "lazyclient_request_with_warning";
|
||||
private final static Logger logger = LoggerFactory.getLogger(LazyConnectExchangeClient.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(LazyConnectExchangeClient.class);
|
||||
protected final boolean requestWithWarning;
|
||||
private final URL url;
|
||||
private final ExchangeHandler requestHandler;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import static org.apache.dubbo.rpc.protocol.dubbo.Constants.LAZY_CONNECT_INITIAL
|
|||
@SuppressWarnings("deprecation")
|
||||
final class ReferenceCountExchangeClient implements ExchangeClient {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(ReferenceCountExchangeClient.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(ReferenceCountExchangeClient.class);
|
||||
private final URL url;
|
||||
private final AtomicInteger referenceCount = new AtomicInteger(0);
|
||||
private final AtomicInteger disconnectCount = new AtomicInteger(0);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ import java.util.concurrent.ConcurrentMap;
|
|||
*/
|
||||
public class GrpcProtocol extends AbstractProxyProtocol {
|
||||
|
||||
public final static int DEFAULT_PORT = 50051;
|
||||
public static final int DEFAULT_PORT = 50051;
|
||||
|
||||
/* <address, gRPC channels> */
|
||||
private final ConcurrentMap<String, ReferenceCountManagedChannel> channelMap = new ConcurrentHashMap<>();
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import java.lang.reflect.Type;
|
|||
* Java object input implementation
|
||||
*/
|
||||
public class JavaObjectInput extends NativeJavaObjectInput {
|
||||
public final static int MAX_BYTE_ARRAY_LENGTH = 8 * 1024 * 1024;
|
||||
public static final int MAX_BYTE_ARRAY_LENGTH = 8 * 1024 * 1024;
|
||||
|
||||
public JavaObjectInput(InputStream is) throws IOException {
|
||||
super(new ObjectInputStream(is));
|
||||
|
|
|
|||
Loading…
Reference in New Issue