From 057fe066e853803e6a7fe4af8a5d344f943f8cf4 Mon Sep 17 00:00:00 2001 From: kerr Date: Mon, 15 Jan 2024 11:12:25 +0800 Subject: [PATCH] chore: Fix compiling error in AsSubscriber.java and FromPublisher.java (#953) --- .../jdocs/stream/operators/source/AsSubscriber.java | 7 ++----- .../jdocs/stream/operators/source/FromPublisher.java | 6 ++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/src/test/java-jdk9-only/jdocs/stream/operators/source/AsSubscriber.java b/docs/src/test/java-jdk9-only/jdocs/stream/operators/source/AsSubscriber.java index 477ed82063..bdaeafdc1d 100644 --- a/docs/src/test/java-jdk9-only/jdocs/stream/operators/source/AsSubscriber.java +++ b/docs/src/test/java-jdk9-only/jdocs/stream/operators/source/AsSubscriber.java @@ -22,9 +22,6 @@ import org.apache.pekko.stream.javadsl.Source; import org.apache.pekko.stream.javadsl.JavaFlowSupport; //#imports - -import org.apache.commons.lang.NotImplementedException; - public interface AsSubscriber { // We are 'faking' the JavaFlowSupport API here so we can include the signature as a snippet in the API, // because we're not publishing those (jdk9+) classes in our API docs yet. @@ -42,13 +39,13 @@ public interface AsSubscriber { static class Row { public String getField(String fieldName) { - throw new NotImplementedException(); + throw new UnsupportedOperationException("Not implemented in sample"); } } static class DatabaseClient { Publisher fetchRows() { - throw new NotImplementedException(); + throw new UnsupportedOperationException("Not implemented in sample"); } } diff --git a/docs/src/test/java-jdk9-only/jdocs/stream/operators/source/FromPublisher.java b/docs/src/test/java-jdk9-only/jdocs/stream/operators/source/FromPublisher.java index 0a55476283..7dd0ec897b 100644 --- a/docs/src/test/java-jdk9-only/jdocs/stream/operators/source/FromPublisher.java +++ b/docs/src/test/java-jdk9-only/jdocs/stream/operators/source/FromPublisher.java @@ -22,8 +22,6 @@ import org.apache.pekko.stream.javadsl.JavaFlowSupport; //#imports -import org.apache.commons.lang.NotImplementedException; - public interface FromPublisher { // We are 'faking' the JavaFlowSupport API here so we can include the signature as a snippet in the API, // because we're not publishing those (jdk9+) classes in our API docs yet. @@ -41,13 +39,13 @@ public interface FromPublisher { static class Row { public String getField(String fieldName) { - throw new NotImplementedException(); + throw new UnsupportedOperationException("Not implemented in sample"); } } static class DatabaseClient { Publisher fetchRows() { - throw new NotImplementedException(); + throw new UnsupportedOperationException("Not implemented in sample"); } }