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

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Mon Jun 4 12:34:35 MST 2007


Author: dmsmith
Date: 2007-06-04 12:34:35 -0700 (Mon, 04 Jun 2007)
New Revision: 1382

Modified:
   trunk/jsword/src/main/java/org/crosswire/jsword/book/BookData.java
Log:
Don't compare a book against itself.

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/BookData.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/BookData.java	2007-06-04 19:23:52 UTC (rev 1381)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/BookData.java	2007-06-04 19:34:35 UTC (rev 1382)
@@ -167,9 +167,12 @@
                     BookCategory category = book.getBookCategory();
 
                     BookCategory prevCategory = prevBook.getBookCategory();
+                    String prevName = prevBook.getInitials();
                     showDiffs[i - 1] = BookCategory.BIBLE.equals(category)
-                    && category.equals(prevCategory)
-                    && book.getLanguage().equals(prevBook.getLanguage());
+                                            && category.equals(prevCategory)
+                                            && book.getLanguage().equals(prevBook.getLanguage())
+                                            && !book.getInitials().equals(prevName);
+
                     if (showDiffs[i - 1])
                     {
                         doDiffs = true;




More information about the jsword-svn mailing list