提交 e1d26167 编写于 作者: J Jason Song

fix potential conditional npe

上级 c8ef52c4
......@@ -32,10 +32,15 @@ public class OnProfileCondition implements Condition {
return Collections.emptySet();
}
Set<String> profiles = Sets.newHashSet();
MultiValueMap<String, Object> attributes = metadata.getAllAnnotationAttributes(annotationType);
if (attributes == null) {
return Collections.emptySet();
}
Set<String> profiles = Sets.newHashSet();
List<?> values = attributes.get("value");
if (values != null) {
for (Object value : values) {
if (value instanceof String[]) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册