-
Notifications
You must be signed in to change notification settings - Fork 896
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
Migrate from spotbugs to errorprone #3122
Conversation
@@ -102,7 +102,7 @@ public static void onEnter( | |||
} | |||
|
|||
// Assume already instrumented event if traceId is present. | |||
if (!mdc.contains(TRACE_ID)) { | |||
if (!mdc.containsValue(TRACE_ID)) { |
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.
Ouch, that's a bug - it should've been containsKey()
right from the start
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.
Error prone to the rescue!
|
||
} catch (Exception e) { | ||
log.debug("Instrumentation error in tracing consumer", e); | ||
try { |
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.
Nit: we can use try-with-resources here
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.
done (so I can merge this before #3118)
// TODO this is very unusual code structure for this repo | ||
// We have to review 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.
👍
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.
Consistent with SDK
❤️
And great clean-ups 👍
* Migrate from spotbugs to errorprone * Fix hashtable * try-with-resources * Fix from merge Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Consistent with SDK, prints errors to console instead of file, and easier to SuppressWarnings