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

Null Array item causes failure #799

Closed
Feiyizhan opened this Issue Mar 5, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@Feiyizhan
Copy link

Feiyizhan commented Mar 5, 2019

I have an object with a field that is a Array. If the Array contains an entry that is null, then I get the following exception:

java.lang.IllegalArgumentException: argument should not be null
    at org.javers.common.validation.Validate.argumentsAreNotNull(Validate.java:33)
    at org.javers.core.metamodel.object.GlobalIdFactory.createId(GlobalIdFactory.java:44)
    at org.javers.core.graph.LiveCdoFactory.create(LiveCdoFactory.java:29)
    at org.javers.core.graph.LiveCdoFactory.create(LiveCdoFactory.java:15)
    at org.javers.core.graph.EdgeBuilder$MultiEdgeContainerBuilderFunction.apply(EdgeBuilder.java:72)
    at org.javers.core.metamodel.type.ListType.map(ListType.java:33)

This issue is similar to #676

@bartoszwalacik

This comment has been minimized.

Copy link
Member

bartoszwalacik commented Mar 10, 2019

Please provide a failing test case (like these https://github.com/javers/javers/tree/master/javers-core/src/test/groovy/org/javers/core/cases)
Does the error still exists in 5.2.5? We did some improvements in this area.

@KevinXu2014

This comment has been minimized.

Copy link

KevinXu2014 commented Mar 15, 2019

same problem here, basically Javers.compare(null, something new)

it should say, something new added, but Javers threw 'java.lang.IllegalArgumentException' exception.

bartoszwalacik added a commit that referenced this issue Mar 16, 2019

bartoszwalacik added a commit that referenced this issue Mar 16, 2019

@bartoszwalacik

This comment has been minimized.

Copy link
Member

bartoszwalacik commented Mar 16, 2019

fixed in 5.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.