Skip to content

feat: enforce null-safety at compile time - #272

Open
nscuro wants to merge 1 commit into
package-url:masterfrom
nscuro:nullaway
Open

feat: enforce null-safety at compile time#272
nscuro wants to merge 1 commit into
package-url:masterfrom
nscuro:nullaway

Conversation

@nscuro

@nscuro nscuro commented Aug 13, 2026

Copy link
Copy Markdown

Adds NullAway to enforce null-safety (which is already declared using JSpecify) at compile time.

Had to replace a few StringUtil#isEmpty calls with inlined versions to allow NullAway to "see" the null-check.

Note that NullAway is only enabled for production code, and explicitly disabled for test code. This is because you usually want to violate null-safety in tests.

@nscuro nscuro changed the title Enforce null-safety at compile time feat: enforce null-safety at compile time Aug 13, 2026
Adds NullAway to enforce null-safety (which is already declared using JSpecify) at compile time.

Had to replace a few `StringUtil#isEmpty` calls with inlined versions to allow NullAway to "see" the null-check.

Note that NullAway is only enabled for production code, and explicitly disabled for test code. This is because you usually want to violate null-safety in tests.

Signed-off-by: nscuro <nscuro@protonmail.com>
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.

1 participant