TopicReceiver double cast FIX
This commit is contained in:
parent
2087d5e64d
commit
53fad7846b
@ -122,7 +122,11 @@ public class TopicReceiver {
|
||||
}
|
||||
|
||||
private static Optional<Double> queryValue(final Object valueRaw) {
|
||||
if (valueRaw instanceof final Number n) {
|
||||
if (valueRaw instanceof final Double n) {
|
||||
return Optional.of(n);
|
||||
} else if (valueRaw instanceof final Integer n) {
|
||||
return Optional.of((double) n);
|
||||
} else if (valueRaw instanceof final Long n) {
|
||||
return Optional.of((double) n);
|
||||
} else if (valueRaw instanceof final Boolean b) {
|
||||
return Optional.of(b ? 1.0 : 0.0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user