You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by md...@apache.org on 2023/08/01 16:59:03 UTC

[incubator-pekko-http] branch main updated (e7c60cd6f -> ff01e417d)

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

mdedetrich pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-http.git


    from e7c60cd6f remove duplicate link
     new b6e4bd242 format source with sbt-java-formatter, #288
     new ff01e417d Fix CI check for formatting of java code

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/validate-and-test.yml            |  2 +-
 .../javadsl/server/cors/CorsServerExample.java     | 25 +++++++++++-----------
 .../pekko/http/javadsl/server/JavaTestServer.java  |  5 ++---
 .../server/directives/RouteDirectivesTest.java     |  4 ++--
 4 files changed, 17 insertions(+), 19 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org


[incubator-pekko-http] 02/02: Fix CI check for formatting of java code

Posted by md...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mdedetrich pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-http.git

commit ff01e417d1f39a2cca96bbb8a12a32d789e92e85
Author: Matthew de Detrich <ma...@aiven.io>
AuthorDate: Tue Aug 1 18:37:34 2023 +0200

    Fix CI check for formatting of java code
---
 .github/workflows/validate-and-test.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/validate-and-test.yml b/.github/workflows/validate-and-test.yml
index 306039039..c0f0c575e 100644
--- a/.github/workflows/validate-and-test.yml
+++ b/.github/workflows/validate-and-test.yml
@@ -36,7 +36,7 @@ jobs:
           key: build-target-${{ hashFiles('**/*.sbt', 'project/build.properties', 'project/**/*.scala') }}
 
       - name: Check code is formatted
-        run: sbt javafmtCheck
+        run: sbt javafmtCheckAll
 
       - name: Check for missing formatting
         run: git diff --exit-code --color


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org


[incubator-pekko-http] 01/02: format source with sbt-java-formatter, #288

Posted by md...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mdedetrich pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-http.git

commit b6e4bd242e5e5657f2bb17478c98abb06641eeae
Author: Auto Format <nobody>
AuthorDate: Tue Aug 1 18:36:09 2023 +0200

    format source with sbt-java-formatter, #288
---
 .../javadsl/server/cors/CorsServerExample.java     | 25 +++++++++++-----------
 .../pekko/http/javadsl/server/JavaTestServer.java  |  5 ++---
 .../server/directives/RouteDirectivesTest.java     |  4 ++--
 3 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/docs/src/test/java/docs/http/javadsl/server/cors/CorsServerExample.java b/docs/src/test/java/docs/http/javadsl/server/cors/CorsServerExample.java
index 79fa7774d..33755b19d 100644
--- a/docs/src/test/java/docs/http/javadsl/server/cors/CorsServerExample.java
+++ b/docs/src/test/java/docs/http/javadsl/server/cors/CorsServerExample.java
@@ -44,21 +44,20 @@ public class CorsServerExample {
     final CorsServerExample app = new CorsServerExample();
 
     final CompletionStage<ServerBinding> futureBinding =
-            Http.get(system).newServerAt("localhost", 8080).bind(app.createRoute());
-
-    futureBinding.whenComplete((binding, exception) -> {
-      if (binding != null) {
-        system.log().info("Server online at http://localhost:8080/\nPress RETURN to stop...");
-      } else {
-        system.log().error("Failed to bind HTTP endpoint, terminating system", exception);
-        system.terminate();
-      }
-    });
+        Http.get(system).newServerAt("localhost", 8080).bind(app.createRoute());
+
+    futureBinding.whenComplete(
+        (binding, exception) -> {
+          if (binding != null) {
+            system.log().info("Server online at http://localhost:8080/\nPress RETURN to stop...");
+          } else {
+            system.log().error("Failed to bind HTTP endpoint, terminating system", exception);
+            system.terminate();
+          }
+        });
 
     System.in.read(); // let it run until user presses return
-    futureBinding
-            .thenCompose(ServerBinding::unbind)
-            .thenAccept(unbound -> system.terminate());
+    futureBinding.thenCompose(ServerBinding::unbind).thenAccept(unbound -> system.terminate());
   }
 
   private Route createRoute() {
diff --git a/http-tests/src/test/java/org/apache/pekko/http/javadsl/server/JavaTestServer.java b/http-tests/src/test/java/org/apache/pekko/http/javadsl/server/JavaTestServer.java
index c8fe7df07..457175fed 100644
--- a/http-tests/src/test/java/org/apache/pekko/http/javadsl/server/JavaTestServer.java
+++ b/http-tests/src/test/java/org/apache/pekko/http/javadsl/server/JavaTestServer.java
@@ -48,9 +48,8 @@ public class JavaTestServer {
                     timeout,
                     this::mkTimeoutResponse,
                     () -> {
-                      silentSleep(
-                          5000); // too long, but note that this will NOT activate
-                                 // withRequestTimeout, see below
+                      silentSleep(5000); // too long, but note that this will NOT activate
+                      // withRequestTimeout, see below
                       return complete(index());
                     }));
 
diff --git a/http-tests/src/test/java/org/apache/pekko/http/javadsl/server/directives/RouteDirectivesTest.java b/http-tests/src/test/java/org/apache/pekko/http/javadsl/server/directives/RouteDirectivesTest.java
index 94c886f4d..c42d74ecb 100644
--- a/http-tests/src/test/java/org/apache/pekko/http/javadsl/server/directives/RouteDirectivesTest.java
+++ b/http-tests/src/test/java/org/apache/pekko/http/javadsl/server/directives/RouteDirectivesTest.java
@@ -51,7 +51,7 @@ public class RouteDirectivesTest extends JUnitRouteTest {
                                 mat ->
                                     Directives.<ByteString>onSuccess(
                                         entity // fails to infer type parameter with some older
-                                               // oracle JDK versions
+                                            // oracle JDK versions
                                             .withoutSizeLimit()
                                             .getDataBytes()
                                             .runWith(Sink.<ByteString>head(), mat),
@@ -74,7 +74,7 @@ public class RouteDirectivesTest extends JUnitRouteTest {
                             mat ->
                                 Directives.<ByteString>onSuccess(
                                     entity // fails to infer type parameter with some older oracle
-                                           // JDK versions
+                                        // JDK versions
                                         .withSizeLimit(5)
                                         .getDataBytes()
                                         .runWith(Sink.head(), mat),


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org