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

fix: Initialize DeviceService.Properties with an empty map #1657

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

FelixTing
Copy link
Member

Initialize DeviceService.Properties with an empty map to avoid unintended access to a nil map
fix: #1656

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/device-sdk-go/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?) currently not used in sdk
  • I have opened a PR for the related docs change (if not, why?)

Initialize DeviceService.Properties with an empty map to avoid unintended access to a nil map

Signed-off-by: FelixTing <felix@iotechsys.com>
@FelixTing FelixTing requested a review from cloudxxx8 December 9, 2024 09:27
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 32.78%. Comparing base (21de6ff) to head (89b0421).

Files with missing lines Patch % Lines
pkg/service/service.go 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1657      +/-   ##
==========================================
- Coverage   32.79%   32.78%   -0.01%     
==========================================
  Files          48       48              
  Lines        4763     4764       +1     
==========================================
  Hits         1562     1562              
- Misses       3063     3064       +1     
  Partials      138      138              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

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

LGTM

@cloudxxx8 cloudxxx8 merged commit 2e7478b into edgexfoundry:main Dec 9, 2024
3 checks passed
@FelixTing FelixTing deleted the issue-1656 branch December 11, 2024 01:39
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.

Initialize DeviceService.Properties with an empty map
3 participants