fix:fix junit error.

pull/407/head
SkyeBeFreeman 3 years ago
parent 036784c9e0
commit de1c7f1aa3

@ -36,10 +36,11 @@ import org.springframework.web.server.ServerWebExchange;
*
* @author lepdou 2022-05-20
*/
public class CustomTransitiveMetadataResolver {
public final class CustomTransitiveMetadataResolver {
private static final String TRANSITIVE_HEADER_PREFIX = "X-SCT-Metadata-Transitive-";
private static final int TRANSITIVE_HEADER_PREFIX_LENGTH = TRANSITIVE_HEADER_PREFIX.length();
private CustomTransitiveMetadataResolver() {
}
public static Map<String, String> resolve(ServerWebExchange exchange) {
Map<String, String> result = new HashMap<>();

@ -55,37 +55,34 @@ import static com.tencent.polaris.configuration.api.core.ChangeType.MODIFIED;
* @author Palmer Xu 2022-06-06
*/
public final class PolarisConfigListenerContext {
/**
* Logger instance.
*/
private static final Logger LOG = LoggerFactory.getLogger(PolarisConfigListenerContext.class);
/**
* Execute service Atomic Reference Cache .
*/
private static final AtomicReference<ExecutorService> EAR = new AtomicReference<>();
/**
* All custom {@link ConfigChangeListener} instance defined in application .
*/
private static final List<ConfigChangeListener> listeners = Lists.newCopyOnWriteArrayList();
/**
* All custom interested keys defined in application .
*/
private static final Map<ConfigChangeListener, Set<String>> interestedKeys = Maps.newHashMap();
/**
* All custom interested key prefixes defined in application .
*/
private static final Map<ConfigChangeListener, Set<String>> interestedKeyPrefixes = Maps.newHashMap();
/**
* Cache all latest configuration information for users in the application environment .
*/
private static final Cache<String, Object> properties = CacheBuilder.newBuilder().build();
private PolarisConfigListenerContext() {
}
/**
* Get or Created new execute server .
* @return execute service instance of {@link ExecutorService}

@ -21,12 +21,14 @@ package com.tencent.cloud.polaris.router;
/**
* Router constants.
*
*@author lepdou 2022-05-17
* @author lepdou 2022-05-17
*/
public class RouterConstants {
public final class RouterConstants {
/**
* the header of router label.
*/
public static final String ROUTER_LABEL_HEADER = "internal-router-label";
private RouterConstants() {
}
}

@ -33,9 +33,13 @@ import org.springframework.util.CollectionUtils;
/**
* Resolve rule expression label from feign request.
*
* @author lepdou 2022-05-20
*/
public class FeignExpressionLabelUtils {
public final class FeignExpressionLabelUtils {
private FeignExpressionLabelUtils() {
}
public static Map<String, String> resolve(RequestTemplate request, Set<String> labelKeys) {
if (CollectionUtils.isEmpty(labelKeys)) {

Loading…
Cancel
Save