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

Don't send null values #96

Merged
merged 9 commits into from
Jan 18, 2016
Merged

Don't send null values #96

merged 9 commits into from
Jan 18, 2016

Conversation

d4rken
Copy link
Contributor

@d4rken d4rken commented Jan 6, 2016

Overall goal: Don't write null values into the output stream. See #86
To help with that most methods that produce output for the stream have been made static and self contained. The helper methods and parameters (where applicable) have been annotated to indicate whether the value can be null using Androids annotation library.
Fields holding generated data have also been made final (was suggested by LINT checks).

Android Studio also seems to have corrected some javadoc formatting which was not intended, but oh well...

This also includes the same fixes as PR #92

…working and just working of a context object.

We also don't need to reference the context object permanently.
* Added android support annotations library.
* Sprinkled @nonnull and @nullable across various classes where useful to leverage the inspection telling us where a value could be null.
* Refactored helper methods to be more self-contained, meaning static and only context dependent.
* Overwrote all values methods from JsonWriter in JsonStream, to have the @nonnull annotation but also fallback to nullValue() if necessary.
Conflicts:
	.travis.yml
	src/main/java/com/bugsnag/android/DeviceState.java
@d4rken
Copy link
Contributor Author

d4rken commented Jan 8, 2016

Doesn't look like a code issue:

* What went wrong:

Execution failed for task ':connectedDebugAndroidTest'.

> com.android.builder.testing.api.TestException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.ShellCommandUnresponsiveException

* error.setSeverity(Severity.INFO);
* return true;
* }
* })
Copy link
Contributor

Choose a reason for hiding this comment

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

This formatting probably needs corrected to the original version. Maybe Android Studio would like a <code> block better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Multi-line code snippets in Javadoc should use:

<pre>{@code
blah blah
}</pre>

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, that's what I was looking for. Thanks, @JakeWharton. 👍

@kattrali
Copy link
Contributor

kattrali commented Jan 8, 2016

The changes look good. I got a bit bogged down with the unrelated changes, but looked over everything. :) Next up is doing more integrated testing, just for sanity checks. Thanks for putting work into this, @d4rken.

kattrali added a commit that referenced this pull request Jan 11, 2016
Don't send null values
@kattrali kattrali merged commit 4fa0ef4 into bugsnag:master Jan 18, 2016
@d4rken d4rken deleted the pr-defaultvalues branch January 19, 2016 19:33
kattrali added a commit to bugsnag/bugsnag-unity that referenced this pull request Apr 15, 2016
Android Changelog
====

## 3.4.0 (2016-03-09)

### Enhancements

- Limit the number of stored errors
  [Duncan Hewett](https://github.com/duncanhewett)
  [#97](bugsnag/bugsnag-android#97)

### Bug Fixes

- Fix `ConcurrentModificationException` which could occur when saving
  breadcrumbs
  [Duncan Hewett](https://github.com/duncanhewett)
  [#98](bugsnag/bugsnag-android#98)

- Localize all numbers in error metrics
  [Delisa Mason](https://github.com/kattrali)
  [#100](bugsnag/bugsnag-android#100)

3.3.0 (2016-01-18)
-----

### Enhancements

- Change distribution method to be .aar only
  [Lars Grefer](https://github.com/larsgrefer)
  [#91](bugsnag/bugsnag-android#91)

- Skip sending empty device data values
  [Matthias Urhahn](https://github.com/d4rken)
  [#96](bugsnag/bugsnag-android#96)

- Remove the need for synthetic methods
  [Jake Wharton](https://github.com/JakeWharton)
  [#87](bugsnag/bugsnag-android#87)

3.2.7 (2015-12-10)
-----

### Enhancements

- Add additional check to ensure the cache of uploaded errors are deleted
  [#80](bugsnag/bugsnag-android#80)

### Bug Fixes

- Fix exception which occurs when `appContext.getResources()` is null
  [#78](bugsnag/bugsnag-android#78)

- Fix bug preventing `maxBreadcrumbs` from being set
  [David Wu](https://github.com/wuman)
  [#70](bugsnag/bugsnag-android#70)

3.2.6
-----
-   Add blocking API
-   Fix NPE issue
-   Concurrent adding to tabs
-   Thread Safe DateUtils#toISO8601
lemnik pushed a commit that referenced this pull request Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants