This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.1 by this push:
new 237042cbb5 Remove public modifier in dubbo-compatiable (#10983)
237042cbb5 is described below
commit 237042cbb518ec8647e430dd7db4967f063b171a
Author: Albumen Kevin <[email protected]>
AuthorDate: Tue Nov 22 14:04:08 2022 +0800
Remove public modifier in dubbo-compatiable (#10983)
---
.../java/org/apache/dubbo/cache/CacheTest.java | 4 +--
.../dubbo/common/extension/ExtensionTest.java | 4 +--
.../apache/dubbo/config/ApplicationConfigTest.java | 34 +++++++++---------
.../apache/dubbo/config/ArgumentConfigTest.java | 10 +++---
.../java/org/apache/dubbo/config/ConfigTest.java | 4 +--
.../apache/dubbo/config/ConsumerConfigTest.java | 8 ++---
.../org/apache/dubbo/config/MethodConfigTest.java | 28 +++++++--------
.../org/apache/dubbo/config/ModuleConfigTest.java | 18 +++++-----
.../apache/dubbo/config/ProtocolConfigTest.java | 32 ++++++++---------
.../apache/dubbo/config/ProviderConfigTest.java | 40 +++++++++++-----------
.../apache/dubbo/config/ReferenceConfigTest.java | 4 +--
.../apache/dubbo/config/RegistryConfigTest.java | 40 +++++++++++-----------
.../org/apache/dubbo/echo/EchoServiceTest.java | 4 +--
.../java/org/apache/dubbo/filter/FilterTest.java | 6 ++--
.../apache/dubbo/generic/GenericServiceTest.java | 12 +++----
.../java/org/apache/dubbo/rpc/RpcContextTest.java | 6 ++--
.../org/apache/dubbo/rpc/cluster/RouterTest.java | 4 +--
.../dubbo/serialization/SerializationTest.java | 12 +++----
.../java/org/apache/dubbo/dependency/FileTest.java | 14 ++++----
19 files changed, 142 insertions(+), 142 deletions(-)
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/cache/CacheTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/cache/CacheTest.java
index 5f5b7ad4de..a63ee4ddd0 100644
--- a/dubbo-compatible/src/test/java/org/apache/dubbo/cache/CacheTest.java
+++ b/dubbo-compatible/src/test/java/org/apache/dubbo/cache/CacheTest.java
@@ -29,10 +29,10 @@ import org.junit.jupiter.api.Test;
import java.util.Map;
-public class CacheTest {
+class CacheTest {
@Test
- public void testCacheFactory() {
+ void testCacheFactory() {
URL url =
URL.valueOf("test://test:11/test?cache=jacache&.cache.write.expire=1");
CacheFactory cacheFactory = new MyCacheFactory();
Invocation invocation = new NullInvocation();
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/common/extension/ExtensionTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/common/extension/ExtensionTest.java
index b126d6a784..f6d1b923ee 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/common/extension/ExtensionTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/common/extension/ExtensionTest.java
@@ -22,10 +22,10 @@ import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.fail;
-public class ExtensionTest {
+class ExtensionTest {
@Test
- public void testExtensionFactory() {
+ void testExtensionFactory() {
try {
ExtensionInjector myfactory =
ExtensionLoader.getExtensionLoader(ExtensionInjector.class).getExtension("myfactory");
Assertions.assertTrue(myfactory instanceof ExtensionInjector);
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java
index 2a2d5b14a6..bfa8cfd72b 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ApplicationConfigTest.java
@@ -39,9 +39,9 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.sameInstance;
import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
-public class ApplicationConfigTest {
+class ApplicationConfigTest {
@Test
- public void testName() throws Exception {
+ void testName() throws Exception {
ApplicationConfig application = new ApplicationConfig();
application.setName("app");
assertThat(application.getName(), equalTo("app"));
@@ -53,7 +53,7 @@ public class ApplicationConfigTest {
}
@Test
- public void testVersion() throws Exception {
+ void testVersion() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setVersion("1.0.0");
assertThat(application.getVersion(), equalTo("1.0.0"));
@@ -63,28 +63,28 @@ public class ApplicationConfigTest {
}
@Test
- public void testOwner() throws Exception {
+ void testOwner() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setOwner("owner");
assertThat(application.getOwner(), equalTo("owner"));
}
@Test
- public void testOrganization() throws Exception {
+ void testOrganization() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setOrganization("org");
assertThat(application.getOrganization(), equalTo("org"));
}
@Test
- public void testArchitecture() throws Exception {
+ void testArchitecture() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setArchitecture("arch");
assertThat(application.getArchitecture(), equalTo("arch"));
}
@Test
- public void testEnvironment1() throws Exception {
+ void testEnvironment1() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setEnvironment("develop");
assertThat(application.getEnvironment(), equalTo("develop"));
@@ -95,7 +95,7 @@ public class ApplicationConfigTest {
}
@Test
- public void testEnvironment2() throws Exception {
+ void testEnvironment2() throws Exception {
Assertions.assertThrows(IllegalStateException.class, () -> {
ApplicationConfig application = new ApplicationConfig("app");
application.setEnvironment("illegal-env");
@@ -103,7 +103,7 @@ public class ApplicationConfigTest {
}
@Test
- public void testRegistry() throws Exception {
+ void testRegistry() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
RegistryConfig registry = new RegistryConfig();
application.setRegistry(registry);
@@ -114,7 +114,7 @@ public class ApplicationConfigTest {
}
@Test
- public void testMonitor() throws Exception {
+ void testMonitor() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setMonitor(new MonitorConfig("monitor-addr"));
assertThat(application.getMonitor().getAddress(),
equalTo("monitor-addr"));
@@ -123,21 +123,21 @@ public class ApplicationConfigTest {
}
@Test
- public void testLogger() throws Exception {
+ void testLogger() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setLogger("log4j");
assertThat(application.getLogger(), equalTo("log4j"));
}
@Test
- public void testDefault() throws Exception {
+ void testDefault() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setDefault(true);
assertThat(application.isDefault(), is(true));
}
@Test
- public void testDumpDirectory() throws Exception {
+ void testDumpDirectory() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setDumpDirectory("/dump");
assertThat(application.getDumpDirectory(), equalTo("/dump"));
@@ -147,7 +147,7 @@ public class ApplicationConfigTest {
}
@Test
- public void testQosEnable() throws Exception {
+ void testQosEnable() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setQosEnable(true);
assertThat(application.getQosEnable(), is(true));
@@ -157,14 +157,14 @@ public class ApplicationConfigTest {
}
@Test
- public void testQosPort() throws Exception {
+ void testQosPort() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setQosPort(8080);
assertThat(application.getQosPort(), equalTo(8080));
}
@Test
- public void testQosAcceptForeignIp() throws Exception {
+ void testQosAcceptForeignIp() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setQosAcceptForeignIp(true);
assertThat(application.getQosAcceptForeignIp(), is(true));
@@ -174,7 +174,7 @@ public class ApplicationConfigTest {
}
@Test
- public void testParameters() throws Exception {
+ void testParameters() throws Exception {
ApplicationConfig application = new ApplicationConfig("app");
application.setQosAcceptForeignIp(true);
Map<String, String> parameters = new HashMap<String, String>();
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ArgumentConfigTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ArgumentConfigTest.java
index 6125d5c2d6..4631770320 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ArgumentConfigTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ArgumentConfigTest.java
@@ -28,30 +28,30 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.is;
-public class ArgumentConfigTest {
+class ArgumentConfigTest {
@Test
- public void testIndex() throws Exception {
+ void testIndex() throws Exception {
ArgumentConfig argument = new ArgumentConfig();
argument.setIndex(1);
assertThat(argument.getIndex(), is(1));
}
@Test
- public void testType() throws Exception {
+ void testType() throws Exception {
ArgumentConfig argument = new ArgumentConfig();
argument.setType("int");
assertThat(argument.getType(), equalTo("int"));
}
@Test
- public void testCallback() throws Exception {
+ void testCallback() throws Exception {
ArgumentConfig argument = new ArgumentConfig();
argument.setCallback(true);
assertThat(argument.isCallback(), is(true));
}
@Test
- public void testArguments() throws Exception {
+ void testArguments() throws Exception {
ArgumentConfig argument = new ArgumentConfig();
argument.setIndex(1);
argument.setType("int");
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ConfigTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ConfigTest.java
index fe3ee4d1e3..2470a2da24 100644
--- a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ConfigTest.java
+++ b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ConfigTest.java
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-public class ConfigTest {
+class ConfigTest {
private com.alibaba.dubbo.config.ApplicationConfig applicationConfig = new
com.alibaba.dubbo.config.ApplicationConfig("first-dubbo-test");
private com.alibaba.dubbo.config.RegistryConfig registryConfig = new
com.alibaba.dubbo.config.RegistryConfig("multicast://224.5.6.7:1234");
@@ -45,7 +45,7 @@ public class ConfigTest {
}
@Test
- public void testConfig() {
+ void testConfig() {
com.alibaba.dubbo.config.ServiceConfig<DemoService> service = new
ServiceConfig<>();
service.setApplication(applicationConfig);
service.setRegistry(registryConfig);
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ConsumerConfigTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ConsumerConfigTest.java
index 96282d2f15..5dda5ae966 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ConsumerConfigTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ConsumerConfigTest.java
@@ -24,9 +24,9 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
-public class ConsumerConfigTest {
+class ConsumerConfigTest {
@Test
- public void testTimeout() throws Exception {
+ void testTimeout() throws Exception {
try {
System.clearProperty("sun.rmi.transport.tcp.responseTimeout");
ConsumerConfig consumer = new ConsumerConfig();
@@ -39,14 +39,14 @@ public class ConsumerConfigTest {
}
@Test
- public void testDefault() throws Exception {
+ void testDefault() throws Exception {
ConsumerConfig consumer = new ConsumerConfig();
consumer.setDefault(true);
assertThat(consumer.isDefault(), is(true));
}
@Test
- public void testClient() throws Exception {
+ void testClient() throws Exception {
ConsumerConfig consumer = new ConsumerConfig();
consumer.setClient("client");
assertThat(consumer.getClient(), equalTo("client"));
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/MethodConfigTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/MethodConfigTest.java
index 94156a5de7..22e04b3a81 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/MethodConfigTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/MethodConfigTest.java
@@ -44,9 +44,9 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.junit.jupiter.api.Assertions.assertEquals;
-public class MethodConfigTest {
+class MethodConfigTest {
@Test
- public void testName() throws Exception {
+ void testName() throws Exception {
MethodConfig method = new MethodConfig();
method.setName("hello");
assertThat(method.getName(), equalTo("hello"));
@@ -56,42 +56,42 @@ public class MethodConfigTest {
}
@Test
- public void testStat() throws Exception {
+ void testStat() throws Exception {
MethodConfig method = new MethodConfig();
method.setStat(10);
assertThat(method.getStat(), equalTo(10));
}
@Test
- public void testRetry() throws Exception {
+ void testRetry() throws Exception {
MethodConfig method = new MethodConfig();
method.setRetry(true);
assertThat(method.isRetry(), is(true));
}
@Test
- public void testReliable() throws Exception {
+ void testReliable() throws Exception {
MethodConfig method = new MethodConfig();
method.setReliable(true);
assertThat(method.isReliable(), is(true));
}
@Test
- public void testExecutes() throws Exception {
+ void testExecutes() throws Exception {
MethodConfig method = new MethodConfig();
method.setExecutes(10);
assertThat(method.getExecutes(), equalTo(10));
}
@Test
- public void testDeprecated() throws Exception {
+ void testDeprecated() throws Exception {
MethodConfig method = new MethodConfig();
method.setDeprecated(true);
assertThat(method.getDeprecated(), is(true));
}
@Test
- public void testArguments() throws Exception {
+ void testArguments() throws Exception {
MethodConfig method = new MethodConfig();
ArgumentConfig argument = new ArgumentConfig();
method.setArguments(Collections.singletonList(argument));
@@ -100,14 +100,14 @@ public class MethodConfigTest {
}
@Test
- public void testSticky() throws Exception {
+ void testSticky() throws Exception {
MethodConfig method = new MethodConfig();
method.setSticky(true);
assertThat(method.getSticky(), is(true));
}
@Test
- public void testConvertMethodConfig2AsyncInfo() throws Exception{
+ void testConvertMethodConfig2AsyncInfo() throws Exception{
org.apache.dubbo.config.MethodConfig methodConfig = new
org.apache.dubbo.config.MethodConfig();
methodConfig.setOninvokeMethod("setName");
methodConfig.setOninvoke(new Person());
@@ -131,7 +131,7 @@ public class MethodConfigTest {
}
@Test
- public void testOnreturnMethod() throws Exception {
+ void testOnreturnMethod() throws Exception {
MethodConfig method = new MethodConfig();
method.setOnreturnMethod("on-return-method");
assertThat(method.getOnreturnMethod(), equalTo("on-return-method"));
@@ -157,7 +157,7 @@ public class MethodConfigTest {
}
@Test
- public void testOnthrowMethod() throws Exception {
+ void testOnthrowMethod() throws Exception {
MethodConfig method = new MethodConfig();
method.setOnthrowMethod("on-throw-method");
assertThat(method.getOnthrowMethod(), equalTo("on-throw-method"));
@@ -183,7 +183,7 @@ public class MethodConfigTest {
}
@Test
- public void testOninvokeMethod() throws Exception {
+ void testOninvokeMethod() throws Exception {
MethodConfig method = new MethodConfig();
method.setOninvokeMethod("on-invoke-method");
assertThat(method.getOninvokeMethod(), equalTo("on-invoke-method"));
@@ -196,7 +196,7 @@ public class MethodConfigTest {
}
@Test
- public void testReturn() throws Exception {
+ void testReturn() throws Exception {
MethodConfig method = new MethodConfig();
method.setReturn(true);
assertThat(method.isReturn(), is(true));
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ModuleConfigTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ModuleConfigTest.java
index 96082f0dee..1075f15b9f 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ModuleConfigTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ModuleConfigTest.java
@@ -33,10 +33,10 @@ import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.sameInstance;
-public class ModuleConfigTest {
+class ModuleConfigTest {
@Test
- public void testName2() throws Exception {
+ void testName2() throws Exception {
ModuleConfig module = new ModuleConfig();
module.setName("module-name");
assertThat(module.getName(), equalTo("module-name"));
@@ -47,7 +47,7 @@ public class ModuleConfigTest {
}
@Test
- public void testVersion() throws Exception {
+ void testVersion() throws Exception {
ModuleConfig module = new ModuleConfig();
module.setName("module-name");
module.setVersion("1.0.0");
@@ -58,21 +58,21 @@ public class ModuleConfigTest {
}
@Test
- public void testOwner() throws Exception {
+ void testOwner() throws Exception {
ModuleConfig module = new ModuleConfig();
module.setOwner("owner");
assertThat(module.getOwner(), equalTo("owner"));
}
@Test
- public void testOrganization() throws Exception {
+ void testOrganization() throws Exception {
ModuleConfig module = new ModuleConfig();
module.setOrganization("org");
assertThat(module.getOrganization(), equalTo("org"));
}
@Test
- public void testRegistry() throws Exception {
+ void testRegistry() throws Exception {
ModuleConfig module = new ModuleConfig();
RegistryConfig registry = new RegistryConfig();
module.setRegistry(registry);
@@ -80,7 +80,7 @@ public class ModuleConfigTest {
}
@Test
- public void testRegistries() throws Exception {
+ void testRegistries() throws Exception {
ModuleConfig module = new ModuleConfig();
RegistryConfig registry = new RegistryConfig();
module.setRegistries(Collections.singletonList(registry));
@@ -89,7 +89,7 @@ public class ModuleConfigTest {
}
@Test
- public void testMonitor() throws Exception {
+ void testMonitor() throws Exception {
ModuleConfig module = new ModuleConfig();
module.setMonitor("monitor-addr1");
assertThat(module.getMonitor().getAddress(), equalTo("monitor-addr1"));
@@ -98,7 +98,7 @@ public class ModuleConfigTest {
}
@Test
- public void testDefault() throws Exception {
+ void testDefault() throws Exception {
ModuleConfig module = new ModuleConfig();
module.setDefault(true);
assertThat(module.isDefault(), is(true));
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java
index edec18cac0..983d2bb43f 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ProtocolConfigTest.java
@@ -29,10 +29,10 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.is;
-public class ProtocolConfigTest {
+class ProtocolConfigTest {
@Test
- public void testName() throws Exception {
+ void testName() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setName("name");
Map<String, String> parameters = new HashMap<String, String>();
@@ -43,7 +43,7 @@ public class ProtocolConfigTest {
}
@Test
- public void testHost() throws Exception {
+ void testHost() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setHost("host");
Map<String, String> parameters = new HashMap<String, String>();
@@ -53,7 +53,7 @@ public class ProtocolConfigTest {
}
@Test
- public void testPort() throws Exception {
+ void testPort() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setPort(8080);
Map<String, String> parameters = new HashMap<String, String>();
@@ -63,7 +63,7 @@ public class ProtocolConfigTest {
}
@Test
- public void testPath() throws Exception {
+ void testPath() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setContextpath("context-path");
Map<String, String> parameters = new HashMap<String, String>();
@@ -77,77 +77,77 @@ public class ProtocolConfigTest {
}
@Test
- public void testThreads() throws Exception {
+ void testThreads() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setThreads(10);
assertThat(protocol.getThreads(), is(10));
}
@Test
- public void testIothreads() throws Exception {
+ void testIothreads() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setIothreads(10);
assertThat(protocol.getIothreads(), is(10));
}
@Test
- public void testQueues() throws Exception {
+ void testQueues() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setQueues(10);
assertThat(protocol.getQueues(), is(10));
}
@Test
- public void testAccepts() throws Exception {
+ void testAccepts() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setAccepts(10);
assertThat(protocol.getAccepts(), is(10));
}
@Test
- public void testAccesslog() throws Exception {
+ void testAccesslog() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setAccesslog("access.log");
assertThat(protocol.getAccesslog(), equalTo("access.log"));
}
@Test
- public void testRegister() throws Exception {
+ void testRegister() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setRegister(true);
assertThat(protocol.isRegister(), is(true));
}
@Test
- public void testParameters() throws Exception {
+ void testParameters() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setParameters(Collections.singletonMap("k1", "v1"));
assertThat(protocol.getParameters(), hasEntry("k1", "v1"));
}
@Test
- public void testDefault() throws Exception {
+ void testDefault() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setDefault(true);
assertThat(protocol.isDefault(), is(true));
}
@Test
- public void testKeepAlive() throws Exception {
+ void testKeepAlive() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setKeepAlive(true);
assertThat(protocol.getKeepAlive(), is(true));
}
@Test
- public void testOptimizer() throws Exception {
+ void testOptimizer() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setOptimizer("optimizer");
assertThat(protocol.getOptimizer(), equalTo("optimizer"));
}
@Test
- public void testExtension() throws Exception {
+ void testExtension() throws Exception {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setExtension("extension");
assertThat(protocol.getExtension(), equalTo("extension"));
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ProviderConfigTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ProviderConfigTest.java
index fd5fa2dcf3..ccbffaebd3 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ProviderConfigTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ProviderConfigTest.java
@@ -30,16 +30,16 @@ import static org.hamcrest.Matchers.hasKey;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
-public class ProviderConfigTest {
+class ProviderConfigTest {
@Test
- public void testProtocol() throws Exception {
+ void testProtocol() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setProtocol("protocol");
assertThat(provider.getProtocol().getName(), equalTo("protocol"));
}
@Test
- public void testDefault() throws Exception {
+ void testDefault() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setDefault(true);
Map<String, String> parameters = new HashMap<String, String>();
@@ -49,7 +49,7 @@ public class ProviderConfigTest {
}
@Test
- public void testHost() throws Exception {
+ void testHost() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setHost("demo-host");
Map<String, String> parameters = new HashMap<String, String>();
@@ -59,7 +59,7 @@ public class ProviderConfigTest {
}
@Test
- public void testPort() throws Exception {
+ void testPort() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setPort(8080);
Map<String, String> parameters = new HashMap<String, String>();
@@ -69,7 +69,7 @@ public class ProviderConfigTest {
}
@Test
- public void testPath() throws Exception {
+ void testPath() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setPath("/path");
Map<String, String> parameters = new HashMap<String, String>();
@@ -80,7 +80,7 @@ public class ProviderConfigTest {
}
@Test
- public void testContextPath() throws Exception {
+ void testContextPath() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setContextpath("/context-path");
Map<String, String> parameters = new HashMap<String, String>();
@@ -91,70 +91,70 @@ public class ProviderConfigTest {
@Test
- public void testThreads() throws Exception {
+ void testThreads() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setThreads(10);
assertThat(provider.getThreads(), is(10));
}
@Test
- public void testIothreads() throws Exception {
+ void testIothreads() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setIothreads(10);
assertThat(provider.getIothreads(), is(10));
}
@Test
- public void testQueues() throws Exception {
+ void testQueues() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setQueues(10);
assertThat(provider.getQueues(), is(10));
}
@Test
- public void testAccepts() throws Exception {
+ void testAccepts() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setAccepts(10);
assertThat(provider.getAccepts(), is(10));
}
@Test
- public void testCharset() throws Exception {
+ void testCharset() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setCharset("utf-8");
assertThat(provider.getCharset(), equalTo("utf-8"));
}
@Test
- public void testPayload() throws Exception {
+ void testPayload() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setPayload(10);
assertThat(provider.getPayload(), is(10));
}
@Test
- public void testBuffer() throws Exception {
+ void testBuffer() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setBuffer(10);
assertThat(provider.getBuffer(), is(10));
}
@Test
- public void testServer() throws Exception {
+ void testServer() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setServer("demo-server");
assertThat(provider.getServer(), equalTo("demo-server"));
}
@Test
- public void testClient() throws Exception {
+ void testClient() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setClient("client");
assertThat(provider.getClient(), equalTo("client"));
}
@Test
- public void testPrompt() throws Exception {
+ void testPrompt() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setPrompt("#");
Map<String, String> parameters = new HashMap<String, String>();
@@ -164,21 +164,21 @@ public class ProviderConfigTest {
}
@Test
- public void testDispatcher() throws Exception {
+ void testDispatcher() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setDispatcher("mockdispatcher");
assertThat(provider.getDispatcher(), equalTo("mockdispatcher"));
}
@Test
- public void testNetworker() throws Exception {
+ void testNetworker() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setNetworker("networker");
assertThat(provider.getNetworker(), equalTo("networker"));
}
@Test
- public void testWait() throws Exception {
+ void testWait() throws Exception {
ProviderConfig provider = new ProviderConfig();
provider.setWait(10);
assertThat(provider.getWait(), equalTo(10));
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java
index d4a55ab4f8..7eacd6acce 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-public class ReferenceConfigTest {
+class ReferenceConfigTest {
private ApplicationConfig application = new ApplicationConfig();
private RegistryConfig registry = new RegistryConfig();
private ProtocolConfig protocol = new ProtocolConfig();
@@ -46,7 +46,7 @@ public class ReferenceConfigTest {
}
@Test
- public void testInjvm() throws Exception {
+ void testInjvm() throws Exception {
application.setName("test-protocol-random-port");
registry.setAddress("multicast://224.5.6.7:1234");
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/RegistryConfigTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/RegistryConfigTest.java
index 30452f334f..dd42978cfb 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/config/RegistryConfigTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/config/RegistryConfigTest.java
@@ -32,16 +32,16 @@ import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.hasKey;
import static org.hamcrest.Matchers.not;
-public class RegistryConfigTest {
+class RegistryConfigTest {
@Test
- public void testProtocol() throws Exception {
+ void testProtocol() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setProtocol("protocol");
assertThat(registry.getProtocol(), equalTo(registry.getProtocol()));
}
@Test
- public void testAddress() throws Exception {
+ void testAddress() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setAddress("localhost");
assertThat(registry.getAddress(), equalTo("localhost"));
@@ -51,21 +51,21 @@ public class RegistryConfigTest {
}
@Test
- public void testUsername() throws Exception {
+ void testUsername() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setUsername("username");
assertThat(registry.getUsername(), equalTo("username"));
}
@Test
- public void testPassword() throws Exception {
+ void testPassword() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setPassword("password");
assertThat(registry.getPassword(), equalTo("password"));
}
@Test
- public void testWait() throws Exception {
+ void testWait() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setWait(10);
assertThat(registry.getWait(), is(10));
@@ -73,91 +73,91 @@ public class RegistryConfigTest {
}
@Test
- public void testCheck() throws Exception {
+ void testCheck() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setCheck(true);
assertThat(registry.isCheck(), is(true));
}
@Test
- public void testFile() throws Exception {
+ void testFile() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setFile("file");
assertThat(registry.getFile(), equalTo("file"));
}
@Test
- public void testTransporter() throws Exception {
+ void testTransporter() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setTransporter("transporter");
assertThat(registry.getTransporter(), equalTo("transporter"));
}
@Test
- public void testClient() throws Exception {
+ void testClient() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setClient("client");
assertThat(registry.getClient(), equalTo("client"));
}
@Test
- public void testTimeout() throws Exception {
+ void testTimeout() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setTimeout(10);
assertThat(registry.getTimeout(), is(10));
}
@Test
- public void testSession() throws Exception {
+ void testSession() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setSession(10);
assertThat(registry.getSession(), is(10));
}
@Test
- public void testDynamic() throws Exception {
+ void testDynamic() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setDynamic(true);
assertThat(registry.isDynamic(), is(true));
}
@Test
- public void testRegister() throws Exception {
+ void testRegister() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setRegister(true);
assertThat(registry.isRegister(), is(true));
}
@Test
- public void testSubscribe() throws Exception {
+ void testSubscribe() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setSubscribe(true);
assertThat(registry.isSubscribe(), is(true));
}
@Test
- public void testCluster() throws Exception {
+ void testCluster() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setCluster("cluster");
assertThat(registry.getCluster(), equalTo("cluster"));
}
@Test
- public void testGroup() throws Exception {
+ void testGroup() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setGroup("group");
assertThat(registry.getGroup(), equalTo("group"));
}
@Test
- public void testVersion() throws Exception {
+ void testVersion() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setVersion("1.0.0");
assertThat(registry.getVersion(), equalTo("1.0.0"));
}
@Test
- public void testParameters() throws Exception {
+ void testParameters() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setParameters(Collections.singletonMap("k1", "v1"));
assertThat(registry.getParameters(), hasEntry("k1", "v1"));
@@ -167,7 +167,7 @@ public class RegistryConfigTest {
}
@Test
- public void testDefault() throws Exception {
+ void testDefault() throws Exception {
RegistryConfig registry = new RegistryConfig();
registry.setDefault(true);
assertThat(registry.isDefault(), is(true));
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/echo/EchoServiceTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/echo/EchoServiceTest.java
index b650b40bda..74ad8d6cc6 100644
--- a/dubbo-compatible/src/test/java/org/apache/dubbo/echo/EchoServiceTest.java
+++ b/dubbo-compatible/src/test/java/org/apache/dubbo/echo/EchoServiceTest.java
@@ -30,10 +30,10 @@ import org.apache.dubbo.service.DemoServiceImpl;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-public class EchoServiceTest {
+class EchoServiceTest {
@Test
- public void testEcho() {
+ void testEcho() {
DemoService server = new DemoServiceImpl();
ProxyFactory proxyFactory =
ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension();
Protocol protocol =
ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension();
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/filter/FilterTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/filter/FilterTest.java
index 5463b58c8c..e50d67d650 100644
--- a/dubbo-compatible/src/test/java/org/apache/dubbo/filter/FilterTest.java
+++ b/dubbo-compatible/src/test/java/org/apache/dubbo/filter/FilterTest.java
@@ -29,12 +29,12 @@ import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.fail;
-public class FilterTest {
+class FilterTest {
Filter myFilter = new MyFilter();
@Test
- public void testInvokeException() {
+ void testInvokeException() {
try {
Invoker<FilterTest> invoker = new LegacyInvoker<FilterTest>(null);
Invocation invocation = new LegacyInvocation("aa");
@@ -46,7 +46,7 @@ public class FilterTest {
}
@Test
- public void testDefault() {
+ void testDefault() {
Invoker<FilterTest> invoker = new LegacyInvoker<FilterTest>(null);
Invocation invocation = new LegacyInvocation("bbb");
Result res = myFilter.invoke(invoker, invocation);
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/generic/GenericServiceTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/generic/GenericServiceTest.java
index a89b563ab9..1deca6f2e3 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/generic/GenericServiceTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/generic/GenericServiceTest.java
@@ -46,7 +46,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-public class GenericServiceTest {
+class GenericServiceTest {
@BeforeEach
public void beforeEach() {
@@ -54,7 +54,7 @@ public class GenericServiceTest {
}
@Test
- public void testGeneric() {
+ void testGeneric() {
DemoService server = new DemoServiceImpl();
ProxyFactory proxyFactory =
ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension();
Protocol protocol =
ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension();
@@ -74,7 +74,7 @@ public class GenericServiceTest {
}
@Test
- public void testGeneric2() {
+ void testGeneric2() {
DemoService server = new DemoServiceImpl();
ProxyFactory proxyFactory =
ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension();
Protocol protocol =
ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension();
@@ -97,7 +97,7 @@ public class GenericServiceTest {
}
@Test
- public void testGenericCompatible() {
+ void testGenericCompatible() {
DubboBootstrap.getInstance()
.application("test-app")
.initialize();
@@ -124,7 +124,7 @@ public class GenericServiceTest {
}
@Test
- public void testGenericComplexCompute4FullServiceMetadata() {
+ void testGenericComplexCompute4FullServiceMetadata() {
DemoService server = new DemoServiceImpl();
ProxyFactory proxyFactory =
ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension();
Protocol protocol =
ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension();
@@ -162,7 +162,7 @@ public class GenericServiceTest {
}
@Test
- public void testGenericFindComplexObject4FullServiceMetadata() {
+ void testGenericFindComplexObject4FullServiceMetadata() {
DemoService server = new DemoServiceImpl();
ProxyFactory proxyFactory =
ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension();
Protocol protocol =
ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension();
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/rpc/RpcContextTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/rpc/RpcContextTest.java
index d3b521ec94..20c311104e 100644
--- a/dubbo-compatible/src/test/java/org/apache/dubbo/rpc/RpcContextTest.java
+++ b/dubbo-compatible/src/test/java/org/apache/dubbo/rpc/RpcContextTest.java
@@ -25,10 +25,10 @@ import java.util.concurrent.Future;
import static org.junit.jupiter.api.Assertions.assertEquals;
-public class RpcContextTest {
+class RpcContextTest {
@Test
- public void testSetFuture() {
+ void testSetFuture() {
CompletableFuture completableFuture = new CompletableFuture();
RpcContext.getContext().setFuture(completableFuture);
@@ -37,7 +37,7 @@ public class RpcContextTest {
}
@Test
- public void testSetFutureAlibaba() {
+ void testSetFutureAlibaba() {
CompletableFuture completableFuture = new CompletableFuture();
RpcContext.getContext().setFuture(completableFuture);
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/rpc/cluster/RouterTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/rpc/cluster/RouterTest.java
index 5288c53a23..056bd106fd 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/rpc/cluster/RouterTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/rpc/cluster/RouterTest.java
@@ -27,7 +27,7 @@ import java.util.List;
/**
*
*/
-public class RouterTest {
+class RouterTest {
private static List<Router> routers = new ArrayList<>();
@@ -42,7 +42,7 @@ public class RouterTest {
}
@Test
- public void testCompareTo () {
+ void testCompareTo () {
try {
Collections.sort(routers);
Assertions.assertTrue(true);
diff --git
a/dubbo-compatible/src/test/java/org/apache/dubbo/serialization/SerializationTest.java
b/dubbo-compatible/src/test/java/org/apache/dubbo/serialization/SerializationTest.java
index e53b6a5eb0..9dcfa9114c 100644
---
a/dubbo-compatible/src/test/java/org/apache/dubbo/serialization/SerializationTest.java
+++
b/dubbo-compatible/src/test/java/org/apache/dubbo/serialization/SerializationTest.java
@@ -35,7 +35,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.mockito.Mockito.mock;
-public class SerializationTest {
+class SerializationTest {
private MySerialization mySerialization;
@@ -53,29 +53,29 @@ public class SerializationTest {
}
@Test
- public void testContentType() {
+ void testContentType() {
assertThat(mySerialization.getContentType(), is("x-application/my"));
}
@Test
- public void testContentTypeId() {
+ void testContentTypeId() {
assertThat(mySerialization.getContentTypeId(), is((byte) 101));
}
@Test
- public void testObjectOutput() throws IOException {
+ void testObjectOutput() throws IOException {
ObjectOutput objectOutput = mySerialization.serialize(null,
mock(OutputStream.class));
assertThat(objectOutput,
Matchers.<ObjectOutput>instanceOf(MyObjectOutput.class));
}
@Test
- public void testObjectInput() throws IOException {
+ void testObjectInput() throws IOException {
ObjectInput objectInput = mySerialization.deserialize(null,
mock(InputStream.class));
assertThat(objectInput,
Matchers.<ObjectInput>instanceOf(MyObjectInput.class));
}
@Test
- public void testWriteUTF() throws IOException {
+ void testWriteUTF() throws IOException {
myObjectOutput.writeUTF("Pace");
myObjectOutput.writeUTF("和平");
myObjectOutput.writeUTF(" Мир");
diff --git
a/dubbo-test/dubbo-test-modules/src/test/java/org/apache/dubbo/dependency/FileTest.java
b/dubbo-test/dubbo-test-modules/src/test/java/org/apache/dubbo/dependency/FileTest.java
index 1973d98340..e7f7ba606b 100644
---
a/dubbo-test/dubbo-test-modules/src/test/java/org/apache/dubbo/dependency/FileTest.java
+++
b/dubbo-test/dubbo-test-modules/src/test/java/org/apache/dubbo/dependency/FileTest.java
@@ -36,7 +36,7 @@ import java.util.Objects;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
-public class FileTest {
+class FileTest {
private final static List<Pattern> ignoredModules = new LinkedList<>();
private final static List<Pattern> ignoredModulesInDubboAll = new
LinkedList<>();
@@ -59,7 +59,7 @@ public class FileTest {
}
@Test
- public void checkDubboBom() throws DocumentException {
+ void checkDubboBom() throws DocumentException {
File baseFile = getBaseFile();
List<File> poms = new LinkedList<>();
@@ -98,7 +98,7 @@ public class FileTest {
}
@Test
- public void checkDubboDependenciesAll() throws DocumentException {
+ void checkDubboDependenciesAll() throws DocumentException {
File baseFile = getBaseFile();
List<File> poms = new LinkedList<>();
@@ -137,7 +137,7 @@ public class FileTest {
}
@Test
- public void checkDubboAllDependencies() throws DocumentException {
+ void checkDubboAllDependencies() throws DocumentException {
File baseFile = getBaseFile();
List<File> poms = new LinkedList<>();
@@ -214,7 +214,7 @@ public class FileTest {
}
@Test
- public void checkDubboAllShade() throws DocumentException {
+ void checkDubboAllShade() throws DocumentException {
File baseFile = getBaseFile();
List<File> poms = new LinkedList<>();
@@ -304,7 +304,7 @@ public class FileTest {
}
@Test
- public void checkDubboAllTransform() throws DocumentException {
+ void checkDubboAllTransform() throws DocumentException {
File baseFile = getBaseFile();
List<String> spis = new LinkedList<>();
readSPI(baseFile, spis);
@@ -343,7 +343,7 @@ public class FileTest {
}
@Test
- public void checkSpiFiles() {
+ void checkSpiFiles() {
File baseFile = getBaseFile();
List<String> spis = new LinkedList<>();
readSPI(baseFile, spis);