Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
d62ba3d1
Commit
d62ba3d1
authored
Sep 05, 2017
by
Jason Song
Committed by
GitHub
Sep 05, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #735 from nobodyiam/fix-conditional-npe
fix potential conditional npe
parents
c8ef52c4
e1d26167
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
OnProfileCondition.java
...framework/apollo/common/condition/OnProfileCondition.java
+6
-1
No files found.
apollo-common/src/main/java/com/ctrip/framework/apollo/common/condition/OnProfileCondition.java
View file @
d62ba3d1
...
@@ -32,10 +32,15 @@ public class OnProfileCondition implements Condition {
...
@@ -32,10 +32,15 @@ public class OnProfileCondition implements Condition {
return
Collections
.
emptySet
();
return
Collections
.
emptySet
();
}
}
Set
<
String
>
profiles
=
Sets
.
newHashSet
();
MultiValueMap
<
String
,
Object
>
attributes
=
metadata
.
getAllAnnotationAttributes
(
annotationType
);
MultiValueMap
<
String
,
Object
>
attributes
=
metadata
.
getAllAnnotationAttributes
(
annotationType
);
if
(
attributes
==
null
)
{
return
Collections
.
emptySet
();
}
Set
<
String
>
profiles
=
Sets
.
newHashSet
();
List
<?>
values
=
attributes
.
get
(
"value"
);
List
<?>
values
=
attributes
.
get
(
"value"
);
if
(
values
!=
null
)
{
if
(
values
!=
null
)
{
for
(
Object
value
:
values
)
{
for
(
Object
value
:
values
)
{
if
(
value
instanceof
String
[])
{
if
(
value
instanceof
String
[])
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment