usdot-fhwa-stol / cdasim

CDASim is an open-source simulation system supporting the development and testing of Cooperative Driving Automation applications.
38 stars 13 forks source link

initialize sensors list #166

Closed saina-ramyar closed 11 months ago

saina-ramyar commented 11 months ago

PR Details

Description

Sensor list is initialized as an empty array so an exception is not thrown if there is no sensor configuration.

Related Issue

CDAR-427

Motivation and Context

If a sensor configuration file is not available, registration throws a NullPointerException exception causing CDASim to crash. This is not the desired behavior, since there may be times when a sensor config does not exist.

The solution is to initialize the sensors list as an empty list.

How Has This Been Tested?

local integration tested

Types of changes

Checklist:

sonarcloud[bot] commented 11 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. Read more here