| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Skip only Sentry Logs conversion when a valid JUL record has no message, allowing its event and breadcrumb capture paths to continue. Co-Authored-By: Claude <noreply@anthropic.com>
|
|
||
| final @NotNull String formattedMessage = maybeFormatted(arguments, message); | ||
|
|
||
| if (!formattedMessage.equals(message)) { |
There was a problem hiding this comment.
This would be causing a NullPointerException. This PR fixes that.
Sorry, something went wrong.
📲 Install BuildsAndroid
|
Sorry, something went wrong.
Performance metrics 🚀
|
Sorry, something went wrong.
|
|
||
| String message = record.getMessage(); | ||
| if (record.getResourceBundle() != null | ||
| && record.getResourceBundle().containsKey(record.getMessage())) { |
There was a problem hiding this comment.
record.getResourceBundle().containsKey(record.getMessage() would NPE if record.getMessage() returns null.
Happens if the record has a ResourceBundle and a null message
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Stack (Logs and Metrics Enable Flags)
📜 Description
Skips Sentry Logs conversion when a valid JUL LogRecord has a null message. Event and breadcrumb processing continues normally, while no invalid Sentry Log item is created.
💡 Motivation and Context
JUL permits null messages. When Sentry Logs forwarding was enabled, captureLog dereferenced the null formatted message before the established event and breadcrumb branches ran. The enclosing error handler then aborted processing, dropping an otherwise valid event or breadcrumb.
The issue is specific to JUL's nullable LogRecord path. Logcat and Timber already handle nullable bodies explicitly, Logback does not dereference its nullable formatted message in this path, and standard Log4j2 message implementations provide a formatted string.
💚 How did you test it?
📝 Checklist
🔮 Next steps
None.
#skip-changelog