assertj / assertj/assertj-generator

Inconsistent imports

Open
#187 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
72
Forks
47
Avg merge
1d 16h
Merged PRs (30d)
2

Description

**Problem:**
I'm having classes generated with imports like:

```
import java.util.Objects;
import org.assertj.core.api.AbstractObjectAssert;
import org.assertj.core.internal.Iterables;
import org.assertj.core.util.Objects;
```

And this results in the compile error:

> 'java.util.Objects' is already defined in a single-type import

**Solution:**

I'd like to just use fully qualified class names instead of import statements.

I see https://github.com/assertj/assertj-assertions-generator/issues/97 requested using imports instead of fully qualified class names. Maybe both should be supported, but it should be configurable which one is being used.

Also it looks like this the use of fully qualified class names was already implemented for 2.2.1 with https://github.com/assertj/assertj-assertions-generator/commit/73d3c5e584e33b1509b058a2707c1ece00ee8bee?

**Versions:**
I'm using assertj-assertions-generator version 2.2.1, assertj-assertions-generator-maven-plugin version 2.2.0, and assertj-core version 3.21.0.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.