etzel-mes commented on code in PR #27908:
URL: https://github.com/apache/camel/pull/27908#discussion_r4285376491
##########
components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConsumer.java:
##########
@@ -131,6 +132,19 @@ private void handleValueUpdate(final String node, final
DataValue value) {
}
}
+ /**
+ * A null value with a Good status is the initial value at startup, which
omitNullValues hides. A null value with a
+ * Bad or Uncertain status carries the quality of the node and is
delivered.
+ */
+ private static boolean isNullValueWithGoodStatus(final DataValue value) {
+ if (value == null) {
+ return true;
+ }
+ final boolean nullValue = value.getValue() == null ||
value.getValue().getValue() == null;
+ final StatusCode status = value.getStatusCode();
+ return nullValue && (status == null || status.isGood());
Review Comment:
Verified against Milo 1.1.8: `DataValue.getValue()` and `getStatusCode()`
carry no `@Nullable`, only `Variant.getValue()` does. Removed the dead checks
instead of commenting them (891bf761242); module `-Psourcecheck verify` 56/0/1
skipped.
_Claude Code on behalf of etzel-mes_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]