From 67e471686b0ca8e680ae3ac6054184580758eb4f Mon Sep 17 00:00:00 2001 From: Michael-A-McMahon Date: Mon, 6 Nov 2023 10:58:52 -0800 Subject: [PATCH] Fixing JavaDocs --- .../java/oracle/r2dbc/OracleR2dbcOptions.java | 16 ++++++++++------ src/main/java/oracle/r2dbc/impl/Publishers.java | 6 +++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/main/java/oracle/r2dbc/OracleR2dbcOptions.java b/src/main/java/oracle/r2dbc/OracleR2dbcOptions.java index 210b495..6b2fbe1 100644 --- a/src/main/java/oracle/r2dbc/OracleR2dbcOptions.java +++ b/src/main/java/oracle/r2dbc/OracleR2dbcOptions.java @@ -534,7 +534,7 @@ public static Set> options() { *

* This method can used when configuring an Option with values * from a Supplier: - *

{@code
+   * 

{@code
    * void configurePassword(ConnectionFactoryOptions.Builder optionsBuilder) {
    *   optionsBuilder.option(supplied(PASSWORD), () -> getPassword());
    * }
@@ -542,12 +542,14 @@ public static Set> options() {
    * CharSequence getPassword() {
    *   // ... return a database password ...
    * }
-   * }
- *

+ * }

* It is not strictly necessary to use this method when configuring an * Option with a value from a Supplier. This method * is offered for code readability and convenience. *

+ * @param The original value type of the option. + * @param option The option to cast. + * @return The option cast to have a Supplier value type. */ public static Option> supplied(Option option) { @SuppressWarnings("unchecked") @@ -565,7 +567,7 @@ public static Option> supplied(Option option) { *

* This method can used when configuring an Option with values * from a Publisher: - *

{@code
+   * 

{@code
    * void configurePassword(ConnectionFactoryOptions.Builder optionsBuilder) {
    *   optionsBuilder.option(published(PASSWORD), getPasswordPublisher());
    * }
@@ -573,12 +575,14 @@ public static  Option> supplied(Option option) {
    * Publisher getPasswordPublisher() {
    *   // ... publish a database password ...
    * }
-   * }
- *

+ * }

* It is not strictly necessary to use this method when configuring an * Option with a value from a Publisher. This method * is offered for code readability and convenience. *

+ * @param The original value type of the option. + * @param option The option to cast. + * @return The option cast to have a Publisher value type. */ public static Option> published(Option option) { @SuppressWarnings("unchecked") diff --git a/src/main/java/oracle/r2dbc/impl/Publishers.java b/src/main/java/oracle/r2dbc/impl/Publishers.java index d395ed2..590112c 100644 --- a/src/main/java/oracle/r2dbc/impl/Publishers.java +++ b/src/main/java/oracle/r2dbc/impl/Publishers.java @@ -53,11 +53,11 @@ private Publishers() {} * publisher, * onTerminationPublisher) * .doOnCancel(onTerminationPublisher::subscribe) - * } + * }

* However, the code above can result in: - *

+   * 

    *   reactor.core.Exceptions$StaticThrowable: Operator has been terminated
-   * 
+ *

* This seems to happen when the concatDelayError publisher receives a cancel * from a downstream subscriber after it has already received onComplete from * a upstream publisher.