Author: david.lloyd(a)jboss.com
Date: 2008-07-18 16:10:30 -0400 (Fri, 18 Jul 2008)
New Revision: 4391
Modified:
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractAutoCloseable.java
Log:
Improve trace logging of closable resources
Modified:
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractAutoCloseable.java
===================================================================
---
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractAutoCloseable.java 2008-07-18
07:12:16 UTC (rev 4390)
+++
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/AbstractAutoCloseable.java 2008-07-18
20:10:30 UTC (rev 4391)
@@ -55,7 +55,6 @@
protected void dec() throws RemotingException {
final int v = refcount.decrementAndGet();
- log.trace("Clearing reference to %s to %d", this, Integer.valueOf(v));
if (v == 0) {
// we dropped the refcount to zero
log.trace("Refcount of %s dropped to zero, closing", this);
@@ -67,6 +66,8 @@
} else if (v < 0) {
// was already closed; put the count back
refcount.incrementAndGet();
+ } else {
+ log.trace("Clearing reference to %s to %d", this,
Integer.valueOf(v));
}
// otherwise, the resource remains open
}
Show replies by date