Skip to content

Commit

Permalink
Merge pull request #139 from oracle/javadoc-fix-1.2.0
Browse files Browse the repository at this point in the history
Fixing JavaDocs
  • Loading branch information
jeandelavarene authored Nov 7, 2023
2 parents 571a88f + 67e4716 commit 8bfdc34
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
16 changes: 10 additions & 6 deletions src/main/java/oracle/r2dbc/OracleR2dbcOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -534,20 +534,22 @@ public static Set<Option<?>> options() {
* </p><p>
* This method can used when configuring an <code>Option</code> with values
* from a <code>Supplier</code>:
* <pre>{@code
* </p><pre>{@code
* void configurePassword(ConnectionFactoryOptions.Builder optionsBuilder) {
* optionsBuilder.option(supplied(PASSWORD), () -> getPassword());
* }
*
* CharSequence getPassword() {
* // ... return a database password ...
* }
* }</pre>
* </p><p>
* }</pre><p>
* It is not strictly necessary to use this method when configuring an
* <code>Option</code> with a value from a <code>Supplier</code>. This method
* is offered for code readability and convenience.
* </p>
* @param <T> 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 <T> Option<Supplier<T>> supplied(Option<T> option) {
@SuppressWarnings("unchecked")
Expand All @@ -565,20 +567,22 @@ public static <T> Option<Supplier<T>> supplied(Option<T> option) {
* </p><p>
* This method can used when configuring an <code>Option</code> with values
* from a <code>Publisher</code>:
* <pre>{@code
* </p><pre>{@code
* void configurePassword(ConnectionFactoryOptions.Builder optionsBuilder) {
* optionsBuilder.option(published(PASSWORD), getPasswordPublisher());
* }
*
* Publisher<CharSequence> getPasswordPublisher() {
* // ... publish a database password ...
* }
* }</pre>
* </p><p>
* }</pre><p>
* It is not strictly necessary to use this method when configuring an
* <code>Option</code> with a value from a <code>Publisher</code>. This method
* is offered for code readability and convenience.
* </p>
* @param <T> 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 <T> Option<Publisher<T>> published(Option<T> option) {
@SuppressWarnings("unchecked")
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/oracle/r2dbc/impl/Publishers.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ private Publishers() {}
* publisher,
* onTerminationPublisher)
* .doOnCancel(onTerminationPublisher::subscribe)
* }</pre>
* }</pre><p>
* However, the code above can result in:
* <pre>
* </p><pre>
* reactor.core.Exceptions$StaticThrowable: Operator has been terminated
* </pre>
* </pre><p>
* 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.
Expand Down

0 comments on commit 8bfdc34

Please sign in to comment.