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

NoSuchMethodError with AssertJ >= 3.11.0 #13

Open
ljrmorgan opened this issue Jan 14, 2019 · 0 comments · May be fixed by #14
Open

NoSuchMethodError with AssertJ >= 3.11.0 #13

ljrmorgan opened this issue Jan 14, 2019 · 0 comments · May be fixed by #14

Comments

@ljrmorgan
Copy link

After updating to assertj-core 3.11.1 I've started seeing:

java.lang.NoSuchMethodError: org.assertj.core.api.Assertions.assertThat(Ljava/lang/String;)Lorg/assertj/core/api/AbstractCharSequenceAssert;

	at com.revinate.assertj.json.JsonPathAssert.jsonPathAsString(JsonPathAssert.java:32)

when running my tests.

This seems to have been caused by a signature changes in the fix for assertj/assertj#1269, in particular the change to Assertions.java:

-  public static AbstractCharSequenceAssert<?, String> assertThat(String actual) {
+  public static AbstractStringAssert<?> assertThat(String actual) {

I think it's sufficient to just bump the assertj-core dependency to 3.11.1 to fix this, though probably jsonPathAsString should return an AbstractStringAssert<?> rather than AbstractCharSequenceAssert<?, String> to pick up the additional methods that were added in that assertj-core change.

ljrmorgan added a commit to ljrmorgan/assertj-json that referenced this issue Jan 14, 2019
@ljrmorgan ljrmorgan linked a pull request Jan 14, 2019 that will close this issue
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 a pull request may close this issue.

1 participant