Skip to content

Commit

Permalink
Merge 4d7e996 into 926429a
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanosiano authored Jan 22, 2025
2 parents 926429a + 4d7e996 commit 9e5d3c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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

0 comments on commit 9e5d3c8

Please sign in to comment.