Add missing Javadoc.

Project: http://git-wip-us.apache.org/repos/asf/commons-dbcp/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbcp/commit/5ccf73a3
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/5ccf73a3
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/5ccf73a3

Branch: refs/heads/release
Commit: 5ccf73a33230857f217a8e456301c2a0e59d148b
Parents: 738aece
Author: Gary Gregory <garydgreg...@gmail.com>
Authored: Mon Jun 11 18:06:04 2018 -0600
Committer: Gary Gregory <garydgreg...@gmail.com>
Committed: Mon Jun 11 18:06:04 2018 -0600

----------------------------------------------------------------------
 .../commons/dbcp2/DelegatingResultSet.java      | 51 +++++++++++++++-----
 1 file changed, 39 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/5ccf73a3/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java 
b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
index 53beeab..e50ee25 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
@@ -75,13 +75,15 @@ public final class DelegatingResultSet extends 
AbandonedTrace implements ResultS
      * {@link #wrapResultSet(Statement, ResultSet)}
      * </p>
      *
-     * @param stmt Statement which created this ResultSet
-     * @param res ResultSet to wrap
+     * @param statement
+     *            The Statement which created the ResultSet.
+     * @param resultSet
+     *            The ResultSet to wrap.
      */
-    private DelegatingResultSet(final Statement stmt, final ResultSet res) {
-        super((AbandonedTrace)stmt);
-        this.statement = stmt;
-        this.resultSet = res;
+    private DelegatingResultSet(final Statement statement, final ResultSet 
resultSet) {
+        super((AbandonedTrace)statement);
+        this.statement = statement;
+        this.resultSet = resultSet;
     }
 
     /**
@@ -102,20 +104,43 @@ public final class DelegatingResultSet extends 
AbandonedTrace implements ResultS
         this.resultSet = res;
     }
 
-    public static ResultSet wrapResultSet(final Statement stmt, final 
ResultSet rset) {
-        if(null == rset) {
+    /**
+     * Wraps the given result set in a delegate.
+     * 
+     * @param statement
+     *            The Statement which created the ResultSet.
+     * @param resultSet
+     *            The ResultSet to wrap.
+     * @return a new delegate.
+     */
+    public static ResultSet wrapResultSet(final Statement statement, final 
ResultSet resultSet) {
+        if (null == resultSet) {
             return null;
         }
-        return new DelegatingResultSet(stmt,rset);
+        return new DelegatingResultSet(statement, resultSet);
     }
 
-    public static ResultSet wrapResultSet(final Connection conn, final 
ResultSet rset) {
-        if(null == rset) {
+    /**
+     * Wraps the given result set in a delegate.
+     * 
+     * @param connection
+     *            The Connection which created the ResultSet.
+     * @param resultSet
+     *            The ResultSet to wrap.
+     * @return a new delegate.
+     */
+    public static ResultSet wrapResultSet(final Connection connection, final 
ResultSet resultSet) {
+        if (null == resultSet) {
             return null;
         }
-        return new DelegatingResultSet(conn,rset);
+        return new DelegatingResultSet(connection, resultSet);
     }
 
+    /**
+     * Gets my delegate.
+     * 
+     * @return my delegate.
+     */
     public ResultSet getDelegate() {
         return resultSet;
     }
@@ -136,6 +161,8 @@ public final class DelegatingResultSet extends 
AbandonedTrace implements ResultS
      * {@code DelegatingResultSet}s, and you want to make
      * sure to obtain a "genuine" {@link ResultSet}.
      * </p>
+     * 
+     * @return the innermost delegate.
      */
     public ResultSet getInnermostDelegate() {
         ResultSet r = resultSet;

Reply via email to