Skip to content

Commit b02bd19

Browse files
committed
Better alignment with DBCP
1 parent 0e15dce commit b02bd19

File tree

4 files changed

+73
-72
lines changed

4 files changed

+73
-72
lines changed

java/org/apache/tomcat/dbcp/dbcp2/DelegatingDatabaseMetaData.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,13 @@ public ResultSet getIndexInfo(final String catalog, final String schema, final S
264264
}
265265

266266
/**
267-
* If my underlying {@link ResultSet} is not a {@code DelegatingResultSet}, returns it, otherwise recursively invokes this method on my delegate.
267+
* If my underlying {@link ResultSet} is not a {@link DelegatingResultSet}, returns it, otherwise recursively invokes this method on my delegate.
268268
* <p>
269-
* Hence this method will return the first delegate that is not a {@code DelegatingResultSet}, or {@code null} when no non-{@code DelegatingResultSet}
269+
* Hence this method will return the first delegate that is not a {@link DelegatingResultSet}, or {@code null} when no non-{@link DelegatingResultSet}
270270
* delegate can be found by traversing this chain.
271271
* </p>
272272
* <p>
273-
* This method is useful when you may have nested {@code DelegatingResultSet}s, and you want to make sure to obtain a "genuine" {@link ResultSet}.
273+
* This method is useful when you may have nested {@link DelegatingResultSet}s, and you want to make sure to obtain a "genuine" {@link ResultSet}.
274274
* </p>
275275
*
276276
* @return the innermost database meta data.

java/org/apache/tomcat/dbcp/dbcp2/DelegatingResultSet.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -595,14 +595,14 @@ public int getHoldability() throws SQLException {
595595
}
596596

597597
/**
598-
* If my underlying {@link ResultSet} is not a {@code DelegatingResultSet}, returns it, otherwise recursively
598+
* If my underlying {@link ResultSet} is not a {@link DelegatingResultSet}, returns it, otherwise recursively
599599
* invokes this method on my delegate.
600600
* <p>
601-
* Hence this method will return the first delegate that is not a {@code DelegatingResultSet}, or {@code null} when
602-
* no non-{@code DelegatingResultSet} delegate can be found by traversing this chain.
601+
* Hence this method will return the first delegate that is not a {@link DelegatingResultSet}, or {@code null} when
602+
* no non-{@link DelegatingResultSet} delegate can be found by traversing this chain.
603603
* </p>
604604
* <p>
605-
* This method is useful when you may have nested {@code DelegatingResultSet}s, and you want to make sure to obtain
605+
* This method is useful when you may have nested {@link DelegatingResultSet}s, and you want to make sure to obtain
606606
* a "genuine" {@link ResultSet}.
607607
* </p>
608608
*

java/org/apache/tomcat/dbcp/dbcp2/PStmtKey.java

Lines changed: 65 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.apache.tomcat.dbcp.dbcp2;
1818

1919
import java.sql.Connection;
20+
import java.sql.ResultSet;
2021
import java.sql.SQLException;
2122
import java.sql.Statement;
2223
import java.util.Arrays;
@@ -68,20 +69,20 @@ private static StatementBuilder match(final StatementType statementType, final S
6869
private final String sql;
6970

7071
/**
71-
* Result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or
72-
* {@code ResultSet.TYPE_SCROLL_SENSITIVE}.
72+
* Result set type; one of {@link ResultSet#TYPE_FORWARD_ONLY}, {@link ResultSet#TYPE_SCROLL_INSENSITIVE}, or
73+
* {@link ResultSet#TYPE_SCROLL_SENSITIVE}.
7374
*/
7475
private final Integer resultSetType;
7576

7677
/**
77-
* Result set concurrency. A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or
78-
* {@code ResultSet.CONCUR_UPDATABLE}.
78+
* Result set concurrency. A concurrency type; one of {@link ResultSet#CONCUR_READ_ONLY} or
79+
* {@link ResultSet#CONCUR_UPDATABLE}.
7980
*/
8081
private final Integer resultSetConcurrency;
8182

