in src/main/java/com/aliyun/mns/client/CloudAccount.java [131:151]
public MNSClient getMNSClient() throws ServiceException, ClientException {
if (mnsClient == null) {
synchronized (this) {
if (mnsClient == null) {
String accountEndpoint = getAccountEndpoint();
try {
serviceClient = ServiceClientFactory.createServiceClient(config);
mnsClient = new DefaultMNSClient(credentials, serviceClient,
accountEndpoint);
} catch (Exception e) {
if (serviceClient != null) {
ServiceClientFactory.closeServiceClient(serviceClient);
serviceClient = null;
}
throw new ClientException(e);
}
}
}
}
return mnsClient;
}