1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

fix #841 get DubboTransported annotation attributes npe

This commit is contained in:
echooymxq 2019-08-18 21:00:44 +08:00
parent dd1d556ad3
commit 2e4f1f415a

View File

@ -15,10 +15,7 @@
*/
package com.alibaba.cloud.dubbo.autoconfigure;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.*;
import org.springframework.beans.factory.BeanClassLoaderAware;
import org.springframework.beans.factory.SmartInitializingSingleton;
@ -148,8 +145,8 @@ public class DubboLoadBalancedRestTemplateAutoConfiguration
MethodMetadata factoryMethodMetadata = annotatedBeanDefinition
.getFactoryMethodMetadata();
attributes = factoryMethodMetadata != null
? factoryMethodMetadata
.getAnnotationAttributes(DUBBO_TRANSPORTED_CLASS_NAME)
? Optional.ofNullable(factoryMethodMetadata
.getAnnotationAttributes(DUBBO_TRANSPORTED_CLASS_NAME)).orElse(attributes)
: Collections.emptyMap();
}
return attributesResolver.resolve(attributes);