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

Allowing the client to let beanmapper map null collections to null co… #127

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RobertAlblas
Copy link

…llections

Currently, beanmapper always maps null collections to empty collections. Setting useCollectionNullValues to false will map null collections to null collections.

@codecov
Copy link

codecov bot commented May 27, 2019

Codecov Report

Merging #127 into master will decrease coverage by 0.18%.
The diff coverage is 84.61%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #127      +/-   ##
===========================================
- Coverage     93.78%   93.6%   -0.19%     
- Complexity      849     853       +4     
===========================================
  Files            87      87              
  Lines          1785    1797      +12     
  Branches        174     174              
===========================================
+ Hits           1674    1682       +8     
- Misses           67      71       +4     
  Partials         44      44
Impacted Files Coverage Δ Complexity Δ
...n/java/io/beanmapper/config/BeanMapperBuilder.java 98.18% <100%> (-1.82%) 42 <2> (+1)
...n/java/io/beanmapper/config/CoreConfiguration.java 98.07% <100%> (+0.07%) 66 <2> (+2) ⬆️
...ore/converter/collections/CollectionConverter.java 100% <100%> (ø) 4 <0> (ø) ⬇️
...va/io/beanmapper/config/OverrideConfiguration.java 94.3% <50%> (-1.49%) 69 <1> (+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 6c2e500...2eb1b91. Read the comment docs.

@Test
public void nullListToNullList() {
BeanMapper beanMapper = new BeanMapperBuilder()
.setUseCollectionNullValue(false)
Copy link
Contributor

Choose a reason for hiding this comment

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

als useCollectionNullValue true is moet volgens mij de value null zijn. Dus als het false is juist niet.
Volgens mij werkt het nu precies verkeerd om...

Copy link
Author

Choose a reason for hiding this comment

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

Default gebruikt useNullValue true en worden null waarden daarom niet genegeerd. Ik neem aan dat dit op dezelfde manier werkt, klopt dat of denk ik verkeerd?

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.

2 participants