Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix setting null value of property in xml throws NullPointerException #2646

Merged
merged 2 commits into from Oct 13, 2019

Conversation

xuanuu
Copy link
Contributor

@xuanuu xuanuu commented Oct 10, 2019

解决如下问题:
当propertyString==null时,会抛空指针异常NullPointerException。例如:在xml的配置中,如果设置属性值为null, <property name="manager"></null></property>,即发生propertyString==null

@xuanuu xuanuu changed the title fix setting value of property in xml is null throws NullPointerException fix setting null value of property in xml throws NullPointerException Oct 10, 2019
@JaredTan95 JaredTan95 added the bug Categorizes issue or PR as related to a bug. label Oct 10, 2019
@JaredTan95 JaredTan95 added this to the 1.5.0 milestone Oct 10, 2019
@codecov-io
Copy link

codecov-io commented Oct 10, 2019

Codecov Report

Merging #2646 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master   #2646      +/-   ##
===========================================
- Coverage     50.24%   50.2%   -0.04%     
+ Complexity     2061    2060       -1     
===========================================
  Files           413     413              
  Lines         12644   12644              
  Branches       1292    1292              
===========================================
- Hits           6353    6348       -5     
- Misses         5844    5846       +2     
- Partials        447     450       +3
Impacted Files Coverage Δ Complexity Δ
...work/apollo/spring/property/PlaceholderHelper.java 80% <0%> (-1.54%) 24 <0> (ø)
...mework/apollo/portal/component/PortalSettings.java 65.07% <0%> (-4.77%) 5% <0%> (ø)
.../apollo/internals/RemoteConfigLongPollService.java 79.62% <0%> (-0.62%) 27% <0%> (-1%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59d92f6...016db42. Read the comment docs.

@coveralls
Copy link

coveralls commented Oct 10, 2019

Coverage Status

Coverage decreased (-0.02%) to 53.765% when pulling 016db42 on xuanuu:master into 59d92f6 on ctripcorp:master.

Copy link
Member

@JaredTan95 JaredTan95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JaredTan95 JaredTan95 merged commit 9c871e4 into apolloconfig:master Oct 13, 2019
@nobodyiam
Copy link
Member

Looks good! It will be perfect if some unit tests are added to cover this scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants