[jsword-svn] r2097 - trunk/jsword/src/main/java/org/crosswire/jsword/book/sword

dmsmith at crosswire.org dmsmith at crosswire.org
Mon Mar 7 06:52:22 MST 2011


Author: dmsmith
Date: 2011-03-07 06:52:22 -0700 (Mon, 07 Mar 2011)
New Revision: 2097

Modified:
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java
Log:
JS-170 fix genbook bug in boolean GenBookBackend.contains(key).

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java	2011-03-07 13:48:49 UTC (rev 2096)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java	2011-03-07 13:52:22 UTC (rev 2097)
@@ -128,6 +128,12 @@
         try {
             DataPolice.setKey(key);
             TreeNode node = find(key);
+            // Is there an entry?
+            if (node == null) {
+                return false;
+            }
+
+            // Is it non-empty?
             byte[] userData = node.getUserData();
 
             // Some entries may be empty.




More information about the jsword-svn mailing list