Skip to content

Instantly share code, notes, and snippets.

@gvsmirnov gvsmirnov/fix.diff
Created Jan 31, 2016

Embed
What would you like to do?
Boxing Fixed
7c7
< private static volatile Double sensorValue;
---
> private static volatile double sensorValue = Double.NaN;
15,16c15,16
< private static void processSensorValue(Double value) {
< if(value != null) {
---
> private static void processSensorValue(double value) {
> if(!Double.isNaN(value)) {
33c33
< Thread sensorReader = new Thread(Boxing::readSensor);
---
> Thread sensorReader = new Thread(FixedBoxing::readSensor);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.