dependabot maven(deps-dev): bump archunit.version from 0.22.0 to 0.23.0
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
ArchRuleswill now by default reject evaluating if the set passed to theshould-clause is empty. This will break existing rules that don't check any elements in theirshould-clause. You can restore the old behavior by setting the ArchUnit propertyarchRule.failOnEmptyShould=falseBug Fixes
- Fix wrong origins of
JavaCallin case of bridge methods. If a class had two methods with the exact same name and parameter types theoriginof aJavaCallwas 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 ofgetMethod()was random. It now always picks the non-synthetic method (see #256)layeredArchitecture()will now allow to combinemayOnlyBeAccessedBy...andmayOnlyAccess.... PreviouslymayOnlyAccess...would forbid all incoming dependencies (see #739; thanks a lot to@hankem)Enhancements
Core
- Members targeted by
AccessTargetare now resolved like the Java Reflection API would do it. PreviouslyAccessTarget.resolve()would return a set of matching members, the new replacementAccessTarget.resolveMember()returns an optional member making it a lot easier to handle (see #722)JavaClassnow knows itsmethodReferencesFromSelf(e.g.Object::toString) andconstructorReferencesFromSelf(e.g.Object::new) (see #215; thanks a lot to@KorSin)ArchRuleswill now by default reject evaluating if the set passed to theshould-clause is empty. This prevents implementation errors like picking a package inthat()...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
ImportOptionto excludepackage-info.classfiles (see #793; thanks a lot to@TomerFi)Lang
- Analogously to
classes(), there now exists a methodmembers()...should().containNumberOfElements(predicate)(see #179; thanks a lot to@oberprah)Library
PlantUmlArchConditionnow 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
ClassLoaderinstead of the ArchUnitClassLoader(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
@marknpfor improving the Javadoc onArchConditions(see #725)- thanks a lot to
@timtebeekfor making the ArchUnit build work with JDK 17 (see #779)
Commits
-
1e579c3prepare release 0.23.0 -
8f56568allow releasing to Maven Central inrelease.sh -
1961f27adjust expected POM files -
93a2f8aadd news articles about past events -
f7903d7adjust expected JUnit Platform POM -
1a55203adjust Asciidoctor plugin to new Gradle version -
5323977Add javaClass to FieldSource #800 -
d9d1aecAddjavaClasstoFieldSource -
df3a034Add predefined ImportOption to exclude package-info.class files #794 -
432589dadd predefinedImportOptionto excludepackage-info.classfiles - 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
ArchRuleswill now by default reject evaluating if the set passed to theshould-clause is empty. This will break existing rules that don't check any elements in theirshould-clause. You can restore the old behavior by setting the ArchUnit propertyarchRule.failOnEmptyShould=falseBug Fixes
- Fix wrong origins of
JavaCallin case of bridge methods. If a class had two methods with the exact same name and parameter types theoriginof aJavaCallwas 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 ofgetMethod()was random. It now always picks the non-synthetic method (see #256)layeredArchitecture()will now allow to combinemayOnlyBeAccessedBy...andmayOnlyAccess.... PreviouslymayOnlyAccess...would forbid all incoming dependencies (see #739; thanks a lot to@hankem)Enhancements
Core
- Members targeted by
AccessTargetare now resolved like the Java Reflection API would do it. PreviouslyAccessTarget.resolve()would return a set of matching members, the new replacementAccessTarget.resolveMember()returns an optional member making it a lot easier to handle (see #722)JavaClassnow knows itsmethodReferencesFromSelf(e.g.Object::toString) andconstructorReferencesFromSelf(e.g.Object::new) (see #215; thanks a lot to@KorSin)ArchRuleswill now by default reject evaluating if the set passed to theshould-clause is empty. This prevents implementation errors like picking a package inthat()...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
ImportOptionto excludepackage-info.classfiles (see #793; thanks a lot to@TomerFi)Lang
- Analogously to
classes(), there now exists a methodmembers()...should().containNumberOfElements(predicate)(see #179; thanks a lot to@oberprah)Library
PlantUmlArchConditionnow 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
ClassLoaderinstead of the ArchUnitClassLoader(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
@marknpfor improving the Javadoc onArchConditions(see #725)- thanks a lot to
@timtebeekfor making the ArchUnit build work with JDK 17 (see #779)
Commits
-
1e579c3prepare release 0.23.0 -
8f56568allow releasing to Maven Central inrelease.sh -
1961f27adjust expected POM files -
93a2f8aadd news articles about past events -
f7903d7adjust expected JUnit Platform POM -
1a55203adjust Asciidoctor plugin to new Gradle version -
5323977Add javaClass to FieldSource #800 -
d9d1aecAddjavaClasstoFieldSource -
df3a034Add predefined ImportOption to exclude package-info.class files #794 -
432589dadd predefinedImportOptionto excludepackage-info.classfiles - Additional commits viewable in compare view