This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-samples.git
The following commit(s) were added to refs/heads/main by this push:
new 35e8323 fix: fix javadoc warning in ShoppingCart example (#177)
35e8323 is described below
commit 35e8323944fcb3d7b0c21065dba3e8a471baa218
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Sun Jul 5 11:14:57 2026 +0800
fix: fix javadoc warning in ShoppingCart example (#177)
* fix: replace deprecated bindAndHandle with newServerAt().bind() in Java
samples
Motivation:
Two Java sample files use the deprecated Http.bindAndHandle() API,
producing deprecation warnings during compilation.
Modification:
- WeatherHttpServer.java (sharding-java): replace bindAndHandle with
newServerAt("localhost", port).bind(routes), remove unused ConnectHttp,
Materializer and SystemMaterializer imports
- DemoApp.java (cluster-kubernetes-java): replace bindAndHandle with
newServerAt("0.0.0.0", 8080).bind(complete(...)), remove unused
ConnectHttp and Materializer imports
Result:
Samples use the modern HTTP server binding API. No more deprecation
warnings from these files.
Tests:
- sbt compile in pekko-sample-sharding-java (no warnings)
- pekko-sample-cluster-kubernetes-java: not run - pre-existing dependency
resolution issue (Maven project with missing published artifacts)
References: None - cleanup
* fix: fix javadoc warning in ShoppingCart example
Motivation:
Javadoc warning: `{@link Summary}` cannot be resolved because `Summary`
is an inner class of `ShoppingCart` and needs the enclosing class prefix.
Modification:
- Replace `{@link Summary}` with `{@link ShoppingCart.Summary}`
Result:
Javadoc warning is eliminated.
Tests:
Not run - docs only
References:
None
---
.../src/main/java/sample/persistence/ShoppingCart.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/pekko-sample-persistence-java/src/main/java/sample/persistence/ShoppingCart.java
b/pekko-sample-persistence-java/src/main/java/sample/persistence/ShoppingCart.java
index fe16254..261f6ff 100644
---
a/pekko-sample-persistence-java/src/main/java/sample/persistence/ShoppingCart.java
+++
b/pekko-sample-persistence-java/src/main/java/sample/persistence/ShoppingCart.java
@@ -141,7 +141,7 @@ public class ShoppingCart
/**
* A command to get the current state of the shopping cart.
*
- * The reply type is the {@link Summary}
+ * The reply type is the {@link ShoppingCart.Summary}
*/
public static class Get implements Command {
public final ActorRef<Summary> replyTo;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]