Skip to content

Commit

Permalink
Ban two Assertions classes from AssertJ
Browse files Browse the repository at this point in the history
Quoting the `<reason>`:

> These classes were introduced to overcome type inference issues in
> Java 8, but the regular `org.assertj.core.api.Assertions` works just
> fine and has a richer API.
  • Loading branch information
ksobolew committed Sep 13, 2023
1 parent 7882c69 commit a2965e7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions airbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,15 @@
<bannedImport>org.testng.AssertJUnit.*</bannedImport>
</bannedImports>
</RestrictImports>
<RestrictImports>
<reason>These classes were introduced to overcome type inference issues in Java 8, but the regular org.assertj.core.api.Assertions works just fine and has a richer API</reason>
<bannedImports>
<bannedImport>org.assertj.core.api.AssertionsForClassTypes</bannedImport>
<bannedImport>org.assertj.core.api.AssertionsForClassTypes.*</bannedImport>
<bannedImport>org.assertj.core.api.AssertionsForInterfaceTypes</bannedImport>
<bannedImport>org.assertj.core.api.AssertionsForInterfaceTypes.*</bannedImport>
</bannedImports>
</RestrictImports>
</rules>
</configuration>
</plugin>
Expand Down

0 comments on commit a2965e7

Please sign in to comment.