File tree Expand file tree Collapse file tree 8 files changed +15
-17
lines changed
data/src/main/java/com/alipay/sofa/registry/server/data/providedata
meta/src/main/java/com/alipay/sofa/registry/server/meta
session/src/main/java/com/alipay/sofa/registry/server/session/providedata
shared/src/main/java/com/alipay/sofa/registry/server/shared/util
api/src/main/java/com/alipay/sofa/registry/store/api/elector
jdbc/src/main/java/com/alipay/sofa/registry/jdbc/convertor Expand file tree Collapse file tree 8 files changed +15
-17
lines changed Original file line number Diff line number Diff line change 1616 */
1717package com .alipay .sofa .registry .server .data .providedata ;
1818
19- import com .alipay .sofa .common .profile .StringUtil ;
2019import com .alipay .sofa .registry .common .model .constants .ValueConstants ;
2120import com .alipay .sofa .registry .common .model .metaserver .CompressDatumSwitch ;
2221import com .alipay .sofa .registry .common .model .metaserver .CompressPushSwitch ;
3029import com .alipay .sofa .registry .server .shared .providedata .AbstractFetchSystemPropertyService ;
3130import com .alipay .sofa .registry .server .shared .providedata .SystemDataStorage ;
3231import com .alipay .sofa .registry .util .JsonUtils ;
32+ import org .apache .commons .lang .StringUtils ;
3333import org .springframework .beans .factory .annotation .Autowired ;
3434
3535public class CompressDatumService
@@ -52,7 +52,7 @@ protected int getSystemPropertyIntervalMillis() {
5252 @ Override
5353 protected boolean doProcess (CompressStorage expect , ProvideData data ) {
5454 final String switchString = ProvideData .toString (data );
55- if (StringUtil .isBlank (switchString )) {
55+ if (StringUtils .isBlank (switchString )) {
5656 LOGGER .info ("Fetch compress datum switch content empty" );
5757 return true ;
5858 }
Original file line number Diff line number Diff line change 1616 */
1717package com .alipay .sofa .registry .server .meta .bootstrap ;
1818
19- import com .alipay .sofa .common .profile .StringUtil ;
2019import com .alipay .sofa .registry .common .model .elector .LeaderInfo ;
2120import com .alipay .sofa .registry .common .model .store .URL ;
2221import com .alipay .sofa .registry .log .Logger ;
@@ -178,7 +177,7 @@ public void start() {
178177 "[MetaBootstrap] retry connect to meta leader: {}, client:{}" ,
179178 leader .getLeader (),
180179 localMetaExchanger .getClient ());
181- return StringUtil .isNotEmpty (leader .getLeader ())
180+ return StringUtils .isNotEmpty (leader .getLeader ())
182181 && localMetaExchanger .getClient () != null ;
183182 });
184183
Original file line number Diff line number Diff line change 1616 */
1717package com .alipay .sofa .registry .server .meta .remoting .meta ;
1818
19- import com .alipay .sofa .common .profile .StringUtil ;
2019import com .alipay .sofa .registry .common .model .store .URL ;
2120import com .alipay .sofa .registry .log .Logger ;
2221import com .alipay .sofa .registry .log .LoggerFactory ;
3332import java .util .Collections ;
3433import java .util .concurrent .locks .ReadWriteLock ;
3534import java .util .concurrent .locks .ReentrantReadWriteLock ;
35+ import org .apache .commons .lang .StringUtils ;
3636import org .springframework .beans .factory .annotation .Autowired ;
3737
3838/**
@@ -77,12 +77,12 @@ public int getConnNum() {
7777
7878 public Response sendRequest (Object requestBody ) throws RequestException {
7979 final String newLeader = metaLeaderService .getLeader ();
80- if (StringUtil .isBlank (newLeader )) {
80+ if (StringUtils .isBlank (newLeader )) {
8181 LOGGER .error ("[sendRequest] meta leader is empty." );
8282 return () -> ResultStatus .FAILED ;
8383 }
8484
85- if (!StringUtil .equals (metaLeader , newLeader ) || boltExchange .getClient (serverType ) == null ) {
85+ if (!StringUtils .equals (metaLeader , newLeader ) || boltExchange .getClient (serverType ) == null ) {
8686 setLeaderAndConnect (newLeader );
8787 }
8888
Original file line number Diff line number Diff line change 1616 */
1717package com .alipay .sofa .registry .server .meta .resource ;
1818
19- import com .alipay .sofa .common .profile .StringUtil ;
2019import com .alipay .sofa .registry .common .model .CommonResponse ;
2120import com .alipay .sofa .registry .metrics .ReporterUtils ;
2221import com .alipay .sofa .registry .server .meta .MetaLeaderService ;
3332import javax .ws .rs .core .Response ;
3433import javax .ws .rs .core .Response .ResponseBuilder ;
3534import javax .ws .rs .core .Response .Status ;
35+ import org .apache .commons .lang .StringUtils ;
3636import org .springframework .beans .factory .annotation .Autowired ;
3737
3838/**
@@ -93,7 +93,7 @@ private CommonResponse getHealthCheckResult() {
9393 ret = ret && start ;
9494 sb .append (", remoteMetaRegisterServerStart:" ).append (start );
9595
96- boolean leaderNotEmpty = StringUtil .isNotBlank (metaLeaderService .getLeader ());
96+ boolean leaderNotEmpty = StringUtils .isNotBlank (metaLeaderService .getLeader ());
9797 ret = ret && leaderNotEmpty ;
9898
9999 sb .append (", role:" ).append (metaLeaderService .amILeader () ? "leader" : "follower" );
Original file line number Diff line number Diff line change 1616 */
1717package com .alipay .sofa .registry .server .session .providedata ;
1818
19- import com .alipay .sofa .common .profile .StringUtil ;
2019import com .alipay .sofa .registry .common .model .constants .ValueConstants ;
2120import com .alipay .sofa .registry .common .model .metaserver .CompressPushSwitch ;
2221import com .alipay .sofa .registry .common .model .metaserver .ProvideData ;
@@ -55,7 +54,7 @@ protected int getSystemPropertyIntervalMillis() {
5554 @ Override
5655 protected boolean doProcess (CompressStorage expect , ProvideData data ) {
5756 final String switchString = ProvideData .toString (data );
58- if (StringUtil .isBlank (switchString )) {
57+ if (StringUtils .isBlank (switchString )) {
5958 LOGGER .info ("Fetch session push compressed enabled content empty" );
6059 return true ;
6160 }
Original file line number Diff line number Diff line change 1616 */
1717package com .alipay .sofa .registry .server .shared .util ;
1818
19- import com .alipay .sofa .common .profile .StringUtil ;
2019import com .alipay .sofa .registry .common .model .console .PersistenceData ;
2120import com .alipay .sofa .registry .store .api .DBResponse ;
2221import com .alipay .sofa .registry .store .api .OperationStatus ;
22+ import org .apache .commons .lang .StringUtils ;
2323
2424/**
2525 * @author xiaojian.xj
@@ -29,7 +29,7 @@ public class PersistenceDataParser {
2929
3030 public static boolean parse2BoolIgnoreCase (
3131 PersistenceData persistenceData , boolean defaultValue ) {
32- if (persistenceData == null || StringUtil .isBlank (persistenceData .getData ())) {
32+ if (persistenceData == null || StringUtils .isBlank (persistenceData .getData ())) {
3333 return defaultValue ;
3434 }
3535 return Boolean .parseBoolean (persistenceData .getData ());
Original file line number Diff line number Diff line change 1616 */
1717package com .alipay .sofa .registry .store .api .elector ;
1818
19- import com .alipay .sofa .common .profile .StringUtil ;
2019import com .alipay .sofa .registry .log .Logger ;
2120import com .alipay .sofa .registry .log .LoggerFactory ;
2221import com .alipay .sofa .registry .net .NetUtil ;
2726import java .util .List ;
2827import java .util .concurrent .TimeUnit ;
2928import javax .annotation .PostConstruct ;
29+ import org .apache .commons .lang .StringUtils ;
3030
3131/**
3232 * @author chen.zhu
@@ -144,7 +144,7 @@ public boolean amILeader() {
144144 }
145145
146146 protected boolean amILeader (String leader ) {
147- return StringUtil .equals (myself (), leader ) && leaderNotExpired ();
147+ return StringUtils .equals (myself (), leader ) && leaderNotExpired ();
148148 }
149149
150150 private boolean leaderNotExpired () {
Original file line number Diff line number Diff line change 1616 */
1717package com .alipay .sofa .registry .jdbc .convertor ;
1818
19- import com .alipay .sofa .common .profile .StringUtil ;
2019import com .alipay .sofa .registry .common .model .store .AppRevision ;
2120import com .alipay .sofa .registry .core .model .AppRevisionInterface ;
2221import com .alipay .sofa .registry .jdbc .domain .AppRevisionDomain ;
2322import com .alipay .sofa .registry .util .JsonUtils ;
2423import com .fasterxml .jackson .core .type .TypeReference ;
2524import com .google .common .annotations .VisibleForTesting ;
2625import java .util .*;
26+ import org .apache .commons .lang .StringUtils ;
2727import org .springframework .util .CollectionUtils ;
2828
2929/**
@@ -75,7 +75,7 @@ public static AppRevision convert2Revision(AppRevisionDomain domain) {
7575 appRevision .setBaseParams (JsonUtils .read (domain .getBaseParams (), BASE_FORMAT ));
7676
7777 String serviceParams = domain .getServiceParamsLarge ();
78- if (StringUtil .isBlank (serviceParams )) {
78+ if (StringUtils .isBlank (serviceParams )) {
7979 serviceParams = domain .getServiceParams ();
8080 }
8181 appRevision .setInterfaceMap (JsonUtils .read (serviceParams , SERVICE_FORMAT ));
You can’t perform that action at this time.
0 commit comments