Skip to content

Code does not compile after AssertionsForClassTypes import is replaced by Assertions #664

@barbulescu

Description

@barbulescu

What version of OpenRewrite are you using?

I am using 3.0.0

  • OpenRewrite v6.0.0
  • Maven/Gradle plugin v1.2.3
  • rewrite-module v3.0.0

How are you running OpenRewrite?

not relevant

What is the smallest, simplest way to reproduce the problem?

import java.util.Map;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;

class Test {
  void test() {
    assertThat(Map.of("a", 1).entrySet()).hasNoNullFieldsOrProperties();
  }
}

What did you expect to see?

import java.util.Map;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;

class Test {
  void test() {
    assertThat(Map.of("a", 1).entrySet()).hasNoNullFieldsOrProperties();
  }
}

What did you see instead?

import java.util.Map;
import static org.assertj.core.api.Assertions.assertThat;

class Test {
  void test() {
    assertThat(Map.of("a", 1).entrySet()).hasNoNullFieldsOrProperties();
  }
}

Code does not compile anymore after this change.

What is the full stack trace of any errors you encountered?

Are you interested in contributing a fix to OpenRewrite?

yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    assertjbugSomething isn't workingquestionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions