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

Avoid logging an error when a float is passed in the manifest #4031

Merged
merged 5 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- Avoid logging an error when a float is passed in the manifest ([#4031](https://github.com/getsentry/sentry-java/pull/4031))

## 8.0.0

### Summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,10 @@ private static boolean readBool(
private static @NotNull Double readDouble(
final @NotNull Bundle metadata, final @NotNull ILogger logger, final @NotNull String key) {
// manifest meta-data only reads float
final Double value = ((Number) metadata.getFloat(key, metadata.getInt(key, -1))).doubleValue();
double value = ((Float) metadata.getFloat(key, -1)).doubleValue();
if (value == -1) {
value = ((Integer) metadata.getInt(key, -1)).doubleValue();
}
logger.log(SentryLevel.DEBUG, key + " read: " + value);
return value;
}
Expand Down
Loading