Skip to content

dependabot maven(deps-dev): bump archunit.version from 0.22.0 to 0.23.0

Depen d'Abot requested to merge dependabot-maven-archunit.version-0.23.0 into master

Bumps archunit.version from 0.22.0 to 0.23.0. Updates archunit from 0.22.0 to 0.23.0

Release notes

Sourced from archunit's releases.

ArchUnit 0.23.0

Breaking Changes

  • As mentioned in Enhancements/Core ArchRules will now by default reject evaluating if the set passed to the should-clause is empty. This will break existing rules that don't check any elements in their should-clause. You can restore the old behavior by setting the ArchUnit property archRule.failOnEmptyShould=false

Bug Fixes

  • Fix wrong origins of JavaCall in case of bridge methods. If a class had two methods with the exact same name and parameter types the origin of a JavaCall was picked randomly from them. It now always picks the non-synthetic method (see #513)
  • Fix non-deterministic return value of JavaCodeUnit.getMethod(). In case of bridge methods there might be more than one method matching the exact same name and parameters. In these cases the result of getMethod() was random. It now always picks the non-synthetic method (see #256)
  • layeredArchitecture() will now allow to combine mayOnlyBeAccessedBy... and mayOnlyAccess.... Previously mayOnlyAccess... would forbid all incoming dependencies (see #739; thanks a lot to @​hankem)

Enhancements

Core

  • Members targeted by AccessTarget are now resolved like the Java Reflection API would do it. Previously AccessTarget.resolve() would return a set of matching members, the new replacement AccessTarget.resolveMember() returns an optional member making it a lot easier to handle (see #722)
  • JavaClass now knows its methodReferencesFromSelf (e.g. Object::toString) and constructorReferencesFromSelf (e.g. Object::new) (see #215; thanks a lot to @​KorSin)
  • ArchRules will now by default reject evaluating if the set passed to the should-clause is empty. This prevents implementation errors like picking a package in that()... that doesn't even exist and thus composing a rule that doesn't check anything (compare the user guide; see #774; thanks a lot @​oberprah)
  • The automatic import dependency resolution now resolves classes missing from the import that are only referenced
    • as class object (e.g. Foo.class)
    • in a throws clause (e.g. someMethod() throws FooException)
    • in an instanceof check (e.g. obj instanceof Foo)
    • as an array component type (e.g. Foo[] array;)
    • as an annotation parameter (e.g. @SomeAnnotation(type = Foo.class))
    • as part of a generic type signature (e.g. List<? extends Foo>)
    • Furthermore, the resolution behavior can now be tweaked to resolve deeper or not resolve at all. Thus, users can decide between resolving additional types and performance (compare the user guide; see #728)
  • New predefined ImportOption to exclude package-info.class files (see #793; thanks a lot to @​TomerFi)

Lang

  • Analogously to classes(), there now exists a method members()...should().containNumberOfElements(predicate) (see #179; thanks a lot to @​oberprah)

Library

  • PlantUmlArchCondition now rejects files that don't specify any components at all or are of an invalid format (see #735; thanks a lot to @​pfichtner)

JUnit

  • Tests can now be run if their classes are loaded by the context ClassLoader instead of the ArchUnit ClassLoader (see #781; thanks a lot to @​stuartwdouglas)
  • New method Class<?> FieldSource.getJavaClass() to retrieve the declaring class of the respective field (see #800; thanks a lot to @​famod)

Further Acknowledgement

  • thanks a lot to @​marknp for improving the Javadoc on ArchConditions (see #725)
  • thanks a lot to @​timtebeek for making the ArchUnit build work with JDK 17 (see #779)
Commits
  • 1e579c3 prepare release 0.23.0
  • 8f56568 allow releasing to Maven Central in release.sh
  • 1961f27 adjust expected POM files
  • 93a2f8a add news articles about past events
  • f7903d7 adjust expected JUnit Platform POM
  • 1a55203 adjust Asciidoctor plugin to new Gradle version
  • 5323977 Add javaClass to FieldSource #800
  • d9d1aec Add javaClass to FieldSource
  • df3a034 Add predefined ImportOption to exclude package-info.class files #794
  • 432589d add predefined ImportOption to exclude package-info.class files
  • Additional commits viewable in compare view

Updates archunit-junit5 from 0.22.0 to 0.23.0

Release notes

Sourced from archunit-junit5's releases.

ArchUnit 0.23.0

Breaking Changes

  • As mentioned in Enhancements/Core ArchRules will now by default reject evaluating if the set passed to the should-clause is empty. This will break existing rules that don't check any elements in their should-clause. You can restore the old behavior by setting the ArchUnit property archRule.failOnEmptyShould=false

Bug Fixes

  • Fix wrong origins of JavaCall in case of bridge methods. If a class had two methods with the exact same name and parameter types the origin of a JavaCall was picked randomly from them. It now always picks the non-synthetic method (see #513)
  • Fix non-deterministic return value of JavaCodeUnit.getMethod(). In case of bridge methods there might be more than one method matching the exact same name and parameters. In these cases the result of getMethod() was random. It now always picks the non-synthetic method (see #256)
  • layeredArchitecture() will now allow to combine mayOnlyBeAccessedBy... and mayOnlyAccess.... Previously mayOnlyAccess... would forbid all incoming dependencies (see #739; thanks a lot to @​hankem)

Enhancements

Core

  • Members targeted by AccessTarget are now resolved like the Java Reflection API would do it. Previously AccessTarget.resolve() would return a set of matching members, the new replacement AccessTarget.resolveMember() returns an optional member making it a lot easier to handle (see #722)
  • JavaClass now knows its methodReferencesFromSelf (e.g. Object::toString) and constructorReferencesFromSelf (e.g. Object::new) (see #215; thanks a lot to @​KorSin)
  • ArchRules will now by default reject evaluating if the set passed to the should-clause is empty. This prevents implementation errors like picking a package in that()... that doesn't even exist and thus composing a rule that doesn't check anything (compare the user guide; see #774; thanks a lot @​oberprah)
  • The automatic import dependency resolution now resolves classes missing from the import that are only referenced
    • as class object (e.g. Foo.class)
    • in a throws clause (e.g. someMethod() throws FooException)
    • in an instanceof check (e.g. obj instanceof Foo)
    • as an array component type (e.g. Foo[] array;)
    • as an annotation parameter (e.g. @SomeAnnotation(type = Foo.class))
    • as part of a generic type signature (e.g. List<? extends Foo>)
    • Furthermore, the resolution behavior can now be tweaked to resolve deeper or not resolve at all. Thus, users can decide between resolving additional types and performance (compare the user guide; see #728)
  • New predefined ImportOption to exclude package-info.class files (see #793; thanks a lot to @​TomerFi)

Lang

  • Analogously to classes(), there now exists a method members()...should().containNumberOfElements(predicate) (see #179; thanks a lot to @​oberprah)

Library

  • PlantUmlArchCondition now rejects files that don't specify any components at all or are of an invalid format (see #735; thanks a lot to @​pfichtner)

JUnit

  • Tests can now be run if their classes are loaded by the context ClassLoader instead of the ArchUnit ClassLoader (see #781; thanks a lot to @​stuartwdouglas)
  • New method Class<?> FieldSource.getJavaClass() to retrieve the declaring class of the respective field (see #800; thanks a lot to @​famod)

Further Acknowledgement

  • thanks a lot to @​marknp for improving the Javadoc on ArchConditions (see #725)
  • thanks a lot to @​timtebeek for making the ArchUnit build work with JDK 17 (see #779)
Commits
  • 1e579c3 prepare release 0.23.0
  • 8f56568 allow releasing to Maven Central in release.sh
  • 1961f27 adjust expected POM files
  • 93a2f8a add news articles about past events
  • f7903d7 adjust expected JUnit Platform POM
  • 1a55203 adjust Asciidoctor plugin to new Gradle version
  • 5323977 Add javaClass to FieldSource #800
  • d9d1aec Add javaClass to FieldSource
  • df3a034 Add predefined ImportOption to exclude package-info.class files #794
  • 432589d add predefined ImportOption to exclude package-info.class files
  • Additional commits viewable in compare view

Merge request reports

Loading