-
Notifications
You must be signed in to change notification settings - Fork 134
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
safe-logging analysis correctly handles out-of-scope parameter references #2988
Conversation
// JCBindingPattern is newer than our compilation target, so we match strings to avoid | ||
// complex build-system configurations. | ||
String kindString = enclosing.getKind().name(); | ||
return "BINDING_PATTERN".equals(kindString); |
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.
not sure why I originally checked for an enclosing binding pattern instead of the binding variable type before, most likely searching in the dark based on older jdk-11 sources
Looks like this would catch some log safety issues in my repo. Looking forward to having this additional protection land! |
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.
Thanks!
Released 6.9.0 |
Reported in #2984
==COMMIT_MSG==
safe-logging analysis correctly handles out-of-scope parameter references
==COMMIT_MSG==
Note that this has also been updated to improve the
isPatternBinding
check using java 17 target compatibility now that we've upgraded.This should dramatically improve performance in areas which reference parameters in lambdas as well, as we can avoid an additional set of compilations :-)