From: Jimmy Z. <cra...@co...> - 2007-01-10 22:06:09
|
This bug has been reported and may have been fixed already, just go to the CVS of vtd-xml and download the latest version of VTDNav.java... Jimmy ----- Original Message ----- From: "Paul Tomsic" <pt...@gm...> To: "Jimmy Zhang" <cra...@co...> Cc: <vtd...@li...> Sent: Wednesday, January 10, 2007 1:59 PM Subject: more information on aforementioned BinaryExpr bug... > seems it's definitely surrounding the & being a value for an > attribute. > > it's entering VTDNav.getCharResolved(int) w/ a value of 413 for the > offset. > hits the switch stmt @ line 632, and simply falls into the default > which throws an exception. > > > On 1/10/07, Paul Tomsic <pt...@gm...> wrote: >> Hello, while using v.1.9 (and actually, i believe it's a bug in prior >> versions dating back to 1.5) >> i'm getting the stack trace below. >> >> I've attached a simple unit test that emulates this behaviour. >> Within my unit test, if you substitute "FAILING_CODE" with "PASSING_CODE" >> on line 23, the error doesn't occur. >> >> As near as i can tell, it's got something to do w/ the "bean" element >> that is directly beneath a bean element that contains the "&" >> symbol, as is the case w/ the "AIR" bean" >> >> if the attachment doesn't make it, i can simply inline the class, let me >> know >> >> thoughts? >> >> --- stack trace --- >> >> [junit] Testcase: >> testCompStringNodeSet(com.ximpleware.BinaryExprTest): >> Caused an ERROR >> [junit] Undefined behavior >> [junit] java.lang.RuntimeException: Undefined behavior >> [junit] at >> com.ximpleware.BinaryExpr.compStringNodeSet(BinaryExpr.java:364) >> [junit] at >> com.ximpleware.BinaryExpr.computeEQNE(BinaryExpr.java:234) >> [junit] at >> com.ximpleware.BinaryExpr.evalBoolean(BinaryExpr.java:113) >> [junit] at >> com.ximpleware.BinaryExpr.evalBoolean(BinaryExpr.java:111) >> [junit] at com.ximpleware.xpath.Predicate.eval(Predicate.java:41) >> [junit] at >> com.ximpleware.xpath.Step.evalPredicates(Step.java:118) >> [junit] at com.ximpleware.xpath.Step.eval(Step.java:108) >> [junit] at >> com.ximpleware.LocationPathExpr.process_child(LocationPathExpr.java:291) >> [junit] at >> com.ximpleware.LocationPathExpr.evalNodeSet(LocationPathExpr.java:1556) >> [junit] at >> com.ximpleware.UnionExpr.evalNodeSet(UnionExpr.java:111) >> [junit] at com.ximpleware.AutoPilot.evalXPath(AutoPilot.java:549) >> [junit] at >> com.ximpleware.BinaryExprTest.testCompStringNodeSet(BinaryExprTest.java:28) >> [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >> Method) >> [junit] at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> [junit] at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> >> >> > |