Commit Graph

443 Commits

Author SHA1 Message Date
孙继峰
2343a4ed14
add unit test to HttpUtils (#6617) 2021-08-11 13:34:18 +08:00
赵延
1a3c8cfb60
fix npe when connection is not established. (#6534) 2021-08-10 09:31:40 +08:00
孙继峰
4c1175acf0
add retryTimes check (#6594) 2021-08-09 10:05:42 +08:00
孙继峰
f91089eb90
[ISSUE #6595] Optimize RpcClient (#6596)
* replace explicit type argument with <>

* replace anonymous class with lambda

* remove redundant initializer

* format comment & log and fix typo

* add unit test to RpcClient::resolveServerInfo

* extend CollectionUtils::getOrDefault

* simplify RpcClient::resolveServerInfo

* remove unused variable
2021-08-09 09:42:37 +08:00
孙继峰
4a134b233c
add unit test to RpcClient (#6584) 2021-08-06 11:06:30 +08:00
ZZQ的
ca89efb620
remove guava Iterables (#6563) 2021-08-05 09:37:08 +08:00
ZZQ的
1119d0336f
Replace "ThreadFactoryBuilder" API with jdk API and add unit test (#6532) 2021-08-04 13:56:26 +08:00
ZZQ的
449480f68b
Refactor the cache to replace guava (#6520)
* Refactor the cache to replace guava

* Refactor CacheBuilder

* add unit test

* Format code
2021-08-03 09:30:26 +08:00
ZZQ的
b0f7bfbba7
replace "google.common.base.Preconditions" API with jdk API (#6502)
* replace "google.common.base.Preconditions" API with jdk API

* delete static method import "lenitentFoment"

* add unit test
2021-07-30 16:35:46 +08:00
ZZQ的
a729001ec5
[Reduce dependence]>[Sets] Replace "google.common.collect.*" API with… (#6445)
* [Reduce dependence]>[Sets] Replace "google.common.collect.*" API with jdk API

* delete empty line separator
2021-07-30 16:32:38 +08:00
ZZQ的
9beaacbc54
[Reduce dependence]>[Maps] Replace "google.common.collect.*" API with jdk API (#6443) 2021-07-29 10:46:22 +08:00
孙继峰
e3c9fcf2d7
[ISSUE #5095] Add unit test for RpcClientFactory (#6471)
* fix typo

* Add unit test for RpcClientFactory
2021-07-27 18:00:43 +08:00
ZZQ的
838a62cc4a
Replace "google.common.collect.Strings" API with jdk API (#6464) 2021-07-27 13:53:52 +08:00
ZZQ的
47c6706a63
[Reduce dependence]>[Lists] Replace "google.common.collect.*" API wit… (#6404)
* [Reduce dependence]>[Lists] Replace "google.common.collect.*" API with jdk API

* use elements.size to init the array length

* Replace IllegalArgumentException with NullPointerException

* Refactor CollectionUtilsTest#list()

* Add exception message

* update annotation

* update unit test method name
2021-07-27 13:47:41 +08:00
brotherlu-xcq
2b186bc3fe
[ISSUE #6367] Add IOReactorExceptionHandler to avoid IOReactor out of loop when meet unknown Network error. (#6441)
* Add IOExceptionHandler to handle the Exception form IOReactor.

* remove the systemProperties for create ConnectionManager.

* fix the javadoc.
2021-07-27 09:29:58 +08:00
ZZQ的
c52589fd03
[Reduce dependence]>[Iterators] Replace "google.common.collect.*" API with jdk API (#6447) 2021-07-26 09:29:43 +08:00
孙继峰
c464f7c8c0
[ISSUE #5095] Add unit test for TlsFileWatcher (#6453)
* Add unit test for TlsFileWatcher

* replace explicit type argument with <>

* replace anonymous Runnable with lambda

* 'catch' parameter named 'ignored' is used

* adjust log style
2021-07-26 09:26:52 +08:00
孙继峰
727446c022
[ISSUE #5095] Add unit test for SelfHostnameVerifier (#6428)
* replace the variable with a constant

* [ISSUE #5095] Add unit test for SelfHostnameVerifier
2021-07-23 10:38:33 +08:00
孙继峰
7587bf7685
[ISSUE #5095] Add unit test for JacksonUtils (#6415) 2021-07-22 09:57:26 +08:00
hunjipo
cdc276e829
To slightly improve performance, this commit switches to StringBuilder.append(char) instead of StringBuilder.append(String) whenever we append a single character to a StringBuilder. (#6300) 2021-07-12 13:51:14 +08:00
孙继峰
f326a0c543
[ISSUE #5095] Add unit test for ClassUtils (#6327)
* fix typo

* add unit test for ClassUtils
2021-07-12 09:45:35 +08:00
ZZQ的
98e1e72ed9
[issue #6284][naming module] replace *commons.lang3*.*Utils to com.al… (#6291)
* [issue #6284][naming module] replace *commons.lang3*.*Utils to com.alibaba.nacos.common.utils.*Utils

* add StringUtils.split() function

* Replace NumberUtils.isNumber()  -> NumberUtils.isDigits()
2021-07-12 09:16:57 +08:00
ZZQ的
b9e388bff9
[core module] replace *commons.lang3*.*Utils to com.alibaba.nacos.com… (#6288)
* [core module] replace *commons.lang3*.*Utils to com.alibaba.nacos.common.utils.*Utils

* Use StringUtils replace jdk String method.

* Fix error logic.
2021-07-08 15:13:34 +08:00
孙继峰
26caf8e97a
[ISSUE #5095] Add unit test for ConvertUtils (#6269)
* 100% cover ConvertUtils

* delete dead code

* simplify code
2021-07-08 15:09:38 +08:00
孙继峰
97abc6dd72
[ISSUE #5095] Add unit test for CollectionUtils (#6251) 2021-07-02 17:55:52 +08:00
ZZQ的
afb512b476
[ISSUE #6240] Add TypeUtils/TypeUtilsTest (#6247) 2021-07-02 17:55:15 +08:00
ZZQ的
2d40c5225b
[ISSUE #6241] Add DateFormatUtils、DateFormatUtilsTest (#6245)
* [ISSUE #6241] Add DateFormatUtils、DateFormatUtilsTest

* Format code
2021-07-02 17:53:19 +08:00
ZZQ的
119a193ba9
[ISSUE #6228] Add RandomUtils/RandomUtilsTest (#6243)
* [ISSUE #6228] Add RandomUtils/RandomUtilsTest

* [ISSUE #6228] Canonical code
2021-07-02 17:52:41 +08:00
ZZQ的
888f50b5e4
Add NumberUtils、NumberUtilsTest;Modify NumberUtil dependency (#6227)
* Add NumberUtils、NumberUtilsTest;Modify NumberUtil dependency

* delete "isNumber" function

* [ISSUE #6221] Canonical code
2021-07-02 17:46:32 +08:00
ZZQ的
80078ae8ee
[ISSUE#3102] nacos-common module ArrayUtils、StringUtils (#6211)
* add ArrayUtils and TestClass

* modified StringUtils for remove common-lang3

* add Comment for StringUtils, Completion unit test

* fix variable name error and erro test

* Optimize the code.

* Edit author
2021-07-01 14:28:49 +08:00
孙继峰
16734cdec9
[ISSUE #5095] Add unit test for InternetAddressUtil (#6222)
* add unit test to InternetAddressUtil

* inline variable

* simplify assert
2021-07-01 11:33:21 +08:00
孙继峰
f36556657f
[ISSUE #6197] Use java.util.Objects instead of com.alibaba.nacos.common.utils.Objects (#6218) 2021-07-01 11:32:34 +08:00
ZZQ的
4cd6c58a95
[ISSUE #6198] BUG nacos-common>utils>StringUtils.join method NullPointerException #6198 (#6213)
* [ISSUE #6198] fix bug

* format code

* Modify Comment.Remove toString()
2021-06-30 19:13:40 +08:00
孙继峰
8dcf38f65b
[ISSUE #5095]Add unit test for VersionUtils (#6195)
* replace with try with resource

* replace with lambda

* add unit test

* inline variable
2021-06-30 10:18:29 +08:00
赵延
3fd77bc7e0
If the client already disconnect, ignore this request to avoid NPE. (#6175)
* if the client already disconnect, ignore this request to avoid npe.

* unify code with DistroClientDataProcessor.

* print warn info when client already disconnect.

* transfer client check logic to method.

* if client is not ephemeral, is illegal.
2021-06-30 10:15:06 +08:00
杨翊 SionYang
f2676bc6ca
[ISSUE#6129] Add ServerConfigChangeEvent when config file changed. (#6130)
* Add ServerConfigChangeEvent when config file changed.

* Upgrade config after notify ServerConfigChangeEvent
2021-06-22 14:39:37 +08:00
孙继峰
fb3e5ad290
simplify Assert (#6095) 2021-06-17 19:17:37 +08:00
realJackSun
7f1f917839
[5989] Fix unit tests in nacos-common (#5994) 2021-06-08 13:24:48 +08:00
Pixy Yuan
4cbc6a4960
[ISSUE #5952] Feature make naming rpc client aware of server list change (#5974)
* [ISSUE #5952] Optimize rpcClient creation lock.

* [ISSUE #5952] Make naming rpc client aware of server list change.
2021-06-07 20:07:39 +08:00
nov.lzf
de6a4b803d
client aware server list change (#5952) 2021-06-04 19:34:38 +08:00
nov.lzf
55c6f44413
fix query sla multi connection model ;add rpc client error log; optimize client shutdown (#5949)
* fix multi connection model ,query sla

* add rpc client error log

* optimize client shutdown

* optimize client log
2021-06-04 15:27:32 +08:00
nov.lzf
3dc1a8cd96
fix ak sk and some tiny optimize (#5937)
* fix ak bug.

* fix ak bug.

* revert version
2021-06-04 09:41:40 +08:00
杨翊 SionYang
1d5a6605ee
[ISSUE#5918] Refactor event publisher in naming module to fix event without orders. (#5930)
* Rollback #5778.

* Add method to register custom sharded event publisher

* Make naming module event use custom sharded publisher
2021-06-03 12:53:29 +08:00
李晓双 Li Xiao Shuang
e199a5ee64
[ISSUE #5774] improve the code quality for naming core (#5914)
* mprove the code quality for naming core

* fix build
2021-06-03 09:59:52 +08:00
孙继峰
15c71831e7
[ISSUE #5765] fix localhost not match ip (#5852)
* rename IPUitl to InternetAddressUtil

* move isDomain to InternetAddressUtil

* [ISSUE #5765] fix localhost not match ip

* fix typo

* delete the verification IP, follow the single responsibility principle
2021-05-27 19:01:39 +08:00
xiaoheng1
6831de3111
Publisher code optimization (#5778)
* fix #5762 Publisher code optimization

* there is no subscriber, return directly.
2021-05-25 09:28:51 +08:00
brotherlu-xcq
f9d696beb4
[code quality] [nacos-common] [tls/utils] remove unnecessary symbol, export constant in class, change the Chinese javadoc to English (#5821) 2021-05-24 14:15:11 +08:00
brotherlu-xcq
4dafe6fa86
[code quality] [nacos-common] [remote/spi] remove unnecessary symbol, export constant in class. (#5820) 2021-05-24 14:10:38 +08:00
brotherlu-xcq
5089af1a1e
[code quality] [nacos-common] [notify/http] remove unnecessary symbol, export constant in class. (#5819) 2021-05-24 14:05:28 +08:00
KomachiSion
cf5a171ac5 Merge remote-tracking branch 'upstream/develop' into feature_support_grpc_core
# Conflicts:
#	NOTICE
#	api/pom.xml
#	common/src/main/java/com/alibaba/nacos/common/notify/DefaultPublisher.java
#	config/src/main/java/com/alibaba/nacos/config/server/service/LongPollingService.java
#	naming/src/test/java/com/alibaba/nacos/naming/consistency/persistent/impl/NamingSnapshotOperationTest.java
#	naming/src/test/java/com/alibaba/nacos/naming/core/DomainsManagerTest.java
#	naming/src/test/java/com/alibaba/nacos/naming/healthcheck/ClientBeatCheckTaskTest.java
#	pom.xml
#	test/src/test/java/com/alibaba/nacos/test/core/JacksonUtils.java
2021-05-14 11:04:52 +08:00