You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are sure that within the extension, both the configuration and the source cannot be null. Consequently, there is no need to test if they are null within each extension.
Example - Check Source
The following check is not necessary within the WmiSourceProcessor since the call to this processor is only made after checking that Source instanceof WmiSource, which ensures that Source is not null.
if (wmiSource == null) {
log.warn("Hostname {} - Malformed WMI source {}. Returning an empty table.", hostname, wmiSource);
returnSourceTable.empty();
}
Example - Check Configuration
This check is not relevant as we already know that the configuration cannot be null.
if (winConfiguration == null) {
log.warn(
"Hostname {} - The Windows protocol credentials are not configured. Cannot process Windows IPMI source.",
telemetryManager.getHostname()
);
returnSourceTable.empty();
}
This kind of checks needs to be removed from all the extensions and the source and criterion processors. Unit tests that fail after the refactoring need to be fixed as well.
Milestone
HTTP
IPMI
OsCommand
SNMP
SNMPv3
Wbem
WMI
WinRm
The text was updated successfully, but these errors were encountered:
Specification
Since the ExtensionManager is responsible of finding an extension that matches the configuration and the sources as follows:
We are sure that within the extension, both the configuration and the source cannot be null. Consequently, there is no need to test if they are null within each extension.
Example - Check Source
The following check is not necessary within the
WmiSourceProcessor
since the call to this processor is only made after checking thatSource instanceof WmiSource
, which ensures thatSource
is not null.Example - Check Configuration
This check is not relevant as we already know that the configuration cannot be null.
This kind of checks needs to be removed from all the extensions and the source and criterion processors. Unit tests that fail after the refactoring need to be fixed as well.
Milestone
The text was updated successfully, but these errors were encountered: