Skip to content

ArchUnit 0.22.0

Compare
Choose a tag to compare
@codecholeric codecholeric released this 30 Oct 06:26
· 767 commits to main since this release

Bug Fixes

  • Java class file URLs with spaces are now correctly handled when resolving transitive dependencies (see #683)
  • fixed memory leak in ArchUnit JUnit 5 support (see #695)
  • three bug fixes regarding generics import (see #700)
    • toplevel generic array types (e.g. T[]) were not detected correctly as method parameters
    • primitive types were missing from the generic JavaCodeUnit.getParameterTypes()
    • inner classes were not detected correctly as upper bounds of type parameters

Enhancements

Core

  • support for method and constructor parameter annotations (see #701; thanks a lot to @hankem for extensive reviews)
    • new method JavaCodeUnit.getParameters() that will return parameters in a structured form offering raw type, generic type and annotations
    • new method JavaCodeUnit.getParameterAnnotations() that offers just parameter annotations by index
    • parameter annotations are now part of JavaClass.directDependencies{from/to}Self
  • SourceCodeLocation now offers structured access to source file and source class (see #673; thanks a lot to @thmuch)

JUnit

  • new option to replace underscores in rule field/method names by spaces in the test description to improve readability (see #626; thanks a lot to @thmuch)