8283
/**
83-
* Result set holdability. One of the following {@code ResultSet} constants: {@code ResultSet.HOLD_CURSORS_OVER_COMMIT}
84-
* or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}.
84+
* Result set holdability. One of the following {@link ResultSet} constants: {@link ResultSet#HOLD_CURSORS_OVER_COMMIT}
85+
* or {@link ResultSet#CLOSE_CURSORS_AT_COMMIT}.
8586
*/
8687
private final Integer resultSetHoldability;
8788

@@ -96,8 +97,8 @@ private static StatementBuilder match(final StatementType statementType, final S
9697
private final String schema;
9798

9899
/**
99-
* A flag indicating whether auto-generated keys should be returned; one of {@code Statement.RETURN_GENERATED_KEYS} or
100-
* {@code Statement.NO_GENERATED_KEYS}.
100+
* A flag indicating whether auto-generated keys should be returned; one of {@link Statement#RETURN_GENERATED_KEYS} or
101+
* {@link Statement#NO_GENERATED_KEYS}.
101102
*/
102103
private final Integer autoGeneratedKeys;
103104

@@ -136,10 +137,10 @@ public PStmtKey(final String sql) {
136137
* Constructs a key to uniquely identify a prepared statement.
137138
*
138139
* @param sql The SQL statement.
139-
* @param resultSetType A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY},
140-
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}.
141-
* @param resultSetConcurrency A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or
142-
* {@code ResultSet.CONCUR_UPDATABLE}.
140+
* @param resultSetType A result set type; one of {@link ResultSet#TYPE_FORWARD_ONLY},
141+
* {@link ResultSet#TYPE_SCROLL_INSENSITIVE}, or {@link ResultSet#TYPE_SCROLL_SENSITIVE}.
142+
* @param resultSetConcurrency A concurrency type; one of {@link ResultSet#CONCUR_READ_ONLY} or
143+
* {@link ResultSet#CONCUR_UPDATABLE}.
143144
* @deprecated Use {@link #PStmtKey(String, String, String, int, int)}.
144145
*/
145146
@Deprecated
@@ -165,7 +166,7 @@ public PStmtKey(final String sql, final String catalog) {
165166
* @param sql The SQL statement.
166167
* @param catalog The catalog.
167168
* @param autoGeneratedKeys A flag indicating whether auto-generated keys should be returned; one of
168-
* {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}.
169+
* {@link Statement#RETURN_GENERATED_KEYS} or {@link Statement#NO_GENERATED_KEYS}.
169170
* @deprecated Use {@link #PStmtKey(String, String, String, int)}.
170171
*/
171172
@Deprecated
@@ -178,10 +179,10 @@ public PStmtKey(final String sql, final String catalog, final int autoGeneratedK
178179
*
179180
* @param sql The SQL statement.
180181
* @param catalog The catalog.
181-
* @param resultSetType A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY},
182-
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}.
183-
* @param resultSetConcurrency A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or
184-
* {@code ResultSet.CONCUR_UPDATABLE}.
182+
* @param resultSetType A result set type; one of {@link ResultSet#TYPE_FORWARD_ONLY},
183+
* {@link ResultSet#TYPE_SCROLL_INSENSITIVE}, or {@link ResultSet#TYPE_SCROLL_SENSITIVE}.
184+
* @param resultSetConcurrency A concurrency type; one of {@link ResultSet#CONCUR_READ_ONLY} or
185+
* {@link ResultSet#CONCUR_UPDATABLE}.
185186
* @deprecated Use {@link #PStmtKey(String, String, String, int, int)}.
186187
*/
187188
@Deprecated
@@ -194,12 +195,12 @@ public PStmtKey(final String sql, final String catalog, final int resultSetType,
194195
*
195196
* @param sql The SQL statement.
196197
* @param catalog The catalog.
197-
* @param resultSetType a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY},
198-
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}.
199-
* @param resultSetConcurrency A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or
200-
* {@code ResultSet.CONCUR_UPDATABLE}
201-
* @param resultSetHoldability One of the following {@code ResultSet} constants:
202-
* {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}.
198+
* @param resultSetType a result set type; one of {@link ResultSet#TYPE_FORWARD_ONLY},
199+
* {@link ResultSet#TYPE_SCROLL_INSENSITIVE}, or {@link ResultSet#TYPE_SCROLL_SENSITIVE}.
200+
* @param resultSetConcurrency A concurrency type; one of {@link ResultSet#CONCUR_READ_ONLY} or
201+
* {@link ResultSet#CONCUR_UPDATABLE}
202+
* @param resultSetHoldability One of the following {@link ResultSet} constants:
203+
* {@link ResultSet#HOLD_CURSORS_OVER_COMMIT} or {@link ResultSet#CLOSE_CURSORS_AT_COMMIT}.
203204
* @deprecated Use {@link #PStmtKey(String, String, String, int, int, int)}.
204205
*/
205206
@Deprecated
@@ -212,12 +213,12 @@ public PStmtKey(final String sql, final String catalog, final int resultSetType,
212213
*
213214
* @param sql The SQL statement.
214215
* @param catalog The catalog.
215-
* @param resultSetType a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY},
216-
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}
217-
* @param resultSetConcurrency A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or
218-
* {@code ResultSet.CONCUR_UPDATABLE}.
219-
* @param resultSetHoldability One of the following {@code ResultSet} constants:
220-
* {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}.
216+
* @param resultSetType a result set type; one of {@link ResultSet#TYPE_FORWARD_ONLY},
217+
* {@link ResultSet#TYPE_SCROLL_INSENSITIVE}, or {@link ResultSet#TYPE_SCROLL_SENSITIVE}
218+
* @param resultSetConcurrency A concurrency type; one of {@link ResultSet#CONCUR_READ_ONLY} or
219+
* {@link ResultSet#CONCUR_UPDATABLE}.
220+
* @param resultSetHoldability One of the following {@link ResultSet} constants:
221+
* {@link ResultSet#HOLD_CURSORS_OVER_COMMIT} or {@link ResultSet#CLOSE_CURSORS_AT_COMMIT}.
221222
* @param statementType The SQL statement type, prepared or callable.
222223
* @deprecated Use {@link #PStmtKey(String, String, String, int, int, int, PoolingConnection.StatementType)}
223224
*/
@@ -233,10 +234,10 @@ public PStmtKey(final String sql, final String catalog, final int resultSetType,
233234
*
234235
* @param sql The SQL statement.
235236
* @param catalog The catalog.
236-
* @param resultSetType A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY},
237-
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}.
238-
* @param resultSetConcurrency A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or
239-
* {@code ResultSet.CONCUR_UPDATABLE}.
237+
* @param resultSetType A result set type; one of {@link ResultSet#TYPE_FORWARD_ONLY},
238+
* {@link ResultSet#TYPE_SCROLL_INSENSITIVE}, or {@link ResultSet#TYPE_SCROLL_SENSITIVE}.
239+
* @param resultSetConcurrency A concurrency type; one of {@link ResultSet#CONCUR_READ_ONLY} or
240+
* {@link ResultSet#CONCUR_UPDATABLE}.
240241
* @param statementType The SQL statement type, prepared or callable.
241242
* @deprecated Use {@link #PStmtKey(String, String, String, int, int, PoolingConnection.StatementType)}.
242243
*/
@@ -280,7 +281,7 @@ public PStmtKey(final String sql, final String catalog, final StatementType stat
280281
* @param catalog The catalog.
281282
* @param statementType The SQL statement type, prepared or callable.
282283
* @param autoGeneratedKeys A flag indicating whether auto-generated keys should be returned; one of
283-
* {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}.
284+
* {@link Statement#RETURN_GENERATED_KEYS} or {@link Statement#NO_GENERATED_KEYS}.
284285
* @deprecated Use {@link #PStmtKey(String, String, String, PoolingConnection.StatementType, Integer)}
285286
*/
286287
@Deprecated
@@ -308,7 +309,7 @@ public PStmtKey(final String sql, final String catalog, final String schema) {
308309
* @param catalog The catalog.
309310
* @param schema The schema
310311
* @param autoGeneratedKeys A flag indicating whether auto-generated keys should be returned; one of
311-
* {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}.
312+
* {@link Statement#RETURN_GENERATED_KEYS} or {@link Statement#NO_GENERATED_KEYS}.
312313
* @since 2.5.0
313314
*/
314315
public PStmtKey(final String sql, final String catalog, final String schema, final int autoGeneratedKeys) {
@@ -321,10 +322,10 @@ public PStmtKey(final String sql, final String catalog, final String schema, fin
321322
* @param sql The SQL statement.
322323
* @param catalog The catalog.
323324
* @param schema The schema
324-
* @param resultSetType A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY},
325-
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}.
326-
* @param resultSetConcurrency A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or
327-
* {@code ResultSet.CONCUR_UPDATABLE}.
325+
* @param resultSetType A result set type; one of {@link ResultSet#TYPE_FORWARD_ONLY},
326+
* {@link ResultSet#TYPE_SCROLL_INSENSITIVE}, or {@link ResultSet#TYPE_SCROLL_SENSITIVE}.
327+
* @param resultSetConcurrency A concurrency type; one of {@link ResultSet#CONCUR_READ_ONLY} or
328+
* {@link ResultSet#CONCUR_UPDATABLE}.
328329
*/
329330
public PStmtKey(final String sql, final String catalog, final String schema, final int resultSetType, final int resultSetConcurrency) {
330331
this(sql, catalog, schema, resultSetType, resultSetConcurrency, StatementType.PREPARED_STATEMENT);
@@ -336,12 +337,12 @@ public PStmtKey(final String sql, final String catalog, final String schema, fin
336337
* @param sql The SQL statement.
337338
* @param catalog The catalog.
338339
* @param schema The schema
339-
* @param resultSetType a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY},
340-
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}.
341-
* @param resultSetConcurrency A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or
342-
* {@code ResultSet.CONCUR_UPDATABLE}
343-
* @param resultSetHoldability One of the following {@code ResultSet} constants:
344-
* {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}.
340+
* @param resultSetType a result set type; one of {@link ResultSet#TYPE_FORWARD_ONLY},
341+
* {@link ResultSet#TYPE_SCROLL_INSENSITIVE}, or {@link ResultSet#TYPE_SCROLL_SENSITIVE}.
342+
* @param resultSetConcurrency A concurrency type; one of {@link ResultSet#CONCUR_READ_ONLY} or
343+
* {@link ResultSet#CONCUR_UPDATABLE}
344+
* @param resultSetHoldability One of the following {@link ResultSet} constants:
345+
* {@link ResultSet#HOLD_CURSORS_OVER_COMMIT} or {@link ResultSet#CLOSE_CURSORS_AT_COMMIT}.
345346
* @since 2.5.0
346347
*/
347348
public PStmtKey(final String sql, final String catalog, final String schema, final int resultSetType, final int resultSetConcurrency,
@@ -355,12 +356,12 @@ public PStmtKey(final String sql, final String catalog, final String schema, fin
355356
* @param sql The SQL statement.
356357
* @param catalog The catalog.
357358
* @param schema The schema.
358-
* @param resultSetType a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY},
359-
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}
360-
* @param resultSetConcurrency A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or
361-
* {@code ResultSet.CONCUR_UPDATABLE}.
362-
* @param resultSetHoldability One of the following {@code ResultSet} constants:
363-
* {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}.
359+
* @param resultSetType a result set type; one of {@link ResultSet#TYPE_FORWARD_ONLY},
360+
* {@link ResultSet#TYPE_SCROLL_INSENSITIVE}, or {@link ResultSet#TYPE_SCROLL_SENSITIVE}
361+
* @param resultSetConcurrency A concurrency type; one of {@link ResultSet#CONCUR_READ_ONLY} or
362+
* {@link ResultSet#CONCUR_UPDATABLE}.
363+
* @param resultSetHoldability One of the following {@link ResultSet} constants:
364+
* {@link ResultSet#HOLD_CURSORS_OVER_COMMIT} or {@link ResultSet#CLOSE_CURSORS_AT_COMMIT}.
364365
* @param statementType The SQL statement type, prepared or callable.
365366
* @since 2.5.0
366367
*/
@@ -376,10 +377,10 @@ public PStmtKey(final String sql, final String catalog, final String schema, fin
376377
* @param sql The SQL statement.
377378
* @param catalog The catalog.
378379
* @param schema The schema.
379-
* @param resultSetType A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY},
380-
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}.
381-
* @param resultSetConcurrency A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or
382-
* {@code ResultSet.CONCUR_UPDATABLE}.
380+
* @param resultSetType A result set type; one of {@link ResultSet#TYPE_FORWARD_ONLY},
381+
* {@link ResultSet#TYPE_SCROLL_INSENSITIVE}, or {@link ResultSet#TYPE_SCROLL_SENSITIVE}.
382+
* @param resultSetConcurrency A concurrency type; one of {@link ResultSet#CONCUR_READ_ONLY} or
383+
* {@link ResultSet#CONCUR_UPDATABLE}.
383384
* @param statementType The SQL statement type, prepared or callable.
384385
* @since 2.5.0
385386
*/
@@ -456,7 +457,7 @@ public PStmtKey(final String sql, final String catalog, final String schema, fin
456457
* @param schema The schema.
457458
* @param statementType The SQL statement type, prepared or callable.
458459
* @param autoGeneratedKeys A flag indicating whether auto-generated keys should be returned; one of
459-
* {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}.
460+
* {@link Statement#RETURN_GENERATED_KEYS} or {@link Statement#NO_GENERATED_KEYS}.
460461
* @since 2.5.0
461462
*/
462463
public PStmtKey(final String sql, final String catalog, final String schema, final StatementType statementType, final Integer autoGeneratedKeys) {
@@ -535,8 +536,8 @@ public boolean equals(final Object obj) {
535536
}
536537

537538
/**
538-
* Gets a flag indicating whether auto-generated keys should be returned; one of {@code Statement.RETURN_GENERATED_KEYS}
539-
* or {@code Statement.NO_GENERATED_KEYS}.
539+
* Gets a flag indicating whether auto-generated keys should be returned; one of {@link Statement#RETURN_GENERATED_KEYS}
540+
* or {@link Statement#NO_GENERATED_KEYS}.
540541
*
541542
* @return a flag indicating whether auto-generated keys should be returned.
542543
*/
@@ -572,8 +573,8 @@ public String[] getColumnNames() {
572573
}
573574

574575
/**
575-
* Gets the result set concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or
576-
* {@code ResultSet.CONCUR_UPDATABLE}.
576+
* Gets the result set concurrency type; one of {@link ResultSet#CONCUR_READ_ONLY} or
577+
* {@link ResultSet#CONCUR_UPDATABLE}.
577578
*
578579
* @return The result set concurrency type.
579580
*/
@@ -582,8 +583,8 @@ public Integer getResultSetConcurrency() {
582583
}
583584

584585
/**
585-
* Gets the result set holdability, one of the following {@code ResultSet} constants:
586-
* {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}.
586+
* Gets the result set holdability, one of the following {@link ResultSet} constants:
587+
* {@link ResultSet#HOLD_CURSORS_OVER_COMMIT} or {@link ResultSet#CLOSE_CURSORS_AT_COMMIT}.
587588
*
588589
* @return The result set holdability.
589590
*/
@@ -592,8 +593,8 @@ public Integer getResultSetHoldability() {
592593
}
593594

594595
/**
595-
* Gets the result set type, one of {@code ResultSet.TYPE_FORWARD_ONLY}, {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or
596-
* {@code ResultSet.TYPE_SCROLL_SENSITIVE}.
596+
* Gets the result set type, one of {@link ResultSet#TYPE_FORWARD_ONLY}, {@link ResultSet#TYPE_SCROLL_INSENSITIVE}, or
597+
* {@link ResultSet#TYPE_SCROLL_SENSITIVE}.
597598
*
598599
* @return the result set type.
599600
*/

java/org/apache/tomcat/dbcp/dbcp2/datasources/SharedPoolDataSourceFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import javax.naming.Reference;
2121

2222
/**
23-
* A JNDI ObjectFactory which creates {@code SharedPoolDataSource}s
23+
* A JNDI ObjectFactory which creates {@link SharedPoolDataSource}s
2424
*
2525
* @since 2.0
2626
*/

0 commit comments

Comments
 (0)