You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package com.example.package2;
public final class MessageConstant {
public static final String REQUEST_ID_PROPERTY = "request_id";
private MessageConstant() {}
}
The rule doesn't fail. Is it a bug or did I misunderstand how the dependOnClassesThat() should work? When I debug the rule, I found dependOnClassesThat condition evaluation doesn't return MessageConstant class as a target.
Thanks,
The text was updated successfully, but these errors were encountered:
A String constant is actually no runtime (but only a compile-time) dependency; its value is copied into the constant pool of the using class, cf. #298 (comment). This is why ArchUnit currently doesn't detect it as a dependency.
Hi,
We are using archunit-junit5:0.17.0. In our test, we have a rule as below.
In package1, we have a controller reference to a constant defined in a constant class in package2. See below.
In package2, we define the constant class.
The rule doesn't fail. Is it a bug or did I misunderstand how the dependOnClassesThat() should work? When I debug the rule, I found dependOnClassesThat condition evaluation doesn't return MessageConstant class as a target.
Thanks,
The text was updated successfully, but these errors were encountered: