-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dependencies #1211
Update dependencies #1211
Conversation
@@ -117,7 +117,7 @@ public void inner_classes_should_not_be_instantiated_from_constructor_of_enclosi | |||
new DescribedPredicate<JavaConstructorCall>( | |||
"an inner class is instantiated in a constructor of the enclosing class") { | |||
@Override | |||
public boolean apply(JavaConstructorCall input) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from https://github.com/TNG/ArchUnit/releases/tag/v1.0.0-rc1:
DescribedPredicate
now extends the JDK 8 Predicate, soapply(..)
has to be replaced bytest(..)
I think it only required change to get it working. However, all the changes and features may be worth reviewing and possibly applied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially relevant changes:
Accesses from inside of lambdas are now correctly detected. Before, the origin was set as a synthetic method like lambda$xxx$123 instead. JavaAccess can now be queried for isDeclaredInLambda() to distinguish this from an access outside of a lambda (see TNG/ArchUnit#847; thanks a lot to @oberprah, @FrederikFinckh)
New methods codeUnits().should().onlyBeCalled().by{Classes/Methods/...}That(..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened #1212
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accesses from inside of lambdas are now correctly detected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i got it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somehow it lambdas pass this check:
if (method.getName().startsWith("access$") || method.getName().startsWith("lambda$")) {
return;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but we can now use:
if (call.isDeclaredInLambda()) {
// ignore
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be fixed within #1212
|
5e3440e
to
01c15e8
Compare
01c15e8
to
b5a6ca8
Compare
No description provided.