Commit d62ba3d1 by Jason Song Committed by GitHub

Merge pull request #735 from nobodyiam/fix-conditional-npe

fix potential conditional npe
parents c8ef52c4 e1d26167
......@@ -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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment