He-Pin opened a new pull request, #3380:
URL: https://github.com/apache/pekko/pull/3380

   ### Motivation
   
   Extend jspecify coverage to remaining Java DSL modules (#2563), following 
the pattern established in streams (#2617) and persistence (#2850). JSpecify 
annotations help Java consumers understand null-safety contracts at compile 
time.
   
   ### Modification
   
   - Add `@NullMarked` package-info.java for `actor-typed`, 
`cluster-sharding-typed`, and `testkit` javadsl packages
   - Add `@Nullable` to `Behaviors.withMdc` `staticMdc` and `mdcForMessage` 
parameters (both explicitly checked for null in implementation)
   - Add `@Nullable` to `Entity.with*` methods in ClusterSharding (all wrapped 
in `Optional.ofNullable`, explicitly accepting null)
   - Add jspecify dependency to `actorTyped`, `testkit`, and 
`clusterShardingTyped` modules
   
   Annotations were added only where code logic provides clear evidence of 
nullable semantics (null checks, `Optional.ofNullable` wrapping). Return type 
annotations are not included because Scala 2.13 does not support type 
annotation syntax on return types.
   
   ### Result
   
   Java consumers get null-safety signals via JSpecify annotations for 
actor-typed, cluster-sharding-typed, and testkit Java DSLs.
   
   ### Tests
   
   - `sbt actor-typed/compile testkit/compile cluster-sharding-typed/compile` — 
all pass
   - `sbt "actor-typed-tests/testOnly org.apache.pekko.actor.typed.javadsl.*"` 
— 41 tests pass
   - `sbt actor-typed/mimaReportBinaryIssues testkit/mimaReportBinaryIssues 
cluster-sharding-typed/mimaReportBinaryIssues` — no issues
   - `sbt actor-typed/headerCheck testkit/headerCheck 
cluster-sharding-typed/headerCheck` — pass
   - `scalafmt --mode diff-ref=origin/main` — formatted
   - `git diff --check` — clean
   
   ### References
   
   Refs #2563


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to