Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE#12979]Correct serviceloader and fix pmd. #13086

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions maintainer-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-common</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
*/
public class NacosMaintainerFactory {

public static ConfigMaintainerService createConfigMaintainerService(String serverList)
throws NacosException, NacosException {
public static ConfigMaintainerService createConfigMaintainerService(String serverList) throws NacosException {
return ConfigMaintainerFactory.createConfigMaintainerService(serverList);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.alibaba.nacos.maintainer.client.remote.HttpClientManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Collections;
Expand All @@ -37,7 +36,6 @@
*
* @author Nacos
*/
@Service
public class DefaultServerListManager extends AbstractServerListManager {

private static final Logger LOGGER = LoggerFactory.getLogger(DefaultServerListManager.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ConfigMaintainerFactory {
public static ConfigMaintainerService createConfigMaintainerService(String serverList) throws NacosException {
Properties properties = new Properties();
properties.setProperty("serverAddr", serverList);
return new NacosConfigMaintainerService(properties);
return new NacosConfigMaintainerServiceImpl(properties);
}

/**
Expand All @@ -51,6 +51,6 @@ public static ConfigMaintainerService createConfigMaintainerService(Properties p
if (properties == null) {
throw new NacosException(NacosException.INVALID_PARAM, "Properties cannot be null");
}
return new NacosConfigMaintainerService(properties);
return new NacosConfigMaintainerServiceImpl(properties);
}
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
import java.util.HashMap;
import java.util.Map;

/**
* ServerLoaderMetrics.
*
* @author Nacos
*/
public class ServerLoaderMetrics {

String address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.alibaba.nacos.maintainer.client.model.naming;

import com.alibaba.nacos.common.utils.JacksonUtils;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.HashMap;
Expand All @@ -32,7 +31,6 @@
*
* @author nacos
*/
@Component
@SuppressWarnings("PMD")
public class SwitchDomain implements Record, Cloneable {

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class NamingMaintainerFactory {
public static NamingMaintainerService createNamingMaintainerService(String serverList) throws NacosException {
Properties properties = new Properties();
properties.setProperty("serverAddr", serverList);
return new NacosNamingMaintainerService(properties);
return new NacosNamingMaintainerServiceImpl(properties);
}

/**
Expand All @@ -51,6 +51,6 @@ public static NamingMaintainerService createNamingMaintainerService(Properties p
if (properties == null) {
throw new NacosException(NacosException.INVALID_PARAM, "properties is null");
}
return new NacosNamingMaintainerService(properties);
return new NacosNamingMaintainerServiceImpl(properties);
}
}
Loading