You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Simone Tripodi <si...@apache.org> on 2014/03/03 16:40:57 UTC
Re: svn commit: r1573561 - /commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
Hi there,
just a matter of curiosity: would
+ if(traces != null && !traces.isEmpty() {
be better or not compared to
+ if(traces != null && traces.size() > 0) {
That should be the same, right?
TIA all the best
-Simo
http://people.apache.org/~simonetripodi/
http://twitter.com/simonetripodi
On Mon, Mar 3, 2014 at 2:43 PM, <ma...@apache.org> wrote:
> Author: markt
> Date: Mon Mar 3 13:43:28 2014
> New Revision: 1573561
>
> URL: http://svn.apache.org/r1573561
> Log:
> Another small performance tweak.
>
> Modified:
>
> commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
>
> Modified:
> commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
> URL:
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java?rev=1573561&r1=1573560&r2=1573561&view=diff
>
> ==============================================================================
> ---
> commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
> (original)
> +++
> commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
> Mon Mar 3 13:43:28 2014
> @@ -623,7 +623,7 @@ public class DelegatingConnection<C exte
> // Statement's when it is closed.
> // DBCP-288. Not all the traced objects will be statements
> List<AbandonedTrace> traces = getTrace();
> - if(traces != null) {
> + if(traces != null && traces.size() > 0) {
> Iterator<AbandonedTrace> traceIter = traces.iterator();
> while (traceIter.hasNext()) {
> Object trace = traceIter.next();
>
>
>