Skip to content

Commit c35a1dd

Browse files
Merge pull request #77 from oracle/1-0-0-javadoc
Repairing javadocs
2 parents 85af1d4 + 98e1213 commit c35a1dd

11 files changed

+113
-62
lines changed

pom.xml

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Copyright (c) 2020, 2021, Oracle and/or its affiliates.
3+
Copyright (c) 2020, 2022, Oracle and/or its affiliates.
44
55
This software is dual-licensed to you under the Universal Permissive License
66
(UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License
@@ -26,7 +26,7 @@
2626

2727
<groupId>com.oracle.database.r2dbc</groupId>
2828
<artifactId>oracle-r2dbc</artifactId>
29-
<version>0.4.0</version>
29+
<version>1.0.0</version>
3030
<name>oracle-r2dbc</name>
3131
<description>
3232
Oracle R2DBC Driver implementing version 1.0.0 of the R2DBC SPI for Oracle Database.
@@ -163,9 +163,16 @@
163163
<configuration>
164164
<header>Oracle R2DBC ${project.version}</header>
165165
<footer>
166-
Copyright (c) 2020, 2021, Oracle and/or its affiliates.
166+
Copyright (c) 2020, 2022, Oracle and/or its affiliates.
167167
</footer>
168168
<show>package</show>
169+
<!--
170+
If sourcepath is not configured, then docs are only generated for
171+
the oracle.r2dbc package, and not for the oracle.r2dbc.impl package.
172+
The author of this comment could not find any explaination for this
173+
in the documentation of the Maven JavaDoc plugin.
174+
-->
175+
<sourcepath>src/main/java</sourcepath>
169176
<links>
170177
<link>https://r2dbc.io/spec/${r2dbc.version}/api/</link>
171178
<link>https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/</link>

src/main/java/oracle/r2dbc/impl/AsyncLock.java

+10-4
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ final class AsyncLock {
8888
new ConcurrentLinkedDeque<>();
8989

9090
/**
91-
* Returns a {@code Publisher} that emits {@code onComplete} when this lock is
92-
* acquired.
91+
* Acquires this lock, executes a {@code callback}, and then releases this
92+
* lock. The {@code callback} may be executed before this method returns
93+
* if this lock is currently available. Otherwise, the {@code callback} is
94+
* executed asynchronously after this lock becomes available.
95+
* @param callback Task to be executed with lock ownership. Not null.
9396
*/
9497
void lock(Runnable callback) {
9598
assert waitCount.get() >= 0 : "Wait count is less than 0: " + waitCount;
@@ -151,6 +154,7 @@ Publisher<Void> run(JdbcRunnable jdbcRunnable) {
151154
* emits {@code onNext} if the supplier returns a non-null value, and then
152155
* emits {@code onComplete}. Or, the {@code Publisher} emits {@code onError}
153156
* with any {@code Throwable} thrown by the supplier.
157+
* @param <T> The class of object output by the {@code jdbcSupplier}
154158
* @param jdbcSupplier Supplier to execute. Not null.
155159
* @return A publisher that emits the result of the {@code jdbcSupplier}.
156160
*/
@@ -177,9 +181,10 @@ <T> Publisher<T> get(JdbcSupplier<T> jdbcSupplier) {
177181
* {@code null}, the returned publisher just emits {@code onComplete}. If the
178182
* supplier throws an error, the returned publisher emits that as
179183
* {@code onError}.
184+
* @param <T> The class of object emitted by the supplied publisher
180185
* @param publisherSupplier Supplier to execute. Not null.
181-
* @return A flat-mapping of the publisher output by the {
182-
* @code publisherSupplier}.
186+
* @return A flat-mapping of the publisher output by the
187+
* {@code publisherSupplier}.
183188
*/
184189
<T> Publisher<T> flatMap(JdbcSupplier<Publisher<T>> publisherSupplier) {
185190
return Mono.from(get(publisherSupplier))
@@ -194,6 +199,7 @@ <T> Publisher<T> flatMap(JdbcSupplier<Publisher<T>> publisherSupplier) {
194199
* {@link Subscription#request(long)} will only occur when the JDBC connection
195200
* is not being used by another thread or another publisher.
196201
*
202+
* @param <T> The class of object emitted by the {@code publisher}
197203
* @param publisher A publisher that uses the JDBC connection
198204
* @return A Publisher that
199205
*/

src/main/java/oracle/r2dbc/impl/OracleR2dbcExceptions.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ static <T> T requireNonNull(T obj, String message) {
8484
/**
8585
* Checks if a {@code jdbcConnection} is open, and throws an exception if the
8686
* check fails.
87+
* @param jdbcConnection Connection to check. Not null.
8788
* @throws IllegalStateException If {@code jdbcConnection} is closed
8889
*/
8990
static void requireOpenConnection(java.sql.Connection jdbcConnection) {
@@ -289,9 +290,10 @@ static <T> T fromJdbc(JdbcSupplier<T> supplier)
289290
* caused the error is repeated, and stops reoccurring only if the
290291
* condition that caused the failure is corrected.
291292
* @param message A descriptive message that helps another programmer
292-
* understand the cause of failure. Not null.
293+
* understand the cause of failure. Not null.
294+
* @param sql The SQL statement which resulted in error. May be null.
293295
* @param cause An error thrown by other code to indicate a failure, if any.
294-
* May be null.
296+
* May be null.
295297
* @return A new non-transient exception.
296298
*/
297299
static R2dbcNonTransientException newNonTransientException(

src/main/java/oracle/r2dbc/impl/OracleReactiveJdbcAdapter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public AsyncLock getLock() {
257257
* jdbc:oracle:thin:@HOST:PORT/DATABASE
258258
* </pre><p>
259259
* Alternatively, the host, port, and service name may be specified using an
260-
* <a href="https://docs.oracle.com/en/database/oracle/oracle-database/21/netag/identifying-and-accessing-database.html#GUID-8D28E91B-CB72-4DC8-AEFC-F5D583626CF6"></a>
260+
* <a href="https://docs.oracle.com/en/database/oracle/oracle-database/21/netag/identifying-and-accessing-database.html#GUID-8D28E91B-CB72-4DC8-AEFC-F5D583626CF6">
261261
* Oracle Net Descriptor</a>. The descriptor may be set as the value of an
262262
* {@link Option} having the name "descriptor". When the descriptor option is
263263
* present, the JDBC URL is composed as:

src/main/java/oracle/r2dbc/impl/OracleReadableImpl.java

+23-19
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ class OracleReadableImpl implements io.r2dbc.spi.Readable {
7171
* {@code jdbcReadable} and obtains metadata of the values from
7272
* {@code resultMetadata}.
7373
* </p>
74-
* @param jdbcReadable Readable values from a JDBC Driver.
75-
* @param readablesMetadata Metadata of each value
76-
* @param adapter Adapts JDBC calls into reactive streams.
74+
* @param jdbcReadable Readable values from a JDBC Driver. Not null.
75+
* @param readablesMetadata Metadata of each value. Not null.
76+
* @param adapter Adapts JDBC calls into reactive streams. Not null.
7777
*/
7878
private OracleReadableImpl(
7979
JdbcReadable jdbcReadable, ReadablesMetadata<?> readablesMetadata,
@@ -89,9 +89,11 @@ private OracleReadableImpl(
8989
* provided {@code jdbcReadable} and {@code metadata}. The metadata
9090
* object is used to determine the default type mapping of column values.
9191
* </p>
92-
* @param adapter Adapts JDBC calls into reactive streams.
93-
* @param jdbcReadable Row data from the Oracle JDBC Driver.
94-
* @param metadata Meta-data for the specified row.
92+
* @param jdbcReadable Row data from the Oracle JDBC Driver. Not null.
93+
* @param metadata Meta-data for the specified row. Not null.
94+
* @param adapter Adapts JDBC calls into reactive streams. Not null.
95+
* @return A {@code Row} backed by the {@code jdbcReadable} and
96+
* {@code metadata}. Not null.
9597
*/
9698
static Row createRow(
9799
JdbcReadable jdbcReadable, RowMetadataImpl metadata,
@@ -104,9 +106,11 @@ static Row createRow(
104106
* the provided {@code jdbcReadable} and {@code rowMetadata}. The metadata
105107
* object is used to determine the default type mapping of column values.
106108
* </p>
107-
* @param adapter Adapts JDBC calls into reactive streams.
108-
* @param jdbcReadable Row data from the Oracle JDBC Driver.
109-
* @param metadata Meta-data for the specified row.
109+
* @param jdbcReadable Row data from the Oracle JDBC Driver. Not null.
110+
* @param metadata Meta-data for the specified row. Not null.
111+
* @param adapter Adapts JDBC calls into reactive streams. Not null.
112+
* @return An {@code OutParameters} backed by the {@code jdbcReadable} and
113+
* {@code metadata}. Not null.
110114
*/
111115
static OutParameters createOutParameters(
112116
JdbcReadable jdbcReadable, OutParametersMetadataImpl metadata,
@@ -160,7 +164,7 @@ public <T> T get(String name, Class<T> type) {
160164
* method implements a case-insensitive name match. If more than one
161165
* value has a matching name, this method returns lowest index of all
162166
* matching values.
163-
* @param name The name of a value
167+
* @param name The name of a value. Not null.
164168
* @return The index of the named value within this {@code Readable}
165169
* @throws NoSuchElementException If no column has a matching name.
166170
*/
@@ -184,9 +188,9 @@ private int indexOf(String name) {
184188
* </p>
185189
*
186190
* @param index 0-based index of a value
187-
* @param type Java type that the value is converted to
191+
* @param type Java type that the value is converted to. Not null.
188192
* @param <T> Java type that the value is converted to
189-
* @return The converted column value
193+
* @return The converted column value. May be null.
190194
* @throws R2dbcException If the conversion is not supported.
191195
*/
192196
private <T> T convert(int index, Class<T> type) {
@@ -359,9 +363,9 @@ private static final class RowImpl
359363
* determine the default type mapping of column values.
360364
* </p>
361365
*
362-
* @param jdbcReadable Row data from the Oracle JDBC Driver.
363-
* @param metadata Meta-data for the specified row.
364-
* @param adapter Adapts JDBC calls into reactive streams.
366+
* @param jdbcReadable Row data from the Oracle JDBC Driver. Not null.
367+
* @param metadata Meta-data for the specified row. Not null.
368+
* @param adapter Adapts JDBC calls into reactive streams. Not null.
365369
*/
366370
private RowImpl(
367371
JdbcReadable jdbcReadable,
@@ -401,9 +405,9 @@ private static final class OutParametersImpl
401405
* {@code outParametersMetaData}.
402406
* </p>
403407
*
404-
* @param jdbcReadable Readable values from a JDBC Driver.
405-
* @param metadata Metadata of each value
406-
* @param adapter Adapts JDBC calls into reactive streams.
408+
* @param jdbcReadable Readable values from a JDBC Driver. Not null.
409+
* @param metadata Metadata of each value. Not null.
410+
* @param adapter Adapts JDBC calls into reactive streams. Not null.
407411
*/
408412
private OutParametersImpl(
409413
JdbcReadable jdbcReadable,
@@ -419,4 +423,4 @@ public OutParametersMetadata getMetadata() {
419423
}
420424
}
421425

422-
}
426+
}

src/main/java/oracle/r2dbc/impl/OracleReadableMetadataImpl.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ public Integer getScale() {
243243
* <p>
244244
* Implements the R2DBC SPI method by returning the R2DBC {@code Type}.
245245
* </p>
246-
* @return
247246
*/
248247
@Override
249248
public Type getType() {
@@ -532,4 +531,4 @@ public int hashCode() {
532531
}
533532
}
534533

535-
}
534+
}

src/main/java/oracle/r2dbc/impl/OracleResultImpl.java

+18-17
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private OracleResultImpl() { }
9595
/**
9696
* Publishes the output of a {@code mappingFunction} for each {@code Segment}
9797
* of this {@code Result}.
98-
* @param mappingFunction {@code Segment} mapping function.
98+
* @param mappingFunction {@code Segment} mapping function. Not null.
9999
* @param <T> Output type of the {@code mappingFunction}
100100
* @return {@code Publisher} of values output by the {@code mappingFunction}
101101
*/
@@ -127,8 +127,8 @@ abstract <T> Publisher<T> publishSegments(
127127
* {@link #map(BiFunction)}, {@link #map(BiFunction)}, and
128128
* {@link #getRowsUpdated()}
129129
* </p>
130-
* @param type {@code Segment} type to be mapped
131-
* @param mappingFunction {@code Segment} mapping function
130+
* @param type {@code Segment} type to be mapped. Not null.
131+
* @param mappingFunction {@code Segment} mapping function. Not null.
132132
* @param <T> {@code Segment} type to be mapped
133133
* @param <U> Output type of the {@code mappingFunction}
134134
* @return {@code Publisher} of mapped {@code Segment}s
@@ -277,7 +277,7 @@ public OracleResultImpl filter(Predicate<Segment> filter) {
277277
* A subsequent call to this method overwrites the publisher that has been
278278
* set by the current call.
279279
* </p>
280-
* @param onConsumed Publisher to subscribe to when consumed
280+
* @param onConsumed Publisher to subscribe to when consumed. Not null.
281281
* @return true if this result has not already been consumed, and the
282282
* publisher will be subscribed to. Returns false if the publisher will not
283283
* be subscribed to because this result is already consumed.
@@ -316,8 +316,8 @@ private static IllegalStateException multipleConsumptionException() {
316316
/**
317317
* Creates a {@code Result} that publishes a JDBC {@code resultSet} as
318318
* {@link RowSegment}s
319-
* @param resultSet {@code ResultSet} to publish
320-
* @param adapter Adapts JDBC calls into reactive streams.
319+
* @param resultSet {@code ResultSet} to publish. Not null.
320+
* @param adapter Adapts JDBC calls into reactive streams. Not null.
321321
* @return A {@code Result} for a ResultSet
322322
*/
323323
public static OracleResultImpl createQueryResult(
@@ -328,7 +328,8 @@ public static OracleResultImpl createQueryResult(
328328
/**
329329
* Creates a {@code Result} that publishes {@code outParameters} as
330330
* {@link OutSegment}s
331-
* @param outParameters {@code OutParameters} to publish
331+
* @param outParameters {@code OutParameters} to publish. Not null.
332+
* @param adapter Adapts JDBC calls into reactive streams. Not null.
332333
* @return A {@code Result} for {@code OutParameters}
333334
*/
334335
static OracleResultImpl createCallResult(
@@ -342,8 +343,8 @@ static OracleResultImpl createCallResult(
342343
* {@code ResultSet} as {@link RowSegment}s
343344
* @return A {@code Result} for values generated by DML
344345
* @param updateCount Update count to publish
345-
* @param generatedKeys Generated values to publish
346-
* @param adapter Adapts JDBC calls into reactive streams.
346+
* @param generatedKeys Generated values to publish. Not null.
347+
* @param adapter Adapts JDBC calls into reactive streams. Not null.
347348
*/
348349
static OracleResultImpl createGeneratedValuesResult(
349350
long updateCount, ResultSet generatedKeys, ReactiveJdbcAdapter adapter) {
@@ -364,7 +365,7 @@ static OracleResultImpl createUpdateCountResult(long updateCount) {
364365
* Creates a {@code Result} that publishes a batch of {@code updateCounts}
365366
* as {@link UpdateCount} segments
366367
* @return A {@code Result} for a batch DML update
367-
* @param updateCounts Update counts to publish
368+
* @param updateCounts Update counts to publish. Not null.
368369
*/
369370
static OracleResultImpl createBatchUpdateResult(long[] updateCounts) {
370371
return new BatchUpdateResult(updateCounts);
@@ -375,7 +376,7 @@ static OracleResultImpl createBatchUpdateResult(long[] updateCounts) {
375376
* {@code batchUpdateException} as {@link UpdateCount} segments, followed a
376377
* {@link Message} segment with the {@code batchUpdateException} mapped to
377378
* an {@link R2dbcException}
378-
* @param batchUpdateException BatchUpdateException to publish
379+
* @param batchUpdateException BatchUpdateException to publish. Not null.
379380
* @return A {@code Result} for a failed DML batch update
380381
*/
381382
static OracleResultImpl createBatchUpdateErrorResult(
@@ -386,7 +387,7 @@ static OracleResultImpl createBatchUpdateErrorResult(
386387
/**
387388
* Creates a {@code Result} that publishes an {@code r2dbcException} as a
388389
* {@link Message} segment
389-
* @param r2dbcException Error to publish
390+
* @param r2dbcException Error to publish. Not null.
390391
* @return A {@code Result} for failed {@code Statement} execution
391392
*/
392393
static OracleResultImpl createErrorResult(R2dbcException r2dbcException) {
@@ -397,8 +398,8 @@ static OracleResultImpl createErrorResult(R2dbcException r2dbcException) {
397398
* Creates a {@code Result} that publishes a {@code warning} as a
398399
* {@link Message} segment, followed by any {@code Segment}s of a
399400
* {@code result}.
400-
* @param warning Warning to publish
401-
* @param result Result to publisher
401+
* @param warning Warning to publish. Not null.
402+
* @param result Result to publisher. Not null.
402403
* @return A {@code Result} for a {@code Statement} execution that
403404
* completed with a warning.
404405
*/
@@ -635,8 +636,8 @@ private static final class WarningResult extends OracleResultImpl {
635636
/**
636637
* Constructs a result that publishes a {@code warning} as a
637638
* {@link Message}, and then publishes the segments of a {@code result}.
638-
* @param warning Warning to publish
639-
* @param result Result of segments to publish after the warning
639+
* @param warning Warning to publish. Not null.
640+
* @param result Result of segments to publish after the warning. Not null.
640641
*/
641642
private WarningResult(
642643
SQLWarning warning, OracleResultImpl result) {
@@ -807,7 +808,7 @@ public String message() {
807808
* to a single {@link org.reactivestreams.Subscriber}, and rejects additional
808809
* {@code Subscriber}s by emitting {@code onError} with
809810
* {@link IllegalStateException}.
810-
* @param publisher Publisher that emits signals
811+
* @param publisher Publisher that emits signals. Not null.
811812
* @param <T> Value type of {@code onNext} signals
812813
* @return A {@code Publisher} that allows a single subscriber
813814
*/

src/main/java/oracle/r2dbc/impl/OracleStatementImpl.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,9 @@ public Statement bind(int index, Object value) {
288288
* matching name. For instance, when {@code 9} is bound to the parameter
289289
* named "x", the following SQL would return all names having a birthday on
290290
* the 9th day of the 9th month:
291-
* <pre>
291+
* </p><pre>
292292
* SELECT name FROM birthday WHERE month=:x AND day=:x
293293
* </pre>
294-
* </p>
295294
* @throws IllegalArgumentException {@inheritDoc}
296295
* @throws IllegalArgumentException If the {@code identifier} does match a
297296
* case sensitive parameter name that appears in this {@code Statement's}
@@ -348,17 +347,15 @@ public Statement bindNull(int index, Class<?> type) {
348347
* SQL command is read from left to right. (Note: It is not recommended to use
349348
* duplicate parameter names. Use {@link #bindNull(int, Class)} to set the
350349
* SQL {@code NULL} value for a duplicate parameter name at a given index).
351-
* </p>
352350
* </p><p>
353351
* If the specified {@code identifier} matches more than one parameter name,
354352
* then this method binds the SQL {@code NULL} value to all parameters
355353
* having a matching name. For instance, when {@code NULL} is bound to the
356354
* parameter named "x", the following SQL would create a birthday with
357355
* {@code NULL} values for month and day:
358-
* <pre>
356+
* </p><pre>
359357
* INSERT INTO birthday (name, month, day) VALUES ('Plato', :x, :x)
360358
* </pre>
361-
* </p>
362359
* @throws IllegalArgumentException {@inheritDoc}
363360
* @throws IllegalArgumentException If the {@code identifier} does match a
364361
* case sensitive parameter name that appears in this {@code Statement's}
@@ -1590,4 +1587,4 @@ protected Publisher<OracleResultImpl> executeJdbc() {
15901587
}
15911588

15921589
}
1593-
}
1590+
}

0 commit comments

Comments
 (0)