You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2018/06/11 23:06:15 UTC

commons-dbcp git commit: Format try-catch and line length 120.

Repository: commons-dbcp
Updated Branches:
  refs/heads/master 75c636918 -> cd326abd8


Format try-catch and line length 120.

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

Branch: refs/heads/master
Commit: cd326abd88b3ef686f566e0b1735b53383c627dc
Parents: 75c6369
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:06:02 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:06:02 2018 -0600

----------------------------------------------------------------------
 .../dbcp2/DelegatingPreparedStatement.java      | 86 ++++++++------------
 1 file changed, 34 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/cd326abd/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java b/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
index ac1d7f2..868fdfe 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java
@@ -40,15 +40,11 @@ import java.util.Calendar;
 /**
  * A base delegating implementation of {@link PreparedStatement}.
  * <p>
- * All of the methods from the {@link PreparedStatement} interface
- * simply check to see that the {@link PreparedStatement} is active,
- * and call the corresponding method on the "delegate"
- * provided in my constructor.
+ * All of the methods from the {@link PreparedStatement} interface simply check to see that the
+ * {@link PreparedStatement} is active, and call the corresponding method on the "delegate" provided in my constructor.
  * <p>
- * Extends AbandonedTrace to implement Statement tracking and
- * logging of code which created the Statement. Tracking the
- * Statement ensures that the Connection which created it can
- * close any open Statement's on Connection close.
+ * Extends AbandonedTrace to implement Statement tracking and logging of code which created the Statement. Tracking the
+ * Statement ensures that the Connection which created it can close any open Statement's on Connection close.
  *
  * @since 2.0
  */
@@ -74,9 +70,8 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
             getConnectionInternal().setLastUsed();
         }
         try {
-            return DelegatingResultSet.wrapResultSet(this,getDelegatePreparedStatement().executeQuery());
-        }
-        catch (final SQLException e) {
+            return DelegatingResultSet.wrapResultSet(this, getDelegatePreparedStatement().executeQuery());
+        } catch (final SQLException e) {
             handleException(e);
             throw new AssertionError();
         }
@@ -476,8 +471,7 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setRowId(parameterIndex, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -487,19 +481,18 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setNString(parameterIndex, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void setNCharacterStream(final int parameterIndex, final Reader value, final long length) throws SQLException {
+    public void setNCharacterStream(final int parameterIndex, final Reader value, final long length)
+            throws SQLException {
         checkOpen();
         try {
             getDelegatePreparedStatement().setNCharacterStream(parameterIndex, value, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -509,8 +502,7 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setNClob(parameterIndex, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -520,19 +512,18 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setClob(parameterIndex, reader, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void setBlob(final int parameterIndex, final InputStream inputStream, final long length) throws SQLException {
+    public void setBlob(final int parameterIndex, final InputStream inputStream, final long length)
+            throws SQLException {
         checkOpen();
         try {
             getDelegatePreparedStatement().setBlob(parameterIndex, inputStream, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -542,8 +533,7 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setNClob(parameterIndex, reader, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -553,41 +543,40 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setSQLXML(parameterIndex, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void setAsciiStream(final int parameterIndex, final InputStream inputStream, final long length) throws SQLException {
+    public void setAsciiStream(final int parameterIndex, final InputStream inputStream, final long length)
+            throws SQLException {
         checkOpen();
         try {
             getDelegatePreparedStatement().setAsciiStream(parameterIndex, inputStream, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void setBinaryStream(final int parameterIndex, final InputStream inputStream, final long length) throws SQLException {
+    public void setBinaryStream(final int parameterIndex, final InputStream inputStream, final long length)
+            throws SQLException {
         checkOpen();
         try {
             getDelegatePreparedStatement().setBinaryStream(parameterIndex, inputStream, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void setCharacterStream(final int parameterIndex, final Reader reader, final long length) throws SQLException {
+    public void setCharacterStream(final int parameterIndex, final Reader reader, final long length)
+            throws SQLException {
         checkOpen();
         try {
             getDelegatePreparedStatement().setCharacterStream(parameterIndex, reader, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -597,8 +586,7 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setAsciiStream(parameterIndex, inputStream);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -608,8 +596,7 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setBinaryStream(parameterIndex, inputStream);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -619,8 +606,7 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setCharacterStream(parameterIndex, reader);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -630,8 +616,7 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setNCharacterStream(parameterIndex, reader);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -641,8 +626,7 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setClob(parameterIndex, reader);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -652,8 +636,7 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setBlob(parameterIndex, inputStream);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -663,8 +646,7 @@ public class DelegatingPreparedStatement extends DelegatingStatement implements
         checkOpen();
         try {
             getDelegatePreparedStatement().setNClob(parameterIndex, reader);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }