Skip to content

Breaking Changes

  • So far ArchUnit's terminology has been a little sloppy with respect to the naming of inner and nested classes. By the JLS "inner classes" are those classes that are nested and not static. ArchUnit's API now reflects this via JavaClass.isNestedClass() versus JavaClass.isInnerClass(). Unfortunately this means that the method formerly called JavaClass.isInnerClass() will now return a different result, i.e. it will only return true, if the class is non-static. On the other hand, the method JavaClass.isNestedClass() will behave exactly like isInnerClass() did in ArchUnit 0.11.0 (see #224; thanks a lot to @rweisleder for the clarification and PR)
  • JavaAccessCondition does not filter self-accesses anymore. This was confusing behavior that did not solve the issue it was originally intended for. However, this might lead to additional violations showing up (see #209)

Bug Fixes

  • Fixed bug where simple name of local classes was incorrect (see #216; thanks a lot to @rweisleder)
  • static modifier was missing from nested classes (see #219; thanks a lot to @rweisleder)



  • Support for Java 14 (see #230; thanks a lot to @hankem)
  • JavaModifier now contains SYNTHETIC and BRIDGE allowing more introspection and filtering of synthetic members (see #243; thanks a lot to @alexfedorenchik)
  • Every property in can now be overwritten by passing a system property. This can be valuable in CI environments, e.g. to specify the ViolationStore path for FreezingArchRule. Compare the user guide (see #252)
  • A JavaClass representing an array can now be queried for its component type (see #187; thanks a lot to @alexfedorenchik)
  • JavaClass now offers a classpath independent version of getMethod(..) and getConstructor(..) (see #236; thanks a lot to @rweisleder)


  • Extended syntax for classes().thatAreEnums() and classes()...should().beEnums() (see #172; thanks a lot to @rweisleder)


  • LayeredArchitecture now also checks that no layer is empty. While originally with good intentions, the ability to define empty layers turned out to do more harm than good (see #177; thanks a lot to @mikomatic)
  • LayeredArchitecture now allows layers to be defined by predicate. This allows for a way more flexible definition than simple package patterns (see #228; thanks a lot to @mikomatic)
  • FreezingArchRule can now be configured to be more strict, when checking rules. In particular it is possible to forbid updates of the ViolationStore or the creation of a new ViolationStore. This can serve as a safeguard in CI environments, where a missing ViolationStore is typically a misconfiguration. Compare the user guide (see #211; thanks a lot to @hankem for reviewing and providing valuable improvements)
Assets 2
You can’t perform that action at this time.