commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simonetrip...@apache.org>
Subject Re: svn commit: r1573561 - /commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
Date Mon, 03 Mar 2014 15:40:57 GMT
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, <markt@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();
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message