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

Fixed NPE when MDC contains null values. #1364

Merged
merged 7 commits into from Apr 1, 2021
Merged

Fixed NPE when MDC contains null values. #1364

merged 7 commits into from Apr 1, 2021

Conversation

donbeave
Copy link
Contributor

This is a fix for this issue: #1361.

@marandaneto
Copy link
Contributor

@donbeave thanks for contributing.
run make format and commit the changes, also add an entry to the changelog, thanks.

@codecov-io
Copy link

codecov-io commented Mar 30, 2021

Codecov Report

Merging #1364 (00a5613) into main (1d778b5) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1364      +/-   ##
============================================
- Coverage     75.70%   75.69%   -0.01%     
- Complexity     1854     1858       +4     
============================================
  Files           185      185              
  Lines          6355     6362       +7     
  Branches        635      635              
============================================
+ Hits           4811     4816       +5     
- Misses         1256     1258       +2     
  Partials        288      288              
Impacted Files Coverage Δ Complexity Δ
...rc/main/java/io/sentry/logback/SentryAppender.java 90.00% <100.00%> (+0.25%) 25.00 <2.00> (+2.00)
sentry/src/main/java/io/sentry/HubAdapter.java 5.26% <0.00%> (-3.51%) 3.00% <0.00%> (-1.00%)
...c/main/java/io/sentry/ShutdownHookIntegration.java 100.00% <0.00%> (ø) 7.00% <0.00%> (+3.00%)

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 1d778b5...00a5613. Read the comment docs.

CHANGELOG.md Outdated Show resolved Hide resolved
donbeave and others added 3 commits March 31, 2021 19:27
Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com>
final Map<String, String> mdcProperties =
CollectionUtils.shallowCopy(loggingEvent.getMDCPropertyMap());
loggingEvent.getMDCPropertyMap().entrySet().stream()
Copy link
Contributor

Choose a reason for hiding this comment

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

mind doing the same fix for log4j2 SentryAdapter? it's pretty much the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants