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(logging): fix null object reference without logging configured #70

Merged
merged 6 commits into from
May 13, 2024

Conversation

hamzamahmood
Copy link
Collaborator

@hamzamahmood hamzamahmood commented May 13, 2024

What

This PR adds the creation of SdkLogger with the help of a factory, which ensures that the NullSdkLogger is returned in the logger implmenetation is null.

Closes #69

Why

To avoid null be passed as logger instance crashing the sdk.

Type of change

Select multiple if applicable.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause a breaking change)
  • Tests (adds or updates tests)
  • Documentation (adds or updates documentation)
  • Refactor (style improvements, performance improvements, code refactoring)
  • Revert (reverts a commit)
  • CI/Build (adds or updates a script, change in external dependencies)

Testing

List the steps that were taken to test the changes

Checklist

  • My code follows the coding conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added new unit tests

@hamzamahmood hamzamahmood self-assigned this May 13, 2024
@hamzamahmood hamzamahmood added the bug Something isn't working label May 13, 2024
@hamzamahmood hamzamahmood requested a review from asadali214 May 13, 2024 08:05
Shield-Jaguar
Shield-Jaguar previously approved these changes May 13, 2024
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Collaborator

@asadali214 asadali214 left a comment

Choose a reason for hiding this comment

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

LGTM

@hamzamahmood hamzamahmood merged commit 54b06c1 into main May 13, 2024
13 checks passed
@asadali214 asadali214 deleted the 69-fix-null-exception-without-logging branch July 4, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Null object reference exception is being thrown without logging configuration
3 participants