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

initialize sensors list #166

Merged
merged 1 commit into from
Oct 23, 2023
Merged

initialize sensors list #166

merged 1 commit into from
Oct 23, 2023

Conversation

saina-ramyar
Copy link
Contributor

@saina-ramyar saina-ramyar commented Oct 23, 2023

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

  • Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
    CARMA Contributing Guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@sonarcloud
Copy link

sonarcloud bot commented Oct 23, 2023

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

@paulbourelly999 paulbourelly999 merged commit 92fc8fe into develop Oct 23, 2023
6 checks passed
@paulbourelly999 paulbourelly999 deleted the fix/sensors_initialize branch October 23, 2023 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants