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

XmlUnit 2.6.3 is not compatible with AssertJ-Core 3.13.2 #166

Closed
kaklakariada opened this issue Oct 23, 2019 · 3 comments
Closed

XmlUnit 2.6.3 is not compatible with AssertJ-Core 3.13.2 #166

kaklakariada opened this issue Oct 23, 2019 · 3 comments
Labels
AssertJ Support the xmlunit-assertj module
Milestone

Comments

@kaklakariada
Copy link

The AssertJ dependency for XmlUnit 2.6.1 is on 2.9.0. Latest version is 3.13.2. Using assertj-core 3.13.2 causes an AbstractMethodError:

java.lang.AbstractMethodError: org.xmlunit.assertj.NodeAssertFactory.createAssert(Ljava/lang/Object;)Lorg/assertj/core/api/Assert;
	at org.assertj.core.api.FactoryBasedNavigableIterableAssert.toAssert(FactoryBasedNavigableIterableAssert.java:39)
	at org.assertj.core.api.AbstractIterableAssert.first(AbstractIterableAssert.java:2358)

Simply upgrading assertj-core in xmlunit to 3.13.2 breaks Java 7 compatibility: https://travis-ci.org/kaklakariada/xmlunit/jobs/601656704

Maybe it's possible to solve this similar to #135?
Thank you for your help!

@krystiankaluzny krystiankaluzny added the AssertJ Support the xmlunit-assertj module label Oct 23, 2019
@krystiankaluzny krystiankaluzny added this to the 2.6.4 milestone Dec 20, 2019
@krystiankaluzny
Copy link
Member

Hello @kaklakariada

I notice that in AssertJ 3.13.0 AssertFactory interface was changed from

public interface AssertFactory<T, ASSERT>

to

public interface AssertFactory<T, ASSERT extends Assert<?, ?>>

The problem is that there is no replacement like it was in #135. So if we want to keep all xmlunit-assertj features, we need to use suitable version of AssertFactory.
To achieve that I added runtime AssertFactory subclass generation.

The bug fix will be in the next XmlUnit release.

@ketan
Copy link

ketan commented Mar 3, 2020

Is there an ETA when a release of XMLUnit becomes available?

ketan added a commit to gocd/gocd that referenced this issue Mar 3, 2020
ketan added a commit to ketan/gocd that referenced this issue Mar 4, 2020
@bodewig
Copy link
Member

bodewig commented Mar 8, 2020

I have just published XMLUnit 2.6.4, it should show up in Maven Central soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AssertJ Support the xmlunit-assertj module
Projects
None yet
Development

No branches or pull requests

4 participants