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

dmsmith at crosswire.org dmsmith at crosswire.org
Wed Mar 16 19:37:01 MST 2011


Author: dmsmith
Date: 2011-03-16 19:37:00 -0700 (Wed, 16 Mar 2011)
New Revision: 2139

Modified:
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java
Log:
JS-182 fix a GenBookBackend problem in 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-16 22:10:11 UTC (rev 2138)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java	2011-03-17 02:37:00 UTC (rev 2139)
@@ -113,17 +113,7 @@
 
         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.
-            return userData.length == 8;
+            return null != find(key);
         } catch (IOException e) {
             return false;
         } finally {




More information about the jsword-svn mailing list