Skip to content

Use nulls instead of sentinels.#7886

Merged
copybara-service[bot] merged 1 commit intomasterfrom
test_784673096
Jul 25, 2025
Merged

Use nulls instead of sentinels.#7886
copybara-service[bot] merged 1 commit intomasterfrom
test_784673096

Conversation

@copybara-service
Copy link
Copy Markdown
Contributor

@copybara-service copybara-service bot commented Jul 21, 2025

Use nulls instead of sentinels.

Motivation:

  • (the real motivation) Eliminate reference cycles. Reference cycles can cause trouble for J2ObjC. Our cycle tests don't actually detect any problems here, but my understanding is that they aren't intended to catch everything.
  • Avoid "cheating" in how we annotate for nullness. (On the topic of nullness: It's of course reasonable to worry about how this CL uses null more. But we've had nullness checking in place for years here, and I saw good results from IntelliJ and our build-time checking.)
  • Overall, simplify the code.
  • Save the tiniest bit of memory :)

RELNOTES=n/a

@copybara-service copybara-service bot force-pushed the test_784673096 branch 2 times, most recently from da43c58 to 5b8182b Compare July 25, 2025 13:48
Motivation:

- (the real motivation) Eliminate reference cycles. Reference cycles can cause trouble for J2ObjC. Our cycle tests don't actually detect any problems here, but my understanding is that they aren't intended to catch _everything_.
- Avoid "cheating" in how we annotate for nullness. (On the topic of nullness: It's of course reasonable to worry about how this CL uses `null` more. But we've had nullness checking in place for years here, and I saw good results from IntelliJ and our build-time checking.)
- Overall, simplify the code.
- Save the tiniest bit of memory :)

RELNOTES=n/a
PiperOrigin-RevId: 787098790
@copybara-service copybara-service bot merged commit b085270 into master Jul 25, 2025
@copybara-service copybara-service bot deleted the test_784673096 branch July 25, 2025 14:12
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