Details
-
Type: Bug
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.1
-
Fix Version/s: 1.7
-
Component/s: o.c.jsword.passage
-
Labels:None
-
Environment:
All
Description
I am not sure if it makes sense to get an osis id for a TreeKey treeKey.getName works fine but when I tried treeKey.getOsisID it failed with some sort of infinite recursion error. I wonder if the new java 5 for loop in KeyUtil.visit is causing a problem.
Here is my test:
Book book = getBook("Pilgrim"); // Bunyan's Pilgrim's Progress
Key key = book.getKey("THE FIRST STAGE");
key.getOsisID(); // error occurs here
Here is the top of the stack trace:
java.lang.StackOverflowError
at java.util.Stack.peek(Stack.java:86)
at org.crosswire.jsword.passage.KeyIterator.prepare(KeyIterator.java:49)
at org.crosswire.jsword.passage.KeyIterator.hasNext(KeyIterator.java:63)
at org.crosswire.jsword.passage.KeyIterator.next(KeyIterator.java:68)
at org.crosswire.jsword.passage.KeyIterator.next(KeyIterator.java:36)
at org.crosswire.jsword.passage.KeyUtil.visit(KeyUtil.java:50)
at org.crosswire.jsword.passage.KeyUtil.visit(KeyUtil.java:53)
at org.crosswire.jsword.passage.KeyUtil.visit(KeyUtil.java:53)
at org.crosswire.jsword.passage.KeyUtil.visit(KeyUtil.java:53)
at org.crosswire.jsword.passage.KeyUtil.visit(KeyUtil.java:53)
at org.crosswire.jsword.passage.KeyUtil.visit(KeyUtil.java:53)
at org.crosswire.jsword.passage.KeyUtil.visit(KeyUtil.java:53)
at org.crosswire.jsword.passage.KeyUtil.visit(KeyUtil.java:53)
// the calls to .visit go on and on...