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
Milestone

Comments

@kaklakariada
Copy link

@kaklakariada kaklakariada commented Oct 23, 2019

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 this to the 2.6.4 milestone Dec 20, 2019
@krystiankaluzny

This comment has been minimized.

Copy link
Member

@krystiankaluzny krystiankaluzny commented Dec 20, 2019

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

This comment has been minimized.

Copy link

@ketan 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
Fix build
ketan added a commit to ketan/gocd that referenced this issue Mar 4, 2020
Fix build
@bodewig

This comment has been minimized.

Copy link
Member

@bodewig 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.