@@ -534,20 +534,22 @@ public static Set<Option<?>> options() {
534
534
* </p><p>
535
535
* This method can used when configuring an <code>Option</code> with values
536
536
* from a <code>Supplier</code>:
537
- * <pre>{@code
537
+ * </p>< pre>{@code
538
538
* void configurePassword(ConnectionFactoryOptions.Builder optionsBuilder) {
539
539
* optionsBuilder.option(supplied(PASSWORD), () -> getPassword());
540
540
* }
541
541
*
542
542
* CharSequence getPassword() {
543
543
* // ... return a database password ...
544
544
* }
545
- * }</pre>
546
- * </p><p>
545
+ * }</pre><p>
547
546
* It is not strictly necessary to use this method when configuring an
548
547
* <code>Option</code> with a value from a <code>Supplier</code>. This method
549
548
* is offered for code readability and convenience.
550
549
* </p>
550
+ * @param <T> The original value type of the option.
551
+ * @param option The option to cast.
552
+ * @return The option cast to have a Supplier value type.
551
553
*/
552
554
public static <T > Option <Supplier <T >> supplied (Option <T > option ) {
553
555
@ SuppressWarnings ("unchecked" )
@@ -565,20 +567,22 @@ public static <T> Option<Supplier<T>> supplied(Option<T> option) {
565
567
* </p><p>
566
568
* This method can used when configuring an <code>Option</code> with values
567
569
* from a <code>Publisher</code>:
568
- * <pre>{@code
570
+ * </p>< pre>{@code
569
571
* void configurePassword(ConnectionFactoryOptions.Builder optionsBuilder) {
570
572
* optionsBuilder.option(published(PASSWORD), getPasswordPublisher());
571
573
* }
572
574
*
573
575
* Publisher<CharSequence> getPasswordPublisher() {
574
576
* // ... publish a database password ...
575
577
* }
576
- * }</pre>
577
- * </p><p>
578
+ * }</pre><p>
578
579
* It is not strictly necessary to use this method when configuring an
579
580
* <code>Option</code> with a value from a <code>Publisher</code>. This method
580
581
* is offered for code readability and convenience.
581
582
* </p>
583
+ * @param <T> The original value type of the option.
584
+ * @param option The option to cast.
585
+ * @return The option cast to have a Publisher value type.
582
586
*/
583
587
public static <T > Option <Publisher <T >> published (Option <T > option ) {
584
588
@ SuppressWarnings ("unchecked" )
0 commit comments