Skip to content
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

Fix PreferSafeLogger edge case that produced non-compiling code #1851

Merged
merged 2 commits into from
Jul 23, 2021

Conversation

carterkozak
Copy link
Contributor

In most cases we wouldn't go this far to ensure green builds, these
are easy enough to manually update. However, it's important that
automation can roll out the new facade without blocking for devs
to make changes, and we can follow-up with a strict check later
on to migrate the rest.

==COMMIT_MSG==
Fix PreferSafeLogger edge case that produced suggested fixes that didn't compile without human interaction.
==COMMIT_MSG==

In most cases we wouldn't go this far to ensure green builds, these
are easy enough to manually update. However, it's important that
automation can roll out the new facade without blocking for devs
to make changes, and we can follow-up with a strict check later
on to migrate the rest.
@changelog-app
Copy link

changelog-app bot commented Jul 23, 2021

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Fix PreferSafeLogger edge case that produced suggested fixes that didn't compile without human interaction.

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from fawind July 23, 2021 18:54
"class Test {",
" private static final Logger log = LoggerFactory.getLogger(Test.class);",
" void action() {",
" log.info(\"foo\", SafeArg.of(\"name\", log.getName()));",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously the log.getName() method invocation hid in the shadow of the parent log.info node, so the recommended fix wouldn't compile.

@bulldozer-bot bulldozer-bot bot merged commit 2ea1274 into develop Jul 23, 2021
@bulldozer-bot bulldozer-bot bot deleted the ckozak/PreferSafeLogger_metavalidation branch July 23, 2021 20:35
@svc-autorelease
Copy link
Collaborator

Released 4.7.0

bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request Jul 24, 2021
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-baseline-oss check.

# Release Notes
## 4.7.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Fix | Fix PreferSafeLogger edge case that produced suggested fixes that didn't compile without human interaction. | palantir/gradle-baseline#1851 |



To enable or disable this check, please contact the maintainers of Excavator.
This was referenced Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants