[Mulgara-svn] r2075 - trunk/src/jar/util-xa/java/org/mulgara/store/xa
pag at mulgara.org
pag at mulgara.org
Mon Dec 12 17:32:27 UTC 2011
Author: pag
Date: 2011-12-12 17:32:26 +0000 (Mon, 12 Dec 2011)
New Revision: 2075
Modified:
trunk/src/jar/util-xa/java/org/mulgara/store/xa/FreeList.java
Log:
Fixed NPE when debug logging FreeList
Modified: trunk/src/jar/util-xa/java/org/mulgara/store/xa/FreeList.java
===================================================================
--- trunk/src/jar/util-xa/java/org/mulgara/store/xa/FreeList.java 2011-11-29 21:29:33 UTC (rev 2074)
+++ trunk/src/jar/util-xa/java/org/mulgara/store/xa/FreeList.java 2011-12-12 17:32:26 UTC (rev 2075)
@@ -1144,6 +1144,7 @@
// record the stack if debug is enabled
if (logger.isDebugEnabled()) {
+ assert stack != null;
stack.add(new StackTrace());
}
@@ -1239,6 +1240,7 @@
if ( (token == null) && (refCount > 0)) {
if (logger.isDebugEnabled()) {
+ assert stack != null;
logger.info("Lost phase token. Used " + stack.size() + " times:\n" + C.join(stack, "\n\n"));
}
refCount = 0;
@@ -1288,6 +1290,8 @@
* Adds this phase to the phase list of the enclosing FreeList object.
*/
private void init() {
+ if (logger.isDebugEnabled()) stack = new LinkedList<StackTrace>();
+
// Caller must be synchronized on FreeList.this.
firstFree = head;
reallocate = head;
More information about the Mulgara-svn
mailing list