Author: epbernard
Date: 2006-11-29 10:16:32 -0500 (Wed, 29 Nov 2006)
New Revision: 10878
Modified:
branches/Branch_3_2/HibernateExt/metadata/src/java/org/hibernate/search/impl/FullTextSessionImpl.java
Log:
avoid NPE on search session clear
Modified:
branches/Branch_3_2/HibernateExt/metadata/src/java/org/hibernate/search/impl/FullTextSessionImpl.java
===================================================================
---
branches/Branch_3_2/HibernateExt/metadata/src/java/org/hibernate/search/impl/FullTextSessionImpl.java 2006-11-29
14:24:38 UTC (rev 10877)
+++
branches/Branch_3_2/HibernateExt/metadata/src/java/org/hibernate/search/impl/FullTextSessionImpl.java 2006-11-29
15:16:32 UTC (rev 10878)
@@ -213,7 +213,9 @@
}
public void clear() {
- postTransactionWorkQueueSynch.afterCompletion( Status.STATUS_ROLLEDBACK );
+ if (postTransactionWorkQueueSynch != null &&
!postTransactionWorkQueueSynch.isConsumed() ) {
+ postTransactionWorkQueueSynch.afterCompletion( Status.STATUS_ROLLEDBACK );
+ }
session.clear();
}