Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backend] Fix on NPE in case of data being null #1859

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ public TaniumExecutorService(
public void run() {
log.info("Running Tanium executor endpoints gathering...");
List<NodeEndpoint> nodeEndpoints =
this.client.endpoints().getData().getEndpoints().getEdges().stream().toList();
this.client.endpoints().getData() != null
? this.client.endpoints().getData().getEndpoints().getEdges().stream().toList()
: new ArrayList<>();
Comment on lines +103 to +105
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we maybe want to log the error : it can help us detect a problem witth the Tanium excecutor

List<Endpoint> endpoints = toEndpoint(nodeEndpoints).stream().filter(Asset::getActive).toList();
log.info("Tanium executor provisioning based on " + endpoints.size() + " assets");
endpoints.forEach(
Expand Down