Skip to content

Fixing an issue where no RequestDeviceList() would throw a NPE#175

Merged
qdot merged 1 commit intobuttplugio:masterfrom
blackspherefollower:master
Jul 11, 2017
Merged

Fixing an issue where no RequestDeviceList() would throw a NPE#175
qdot merged 1 commit intobuttplugio:masterfrom
blackspherefollower:master

Conversation

@blackspherefollower
Copy link
Copy Markdown
Contributor

If the server has no devices, the device list within the deserialized message
will be set to null rather than an empty list. Checking for null avoids the NPE.

If the server has no devices, the device list within the deserialized message
will be set to null rather than an empty list. Checking for null avoids the NPE.
@blackspherefollower blackspherefollower added bug Something is broken library Issues that span all parts of the library (usually code style related) labels Jul 11, 2017
@blackspherefollower blackspherefollower requested a review from qdot July 11, 2017 17:28
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 11, 2017

Codecov Report

Merging #175 into master will increase coverage by 0.27%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #175      +/-   ##
==========================================
+ Coverage   50.11%   50.38%   +0.27%     
==========================================
  Files          65       65              
  Lines        2580     2584       +4     
  Branches      207      208       +1     
==========================================
+ Hits         1293     1302       +9     
+ Misses       1209     1203       -6     
- Partials       78       79       +1
Impacted Files Coverage Δ
Buttplug.Client.Test/ButtPlugClientTests.cs 100% <100%> (ø) ⬆️
Buttplug.Client/ButtplugWSClient.cs 50.22% <66.66%> (+1.61%) ⬆️
...lug.Components.Controls/ButtplugTabControl.xaml.cs 31.49% <0%> (+2.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd71d46...ac8d1a7. Read the comment docs.

Copy link
Copy Markdown
Member

@qdot qdot left a comment

Choose a reason for hiding this comment

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

Honestly, deviceList.Devices should never be null, it should be an empty list. However, to get things up and running I'll approve this for now, and will file a followup.

@qdot qdot merged commit 7b360a8 into buttplugio:master Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken library Issues that span all parts of the library (usually code style related)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants