Skip to content

NoSuchMethodError for computeIfAbsent in SpringExtension after upgrade to 7.0.0 version #35834

@rakeshreddygundala-ai

Description

@rakeshreddygundala-ai

After we upgrade to 7.0.0 version for org.springframework.spring-test , we are getting NoSuchMethodError for computeIfAbsent().

Our tests are failing at moment after we upgrade this to latest version.

java.lang.NoSuchMethodError: 'java.lang.Object org.junit.jupiter.api.extension.ExtensionContext$Store.computeIfAbsent(java.lang.Object, java.util.function.Function, java.lang.Class)'
        at org.springframework.test.context.junit.jupiter.SpringExtension.getTestContextManager(SpringExtension.java:412)
        at org.springframework.test.context.junit.jupiter.SpringExtension.beforeAll(SpringExtension.java:170)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
        Suppressed: java.lang.NoSuchMethodError: 'java.lang.Object org.junit.jupiter.api.extension.ExtensionContext$Store.computeIfAbsent(java.lang.Object, java.util.function.Function, java.lang.Class)'
                at org.springframework.test.context.junit.jupiter.SpringExtension.getTestContextManager(SpringExtension.java:412)
                at org.springframework.test.context.junit.jupiter.SpringExtension.afterAll(SpringExtension.java:181)
                ... 1 more

Please help on fix it and provide a solution for this problem.

Thank You.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: testIssues in the test modulestatus: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions