ArchUnit
ArchUnit copied to clipboard
A Java architecture test library, to specify and assert architecture rules in plain Java
Extracted this issue from PR #427, see also the discussion on that PR... The ArchUnit build `gradlew build` fails currently on my Windows machine: ``` Execution failed for task ':archunit:spotlessJavaCheck'....
Reference: https://stackoverflow.com/questions/70507647/how-to-assert-hashmap-keys-to-be-comparable-with-archunit/70509141 VU#903934 (Hash table implementations vulnerable to algorithmic complexity attacks) Fix with JEP180 in Java8: if too many hash codes map to the same bucket in the map, the...
During https://stackoverflow.com/questions/70507647/how-to-assert-hashmap-keys-to-be-comparable-with-archunit/70509141 we needed a way to analyze local variables. Hence, I propose to extend JavaCodeUnit https://www.archunit.org/userguide/html/000_Index.html#_domain to also support local variable **definition**, **declaration** and **initialization**.
Exception in thread "main" java.lang.IllegalStateException: Never found a JavaCodeUnit that matches supposed caller CodeUnit{name='zze', descriptor=(Ljava/lang/Iterable;)Lcom/google/android/gms/internal/firebase-perf/zzdn$zzb;, declaringClassName='com.google.android.gms.internal.firebase_perf.zzdn$zzb'} at com.tngtech.archunit.core.importer.AccessRecord$Factory.getCaller(AccessRecord.java:273) at com.tngtech.archunit.core.importer.AccessRecord$Factory.access$400(AccessRecord.java:61) at com.tngtech.archunit.core.importer.AccessRecord$Factory$4.get(AccessRecord.java:262) at com.tngtech.archunit.core.importer.AccessRecord$Factory$4.get(AccessRecord.java:259) at com.tngtech.archunit.thirdparty.com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:167) at com.tngtech.archunit.core.importer.AccessRecord$Factory$RawFieldAccessRecordProcessed.getCaller(AccessRecord.java:222) at com.tngtech.archunit.core.importer.ClassGraphCreator.tryProcess(ClassGraphCreator.java:206)...
crash log as follow: Exception in thread "main" java.lang.IllegalStateException: Never found a JavaCodeUnit that matches supposed caller CodeUnit{name='a', descriptor=(Z)V, declaringClassName='a.o.a.b$a'} at com.tngtech.archunit.core.importer.AccessRecord$Factory.getCaller(AccessRecord.java:273) at com.tngtech.archunit.core.importer.AccessRecord$Factory.access$400(AccessRecord.java:61) at com.tngtech.archunit.core.importer.AccessRecord$Factory$4.get(AccessRecord.java:262) at com.tngtech.archunit.core.importer.AccessRecord$Factory$4.get(AccessRecord.java:259) at com.tngtech.archunit.thirdparty.com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:167)...
Hi at all, first: archunit is Great and this issue is just my way to find a way to improve it for further usages! When trying to create a custom...
Hi at all, first: archunit is really great and I am on the way to integrate it in our projects! Unfortunately I see a lot of breaks in our existing...
@clojj I took the liberty of creating a new issue for this, since I don't think it matches the other issue title very well Hi, I am using ArchUnit with...
Current behaviour: When there are less-than-frozen violations, FreezingArchRule tries to save the shortened violation list (which undoubtedly basically is a good idea), but when feeze.store.allowStoreUpdate is set to false, this...
At the moment this issue is waiting for input from https://youtrack.jetbrains.com/issue/IDEA-231923 It is not completely clear to me at the moment how to write a plugin that could provide custom...