Skip to content

Fix: NPE in config api companion object#317

Merged
twisti-dev merged 2 commits intoversion/26.1from
fix/npe-in-config-api-companion
Apr 20, 2026
Merged

Fix: NPE in config api companion object#317
twisti-dev merged 2 commits intoversion/26.1from
fix/npe-in-config-api-companion

Conversation

@twisti-dev
Copy link
Copy Markdown
Contributor

This pull request contains a minor version update and a small improvement to how the surfConfigApi singleton is initialized. The changes are straightforward and focus on improving initialization safety and updating the project version.

  • Versioning:

    • Bumped the project version from 3.2.2 to 3.2.3 in gradle.properties.
  • Initialization improvement:

    • Changed the initialization of surfConfigApi to use Kotlin's by lazy delegate, ensuring it is only created when first accessed, in SurfConfigApi.kt.

@twisti-dev twisti-dev self-assigned this Apr 20, 2026
Copilot AI review requested due to automatic review settings April 20, 2026 15:37
@twisti-dev twisti-dev merged commit cdc7828 into version/26.1 Apr 20, 2026
4 of 5 checks passed
@twisti-dev twisti-dev deleted the fix/npe-in-config-api-companion branch April 20, 2026 15:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR bumps the project version and adjusts how the SurfConfigApi singleton is obtained to reduce eager initialization risk.

Changes:

  • Bumped project version from 3.2.2 to 3.2.3.
  • Changed surfConfigApi initialization to use Kotlin by lazy (defers requiredService() until first access).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
surf-api-core/surf-api-core/src/main/kotlin/dev/slne/surf/api/core/config/SurfConfigApi.kt Defers SurfConfigApi service lookup using lazy to reduce eager/static initialization issues.
gradle.properties Increments project version to 3.2.3.

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