Created
January 31, 2016 17:45
-
-
Save gvsmirnov/0270f0f15f9498e3b655 to your computer and use it in GitHub Desktop.
Boxing Fixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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