This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git


The following commit(s) were added to refs/heads/main by this push:
     new 75e2780031 add jspecify to persistence libs (#2850)
75e2780031 is described below

commit 75e2780031b12220ebc4a89ad369f39ee16c33f7
Author: PJ Fanning <[email protected]>
AuthorDate: Sat Apr 11 13:22:39 2026 +0200

    add jspecify to persistence libs (#2850)
---
 .../persistence/query/javadsl/package-info.java    | 25 ++++++++++++++++++++++
 .../persistence/testkit/javadsl/package-info.java  | 25 ++++++++++++++++++++++
 .../testkit/javadsl/PersistenceProbeBehavior.scala |  3 ++-
 .../persistence/typed/javadsl/package-info.java    | 25 ++++++++++++++++++++++
 .../typed/javadsl/EventSourcedBehavior.scala       |  5 +++--
 .../typed/state/javadsl/DurableStateBehavior.scala |  5 +++--
 .../persistence/journal/japi/package-info.java     | 25 ++++++++++++++++++++++
 .../persistence/snapshot/japi/package-info.java    | 25 ++++++++++++++++++++++
 .../persistence/state/javadsl/package-info.java    | 25 ++++++++++++++++++++++
 project/Dependencies.scala                         | 13 +++++++++--
 10 files changed, 169 insertions(+), 7 deletions(-)

diff --git 
a/persistence-query/src/main/java/org/apache/pekko/persistence/query/javadsl/package-info.java
 
b/persistence-query/src/main/java/org/apache/pekko/persistence/query/javadsl/package-info.java
new file mode 100644
index 0000000000..91a3cdb0ce
--- /dev/null
+++ 
b/persistence-query/src/main/java/org/apache/pekko/persistence/query/javadsl/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Java API for Pekko Persistence Query.
+ *
+ * <p>This package contains the Java DSL for Pekko Persistence Query. For the 
Scala DSL see
+ * [[org.apache.pekko.persistence.query.scaladsl]].
+ */
[email protected]
+package org.apache.pekko.persistence.query.javadsl;
diff --git 
a/persistence-testkit/src/main/java/org/apache/pekko/persistence/testkit/javadsl/package-info.java
 
b/persistence-testkit/src/main/java/org/apache/pekko/persistence/testkit/javadsl/package-info.java
new file mode 100644
index 0000000000..7117b8ab8a
--- /dev/null
+++ 
b/persistence-testkit/src/main/java/org/apache/pekko/persistence/testkit/javadsl/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Java API for Pekko Persistence TestKit.
+ *
+ * <p>This package contains the Java DSL for Pekko Persistence TestKit. For 
the Scala DSL see
+ * [[org.apache.pekko.persistence.testkit.scaladsl]].
+ */
[email protected]
+package org.apache.pekko.persistence.testkit.javadsl;
diff --git 
a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala
 
b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala
index e6374533e7..1d5898d8ee 100644
--- 
a/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala
+++ 
b/persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala
@@ -22,6 +22,7 @@ import pekko.actor.testkit.typed.javadsl.BehaviorTestKit
 import pekko.actor.typed.Behavior
 import pekko.annotation.DoNotInherit
 import pekko.persistence.testkit.internal.PersistenceProbeImpl
+import org.jspecify.annotations.Nullable
 
 /**
  * Factory methods to create PersistenceProbeBehavior instances for testing.
@@ -46,7 +47,7 @@ object PersistenceProbeBehavior {
    */
   def fromEventSourced[Command, Event, State](
       behavior: Behavior[Command],
-      initialState: State,
+      @Nullable initialState: State,
       initialSequenceNr: Long): PersistenceProbeBehavior[Command, Event, 
State] = {
     require(initialSequenceNr >= 0, "initialSequenceNr must be at least zero")
 
diff --git 
a/persistence-typed/src/main/java/org/apache/pekko/persistence/typed/javadsl/package-info.java
 
b/persistence-typed/src/main/java/org/apache/pekko/persistence/typed/javadsl/package-info.java
new file mode 100644
index 0000000000..7e771b06d2
--- /dev/null
+++ 
b/persistence-typed/src/main/java/org/apache/pekko/persistence/typed/javadsl/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Java API for Pekko Persistence Typed.
+ *
+ * <p>This package contains the Java DSL for Pekko Persistence Typed. For the 
Scala DSL see
+ * [[org.apache.pekko.persistence.typed.scaladsl]].
+ */
[email protected]
+package org.apache.pekko.persistence.typed.javadsl;
diff --git 
a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventSourcedBehavior.scala
 
b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventSourcedBehavior.scala
index 415c9a2f74..742ccceb11 100644
--- 
a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventSourcedBehavior.scala
+++ 
b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventSourcedBehavior.scala
@@ -31,6 +31,7 @@ import pekko.persistence.typed.EventAdapter
 import pekko.persistence.typed.internal._
 
 import com.typesafe.config.Config
+import org.jspecify.annotations.Nullable
 
 abstract class EventSourcedBehavior[Command, Event, State] private[pekko] (
     val persistenceId: PersistenceId,
@@ -52,7 +53,7 @@ abstract class EventSourcedBehavior[Command, Event, State] 
private[pekko] (
    * @param persistenceId stable unique identifier for the event sourced 
behavior
    * @param onPersistFailure BackoffSupervisionStrategy for persist failures
    */
-  def this(persistenceId: PersistenceId, onPersistFailure: 
BackoffSupervisorStrategy) = {
+  def this(persistenceId: PersistenceId, @Nullable onPersistFailure: 
BackoffSupervisorStrategy) = {
     this(persistenceId, Optional.ofNullable(onPersistFailure))
   }
 
@@ -280,7 +281,7 @@ abstract class 
EventSourcedBehaviorWithEnforcedReplies[Command, Event, State](
     this(persistenceId, Optional.empty[BackoffSupervisorStrategy])
   }
 
-  def this(persistenceId: PersistenceId, backoffSupervisorStrategy: 
BackoffSupervisorStrategy) = {
+  def this(persistenceId: PersistenceId, @Nullable backoffSupervisorStrategy: 
BackoffSupervisorStrategy) = {
     this(persistenceId, Optional.ofNullable(backoffSupervisorStrategy))
   }
 
diff --git 
a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/DurableStateBehavior.scala
 
b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/DurableStateBehavior.scala
index bfe61836fc..90f9325350 100644
--- 
a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/DurableStateBehavior.scala
+++ 
b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/DurableStateBehavior.scala
@@ -28,6 +28,7 @@ import pekko.persistence.typed.SnapshotAdapter
 import pekko.persistence.typed.state.internal
 import pekko.persistence.typed.state.internal._
 import pekko.persistence.typed.state.scaladsl
+import org.jspecify.annotations.Nullable
 
 /**
  * A `Behavior` for a persistent actor with durable storage of its state.
@@ -55,7 +56,7 @@ abstract class DurableStateBehavior[Command, State] 
private[pekko] (
    * @param persistenceId stable unique identifier for the 
`DurableStateBehavior`
    * @param onPersistFailure BackoffSupervisionStrategy for persist failures
    */
-  def this(persistenceId: PersistenceId, onPersistFailure: 
BackoffSupervisorStrategy) = {
+  def this(persistenceId: PersistenceId, @Nullable onPersistFailure: 
BackoffSupervisorStrategy) = {
     this(persistenceId, Optional.ofNullable(onPersistFailure))
   }
 
@@ -175,7 +176,7 @@ abstract class 
DurableStateBehaviorWithEnforcedReplies[Command, State](
     this(persistenceId, Optional.empty[BackoffSupervisorStrategy])
   }
 
-  def this(persistenceId: PersistenceId, backoffSupervisorStrategy: 
BackoffSupervisorStrategy) = {
+  def this(persistenceId: PersistenceId, @Nullable backoffSupervisorStrategy: 
BackoffSupervisorStrategy) = {
     this(persistenceId, Optional.ofNullable(backoffSupervisorStrategy))
   }
 
diff --git 
a/persistence/src/main/java/org/apache/pekko/persistence/journal/japi/package-info.java
 
b/persistence/src/main/java/org/apache/pekko/persistence/journal/japi/package-info.java
new file mode 100644
index 0000000000..ab32fb61a8
--- /dev/null
+++ 
b/persistence/src/main/java/org/apache/pekko/persistence/journal/japi/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Java API for Pekko Persistence Journal.
+ *
+ * <p>This package contains the Java DSL for Pekko Persistence Journal. For 
the Scala DSL see
+ * [[org.apache.pekko.persistence.journal]].
+ */
[email protected]
+package org.apache.pekko.persistence.journal.japi;
diff --git 
a/persistence/src/main/java/org/apache/pekko/persistence/snapshot/japi/package-info.java
 
b/persistence/src/main/java/org/apache/pekko/persistence/snapshot/japi/package-info.java
new file mode 100644
index 0000000000..bbef465511
--- /dev/null
+++ 
b/persistence/src/main/java/org/apache/pekko/persistence/snapshot/japi/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Java API for Pekko Persistence Snapshot Store.
+ *
+ * <p>This package contains the Java DSL for Pekko Persistence Snapshot Store. 
For the Scala DSL see
+ * [[org.apache.pekko.persistence.snapshot]].
+ */
[email protected]
+package org.apache.pekko.persistence.snapshot.japi;
diff --git 
a/persistence/src/main/java/org/apache/pekko/persistence/state/javadsl/package-info.java
 
b/persistence/src/main/java/org/apache/pekko/persistence/state/javadsl/package-info.java
new file mode 100644
index 0000000000..3a58fb5ae1
--- /dev/null
+++ 
b/persistence/src/main/java/org/apache/pekko/persistence/state/javadsl/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Java API for Pekko Persistence Durable State.
+ *
+ * <p>This package contains the Java DSL for Pekko Persistence Durable State. 
For the Scala DSL see
+ * [[org.apache.pekko.persistence.state.scaladsl]].
+ */
[email protected]
+package org.apache.pekko.persistence.state.javadsl;
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index bfe379ce50..682fd3a987 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -289,6 +289,7 @@ object Dependencies {
   lazy val slf4j = l ++= Seq(slf4jApi, TestDependencies.logback)
 
   lazy val persistence = l ++= Seq(
+    jspecify,
     Provided.levelDB,
     Provided.levelDBNative,
     TestDependencies.scalatest,
@@ -298,6 +299,7 @@ object Dependencies {
     TestDependencies.commonsCodec)
 
   lazy val persistenceQuery = l ++= Seq(
+    jspecify,
     TestDependencies.scalatest,
     TestDependencies.junit,
     TestDependencies.commonsIo,
@@ -310,11 +312,18 @@ object Dependencies {
     Provided.levelDB,
     Provided.levelDBNative)
 
-  lazy val persistenceTestKit = l ++= Seq(TestDependencies.scalatest, 
TestDependencies.logback)
+  lazy val persistenceTestKit = l ++= Seq(
+    jspecify,
+    TestDependencies.scalatest,
+    TestDependencies.logback)
 
   lazy val persistenceTypedTests = l ++= Seq(TestDependencies.scalatest, 
TestDependencies.logback)
 
-  lazy val persistenceShared = l ++= Seq(Provided.levelDB, 
Provided.levelDBNative, TestDependencies.logback)
+  lazy val persistenceShared = l ++= Seq(
+    jspecify,
+    Provided.levelDB,
+    Provided.levelDBNative,
+    TestDependencies.logback)
 
   lazy val jackson = l ++= Seq(
     jacksonCore,


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

Reply via email to