[ISSUE#11035](PR-3/4) api module, remove unused import. (#11099)
* [ISSUE#11035] (PR-3/4) api module, remove unused import. * [ISSUE #11035] (PR-3/4) api module, remove unused import.
This commit is contained in:
parent
7b2f7aa92a
commit
4e3d0c9568
@ -138,7 +138,7 @@ public @interface NacosProperties {
|
||||
String SERVER_ADDR_PLACEHOLDER = "${" + PREFIX + SERVER_ADDR + ":}";
|
||||
|
||||
/**
|
||||
* The placeholder of endpoint, the value is ${nacos.context-path:}".
|
||||
* The placeholder of endpoint, the value is ${nacos.context-path:}.
|
||||
*/
|
||||
String CONTEXT_PATH_PLACEHOLDER = "${" + PREFIX + CONTEXT_PATH + ":}";
|
||||
|
||||
|
@ -181,7 +181,7 @@ public class NacosException extends Exception {
|
||||
public static final int RESOURCE_NOT_FOUND = -404;
|
||||
|
||||
/**
|
||||
* http client error code, ome exceptions that occurred when the use the Nacos RestTemplate and Nacos
|
||||
* http client error code, ome exceptions that occurred when there use the Nacos RestTemplate and Nacos
|
||||
* AsyncRestTemplate.
|
||||
*/
|
||||
public static final int HTTP_CLIENT_ERROR_CODE = -500;
|
||||
|
@ -260,7 +260,7 @@ private static final long serialVersionUID = 0L;
|
||||
if (key == null) { throw new NullPointerException(); }
|
||||
java.util.Map<String, String> map =
|
||||
internalGetHeaders().getMap();
|
||||
return map.containsKey(key) ? map.get(key) : defaultValue;
|
||||
return map.getOrDefault(key, defaultValue);
|
||||
}
|
||||
/**
|
||||
* <code>map<string, string> headers = 7;</code>
|
||||
@ -797,7 +797,7 @@ private static final long serialVersionUID = 0L;
|
||||
}
|
||||
private com.google.protobuf.MapField<String, String>
|
||||
internalGetMutableHeaders() {
|
||||
onChanged();;
|
||||
onChanged();
|
||||
if (headers_ == null) {
|
||||
headers_ = com.google.protobuf.MapField.newMapField(
|
||||
HeadersDefaultEntryHolder.defaultEntry);
|
||||
|
@ -17,21 +17,14 @@
|
||||
package com.alibaba.nacos.api.grpc.auto;
|
||||
|
||||
import static io.grpc.MethodDescriptor.generateFullMethodName;
|
||||
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
|
||||
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
|
||||
import static io.grpc.stub.ClientCalls.futureUnaryCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler (version 1.14.0)",
|
||||
|
@ -21,7 +21,7 @@ import com.alibaba.nacos.api.common.ResponseCode;
|
||||
/**
|
||||
* Business response code of naming module
|
||||
*
|
||||
* <p>Every code stays between 20001 to 29999.
|
||||
* <p>Every code stays between 20001 and 29999.
|
||||
*
|
||||
* @author nkorange
|
||||
* @author 1.2.0
|
||||
|
@ -64,7 +64,7 @@ public interface Selector<R, C, E> extends Serializable {
|
||||
String getType();
|
||||
|
||||
/**
|
||||
* Get the select context which usede by {@link #select(Object)}.
|
||||
* Get the select context which used by {@link #select(Object)}.
|
||||
*
|
||||
* @return selector context type.
|
||||
*/
|
||||
|
@ -40,7 +40,7 @@ import com.alibaba.nacos.client.utils.ValidatorUtils;
|
||||
import com.alibaba.nacos.common.utils.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
@ -105,7 +105,8 @@ public class NacosConfigService implements ConfigService {
|
||||
.queryConfig(dataId, group, worker.getAgent().getTenant(), timeoutMs, false);
|
||||
String content = configResponse.getContent();
|
||||
String encryptedDataKey = configResponse.getEncryptedDataKey();
|
||||
worker.addTenantListenersWithContent(dataId, group, content, encryptedDataKey, Arrays.asList(listener));
|
||||
worker.addTenantListenersWithContent(dataId, group, content, encryptedDataKey,
|
||||
Collections.singletonList(listener));
|
||||
|
||||
// get a decryptContent, fix https://github.com/alibaba/nacos/issues/7039
|
||||
ConfigResponse cr = new ConfigResponse();
|
||||
@ -119,7 +120,7 @@ public class NacosConfigService implements ConfigService {
|
||||
|
||||
@Override
|
||||
public void addListener(String dataId, String group, Listener listener) throws NacosException {
|
||||
worker.addTenantListeners(dataId, group, Arrays.asList(listener));
|
||||
worker.addTenantListeners(dataId, group, Collections.singletonList(listener));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user